@yarnpkg/pnp
Advanced tools
Comparing version 2.0.0-rc.11 to 2.0.0-rc.12
@@ -6,6 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// @ts-ignore | ||
const hook_1 = __importDefault(require("@yarnpkg/pnp/lib/hook")); | ||
const generatePrettyJson_1 = require("./generatePrettyJson"); | ||
const generateSerializedState_1 = require("./generateSerializedState"); | ||
// @ts-ignore | ||
const hook_1 = __importDefault(require("./hook")); | ||
function generateLoader(shebang, loader) { | ||
@@ -12,0 +12,0 @@ return [ |
@@ -76,2 +76,8 @@ "use strict"; | ||
process.versions.pnp = String(pnpapi.VERSIONS.std); | ||
function getRequireStack(parent) { | ||
const requireStack = []; | ||
for (let cursor = parent; cursor; cursor = cursor.parent) | ||
requireStack.push(cursor.filename || cursor.id); | ||
return requireStack; | ||
} | ||
// A small note: we don't replace the cache here (and instead use the native one). This is an effort to not | ||
@@ -193,2 +199,6 @@ // break code similar to "delete require.cache[require.resolve(FOO)]", where FOO is a package located outside | ||
} | ||
const requireStack = getRequireStack(parent); | ||
firstError.requireStack = requireStack; | ||
if (requireStack.length > 0) | ||
firstError.message += `\nRequire stack:\n- ${requireStack.join(`\n- `)}`; | ||
throw firstError; | ||
@@ -195,0 +205,0 @@ }; |
@@ -474,2 +474,10 @@ "use strict"; | ||
topLevel, | ||
getLocator: (name, referencish) => { | ||
if (Array.isArray(referencish)) { | ||
return { name: referencish[0], reference: referencish[1] }; | ||
} | ||
else { | ||
return { name, reference: referencish }; | ||
} | ||
}, | ||
getDependencyTreeRoots: () => { | ||
@@ -476,0 +484,0 @@ return [...runtimeState.dependencyTreeRoots]; |
@@ -74,2 +74,3 @@ import { NativePath, PortablePath, Path } from '@yarnpkg/fslib'; | ||
}; | ||
getLocator: (name: string, referencish: string | [string, string]) => PackageLocator; | ||
getDependencyTreeRoots: () => Array<PackageLocator>; | ||
@@ -76,0 +77,0 @@ getPackageInformation: (locator: PackageLocator) => PackageInformation<NativePath> | null; |
{ | ||
"name": "@yarnpkg/pnp", | ||
"version": "2.0.0-rc.11", | ||
"version": "2.0.0-rc.12", | ||
"main": "./lib/index.js", | ||
"dependencies": { | ||
"@yarnpkg/fslib": "2.0.0-rc.11" | ||
"@yarnpkg/fslib": "2.0.0-rc.12" | ||
}, | ||
"devDependencies": { | ||
"@yarnpkg/builder": "2.0.0-rc.12", | ||
"@yarnpkg/pnpify": "2.0.0-rc.11", | ||
"@types/node": "^12.12.8", | ||
"@yarnpkg/builder": "2.0.0-rc.13", | ||
"@yarnpkg/pnpify": "2.0.0-rc.12", | ||
"typescript": "next", | ||
@@ -19,3 +20,3 @@ "webpack": "^4.41.2", | ||
"build:pnp": "run pnpify webpack-cli --config webpack.config.pkg.js", | ||
"postpack": "find lib -mindepth 1 ! -path 'lib/hook.js' -exec rm -rf '{}' +", | ||
"postpack": "rm -rf lib", | ||
"prepack": "run build:pnp && run build:compile packages/yarnpkg-pnp --emitDeclarationOnly --declaration", | ||
@@ -22,0 +23,0 @@ "release": "yarn npm publish", |
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
658627
3698
0
7
+ Added@yarnpkg/fslib@2.0.0-rc.12(transitive)
- Removed@yarnpkg/fslib@2.0.0-rc.11(transitive)
Updated@yarnpkg/fslib@2.0.0-rc.12