-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: paulober <[email protected]>
- Loading branch information
Showing
7 changed files
with
969 additions
and
902 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require eslint/bin/eslint.js | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
const wrapWithUserWrapper = existsSync(absUserWrapperPath) | ||
? exports => absRequire(absUserWrapperPath)(exports) | ||
: exports => exports; | ||
|
||
// Defer to the real eslint/bin/eslint.js your application uses | ||
module.exports = absRequire(`eslint/bin/eslint.js`); | ||
module.exports = wrapWithUserWrapper(absRequire(`eslint/bin/eslint.js`)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require typescript/bin/tsc | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
const wrapWithUserWrapper = existsSync(absUserWrapperPath) | ||
? exports => absRequire(absUserWrapperPath)(exports) | ||
: exports => exports; | ||
|
||
// Defer to the real typescript/bin/tsc your application uses | ||
module.exports = absRequire(`typescript/bin/tsc`); | ||
module.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsc`)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,32 @@ | ||
#!/usr/bin/env node | ||
|
||
const {existsSync} = require(`fs`); | ||
const {createRequire} = require(`module`); | ||
const {createRequire, register} = require(`module`); | ||
const {resolve} = require(`path`); | ||
const {pathToFileURL} = require(`url`); | ||
|
||
const relPnpApiPath = "../../../../.pnp.cjs"; | ||
|
||
const absPnpApiPath = resolve(__dirname, relPnpApiPath); | ||
const absUserWrapperPath = resolve(__dirname, `./sdk.user.cjs`); | ||
const absRequire = createRequire(absPnpApiPath); | ||
|
||
const absPnpLoaderPath = resolve(absPnpApiPath, `../.pnp.loader.mjs`); | ||
const isPnpLoaderEnabled = existsSync(absPnpLoaderPath); | ||
|
||
if (existsSync(absPnpApiPath)) { | ||
if (!process.versions.pnp) { | ||
// Setup the environment to be able to require typescript/bin/tsserver | ||
require(absPnpApiPath).setup(); | ||
if (isPnpLoaderEnabled && register) { | ||
register(pathToFileURL(absPnpLoaderPath)); | ||
} | ||
} | ||
} | ||
|
||
const wrapWithUserWrapper = existsSync(absUserWrapperPath) | ||
? exports => absRequire(absUserWrapperPath)(exports) | ||
: exports => exports; | ||
|
||
// Defer to the real typescript/bin/tsserver your application uses | ||
module.exports = absRequire(`typescript/bin/tsserver`); | ||
module.exports = wrapWithUserWrapper(absRequire(`typescript/bin/tsserver`)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -265,5 +265,5 @@ | |
"uuid": "^9.0.1", | ||
"which": "^4.0.0" | ||
}, | ||
"packageManager": "yarn@4.2.2" | ||
"packageManager": "yarn@4.4.0" | ||
} |