pkgs-graph
Advanced tools
Comparing version 7.0.0 to 7.0.1
@@ -7,12 +7,12 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const npm_package_arg_1 = __importDefault(require("@pnpm/npm-package-arg")); | ||
const resolve_workspace_range_1 = __importDefault(require("@pnpm/resolve-workspace-range")); | ||
const npm_package_arg_1 = __importDefault(require("@zkochan/npm-package-arg")); | ||
function default_1(pkgs, opts) { | ||
const pkgMap = createPkgMap(pkgs); | ||
const unmatched = []; | ||
const graph = Object.keys(pkgMap) | ||
.reduce((acc, pkgSpec) => { | ||
const graph = Object.entries(pkgMap) | ||
.reduce((acc, [pkgSpec, pkg]) => { | ||
acc[pkgSpec] = { | ||
dependencies: createNode(pkgMap[pkgSpec]), | ||
package: pkgMap[pkgSpec], | ||
dependencies: createNode(pkg), | ||
package: pkg, | ||
}; | ||
@@ -28,14 +28,12 @@ return acc; | ||
}; | ||
return Object.keys(dependencies) | ||
.map(depName => { | ||
return Object.entries(dependencies) | ||
.map(([depName, rawSpec]) => { | ||
let spec; | ||
let rawSpec = dependencies[depName]; | ||
const isWorkspaceSpec = rawSpec.startsWith('workspace:'); | ||
try { | ||
if (isWorkspaceSpec) { | ||
rawSpec = rawSpec.substr(10); | ||
rawSpec = rawSpec.slice(10); | ||
if (rawSpec === '^' || rawSpec === '~') { | ||
rawSpec = '*'; | ||
} | ||
; | ||
} | ||
@@ -42,0 +40,0 @@ spec = npm_package_arg_1.default.resolve(depName, rawSpec, pkg.dir); |
{ | ||
"name": "pkgs-graph", | ||
"version": "7.0.0", | ||
"version": "7.0.1", | ||
"description": "Create a graph from an array of packages", | ||
@@ -14,3 +14,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=14.19" | ||
"node": ">=14.6" | ||
}, | ||
@@ -22,10 +22,10 @@ "bugs": { | ||
"devDependencies": { | ||
"@types/ramda": "0.27.39", | ||
"@types/ramda": "0.28.14", | ||
"better-path-resolve": "1.0.0", | ||
"pkgs-graph": "7.0.0" | ||
"pkgs-graph": "7.0.1" | ||
}, | ||
"dependencies": { | ||
"@pnpm/npm-package-arg": "^1.0.0", | ||
"@pnpm/resolve-workspace-range": "3.0.0", | ||
"@zkochan/npm-package-arg": "^2.0.1", | ||
"ramda": "^0.27.1" | ||
"ramda": "^0.28.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "funding": "https://opencollective.com/pnpm", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11190
122
+ Added@pnpm/npm-package-arg@^1.0.0
+ Added@pnpm/npm-package-arg@1.0.0(transitive)
+ Addedbuiltins@5.1.0(transitive)
+ Addedramda@0.28.0(transitive)
+ Addedvalidate-npm-package-name@4.0.0(transitive)
- Removed@zkochan/npm-package-arg@^2.0.1
- Removed@zkochan/npm-package-arg@2.0.1(transitive)
- Removedbuiltins@1.0.3(transitive)
- Removedramda@0.27.2(transitive)
- Removedvalidate-npm-package-name@3.0.0(transitive)
Updatedramda@^0.28.0