@yarnpkg/nm
Advanced tools
Comparing version 3.0.3 to 3.1.0
@@ -13,6 +13,6 @@ import { Project, MessageName } from '@yarnpkg/core'; | ||
} | ||
export declare type NodeModulesBaseNode = { | ||
export type NodeModulesBaseNode = { | ||
dirList: Set<Filename>; | ||
}; | ||
export declare type NodeModulesPackageNode = { | ||
export type NodeModulesPackageNode = { | ||
locator: LocatorKey; | ||
@@ -34,4 +34,4 @@ target: PortablePath; | ||
*/ | ||
export declare type NodeModulesTree = Map<PortablePath, NodeModulesBaseNode | NodeModulesPackageNode>; | ||
export declare type NodeModulesTreeErrors = Array<{ | ||
export type NodeModulesTree = Map<PortablePath, NodeModulesBaseNode | NodeModulesPackageNode>; | ||
export type NodeModulesTreeErrors = Array<{ | ||
messageName: MessageName; | ||
@@ -48,3 +48,3 @@ text: string; | ||
/** Package locator key for usage inside maps */ | ||
declare type LocatorKey = string; | ||
type LocatorKey = string; | ||
/** | ||
@@ -71,3 +71,3 @@ * Returns path to archive, if package location is inside the archive. | ||
}; | ||
export declare type NodeModulesLocatorMap = Map<LocatorKey, { | ||
export type NodeModulesLocatorMap = Map<LocatorKey, { | ||
target: PortablePath; | ||
@@ -74,0 +74,0 @@ linkType: LinkType; |
@@ -413,5 +413,7 @@ "use strict"; | ||
seenNodes.add(pkg); | ||
const pkgReferences = Array.from(pkg.references).sort().join(`#`); | ||
for (const dep of pkg.dependencies) { | ||
const depReferences = Array.from(dep.references).sort().join(`#`); | ||
// We do not want self-references in node_modules, since they confuse existing tools | ||
if (dep === pkg) | ||
if (dep.identName === pkg.identName && depReferences === pkgReferences) | ||
continue; | ||
@@ -434,3 +436,4 @@ const references = Array.from(dep.references).sort(); | ||
} | ||
if (!dep.name.endsWith(WORKSPACE_NAME_SUFFIX) && !isAnonymousWorkspace) { | ||
const isCircularSymlink = leafNode.linkType === LinkType.SOFT && nodeModulesLocation.startsWith(leafNode.target); | ||
if (!dep.name.endsWith(WORKSPACE_NAME_SUFFIX) && !isAnonymousWorkspace && !isCircularSymlink) { | ||
const prevNode = tree.get(nodeModulesLocation); | ||
@@ -437,0 +440,0 @@ if (prevNode) { |
@@ -48,3 +48,3 @@ /** | ||
*/ | ||
declare type PackageName = string; | ||
type PackageName = string; | ||
export declare enum HoisterDependencyKind { | ||
@@ -55,3 +55,3 @@ REGULAR = 0, | ||
} | ||
export declare type HoisterTree = { | ||
export type HoisterTree = { | ||
name: PackageName; | ||
@@ -65,3 +65,3 @@ identName: PackageName; | ||
}; | ||
export declare type HoisterResult = { | ||
export type HoisterResult = { | ||
name: PackageName; | ||
@@ -72,3 +72,3 @@ identName: PackageName; | ||
}; | ||
declare type Locator = string; | ||
type Locator = string; | ||
declare enum DebugLevel { | ||
@@ -81,3 +81,3 @@ NONE = -1, | ||
} | ||
export declare type HoistOptions = { | ||
export type HoistOptions = { | ||
/** Runs self-checks after hoisting is finished */ | ||
@@ -84,0 +84,0 @@ check?: boolean; |
@@ -7,1 +7,3 @@ import { NodeModulesLocatorMap, getArchivePath } from './buildNodeModulesTree'; | ||
export type { NodeModulesLocatorMap }; | ||
export type { HoisterTree, HoisterResult } from './hoist'; | ||
export { hoist, HoisterDependencyKind } from './hoist'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getArchivePath = exports.buildLocatorMap = exports.buildNodeModulesTree = exports.NodeModulesHoistingLimits = void 0; | ||
exports.HoisterDependencyKind = exports.hoist = exports.getArchivePath = exports.buildLocatorMap = exports.buildNodeModulesTree = exports.NodeModulesHoistingLimits = void 0; | ||
const buildNodeModulesTree_1 = require("./buildNodeModulesTree"); | ||
@@ -11,1 +11,4 @@ Object.defineProperty(exports, "getArchivePath", { enumerable: true, get: function () { return buildNodeModulesTree_1.getArchivePath; } }); | ||
Object.defineProperty(exports, "NodeModulesHoistingLimits", { enumerable: true, get: function () { return buildNodeModulesTree_3.NodeModulesHoistingLimits; } }); | ||
var hoist_1 = require("./hoist"); | ||
Object.defineProperty(exports, "hoist", { enumerable: true, get: function () { return hoist_1.hoist; } }); | ||
Object.defineProperty(exports, "HoisterDependencyKind", { enumerable: true, get: function () { return hoist_1.HoisterDependencyKind; } }); |
{ | ||
"name": "@yarnpkg/nm", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"license": "BSD-2-Clause", | ||
@@ -9,8 +9,6 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@yarnpkg/core": "^3.2.2", | ||
"@yarnpkg/fslib": "^2.6.2" | ||
"@yarnpkg/core": "^3.3.0", | ||
"@yarnpkg/fslib": "^2.9.0", | ||
"@yarnpkg/pnp": "^3.2.5" | ||
}, | ||
"devDependencies": { | ||
"@yarnpkg/pnp": "^3.2.1" | ||
}, | ||
"scripts": { | ||
@@ -17,0 +15,0 @@ "postpack": "rm -rf lib", |
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
80823
0
1664
0
3
+ Added@yarnpkg/pnp@^3.2.5
+ Added@types/node@18.19.76(transitive)
+ Added@yarnpkg/pnp@3.3.8(transitive)
+ Addedundici-types@5.26.5(transitive)
- Removed@types/node@22.13.5(transitive)
- Removedundici-types@6.20.0(transitive)
Updated@yarnpkg/core@^3.3.0
Updated@yarnpkg/fslib@^2.9.0