@pnpm/local-resolver
Advanced tools
Comparing version 5.1.3 to 6.0.0
# @pnpm/local-resolver | ||
## 6.0.0 | ||
### Major Changes | ||
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work. | ||
### Patch Changes | ||
- 83645c8ed: Update ssri. | ||
- Updated dependencies [97b986fbc] | ||
- @pnpm/error@2.0.0 | ||
- @pnpm/read-project-manifest@2.0.0 | ||
- @pnpm/resolver-base@8.0.0 | ||
- @pnpm/types@7.0.0 | ||
## 5.1.3 | ||
@@ -4,0 +19,0 @@ |
@@ -6,7 +6,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs_1 = __importDefault(require("fs")); | ||
const error_1 = __importDefault(require("@pnpm/error")); | ||
const read_project_manifest_1 = require("@pnpm/read-project-manifest"); | ||
const ssri_1 = __importDefault(require("ssri")); | ||
const parsePref_1 = __importDefault(require("./parsePref")); | ||
const fs = require("graceful-fs"); | ||
const ssri = require("ssri"); | ||
/** | ||
@@ -17,4 +17,4 @@ * Resolves a package hosted on the local filesystem | ||
var _a; | ||
const spec = parsePref_1.default(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir); | ||
if (!spec) | ||
const spec = (0, parsePref_1.default)(wantedDependency.pref, opts.projectDir, (_a = opts.lockfileDir) !== null && _a !== void 0 ? _a : opts.projectDir); | ||
if (spec == null) | ||
return null; | ||
@@ -34,3 +34,3 @@ if (spec.type === 'file') { | ||
try { | ||
localDependencyManifest = await read_project_manifest_1.readProjectManifestOnly(spec.fetchSpec); | ||
localDependencyManifest = await (0, read_project_manifest_1.readProjectManifestOnly)(spec.fetchSpec); | ||
} | ||
@@ -63,4 +63,4 @@ catch (internalErr) { | ||
async function getFileIntegrity(filename) { | ||
return (await ssri.fromStream(fs.createReadStream(filename))).toString(); | ||
return (await ssri_1.default.fromStream(fs_1.default.createReadStream(filename))).toString(); | ||
} | ||
//# sourceMappingURL=index.js.map |
@@ -6,6 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const os_1 = __importDefault(require("os")); | ||
const path_1 = __importDefault(require("path")); | ||
const error_1 = __importDefault(require("@pnpm/error")); | ||
const os = require("os"); | ||
const normalize = require("normalize-path"); | ||
const path = require("path"); | ||
const normalize_path_1 = __importDefault(require("normalize-path")); | ||
// eslint-disable-next-line | ||
@@ -23,3 +23,3 @@ const isWindows = process.platform === 'win32' || global['FAKE_WINDOWS']; | ||
pref.endsWith('.tar') || | ||
pref.includes(path.sep) || | ||
pref.includes(path_1.default.sep) || | ||
pref.startsWith('file:') || | ||
@@ -51,3 +51,3 @@ isFilespec.test(pref)) { | ||
// this is needed for windows and for file:~/foo/bar | ||
fetchSpec = resolvePath(os.homedir(), spec.slice(2)); | ||
fetchSpec = resolvePath(os_1.default.homedir(), spec.slice(2)); | ||
normalizedPref = `${protocol}${spec}`; | ||
@@ -61,9 +61,9 @@ } | ||
else { | ||
normalizedPref = `${protocol}${path.relative(projectDir, fetchSpec)}`; | ||
normalizedPref = `${protocol}${path_1.default.relative(projectDir, fetchSpec)}`; | ||
} | ||
} | ||
const dependencyPath = normalize(path.relative(projectDir, fetchSpec)); | ||
const dependencyPath = (0, normalize_path_1.default)(path_1.default.relative(projectDir, fetchSpec)); | ||
const id = type === 'directory' || projectDir === lockfileDir | ||
? `${protocol}${dependencyPath}` | ||
: `${protocol}${normalize(path.relative(lockfileDir, fetchSpec))}`; | ||
: `${protocol}${(0, normalize_path_1.default)(path_1.default.relative(lockfileDir, fetchSpec))}`; | ||
return { | ||
@@ -80,3 +80,3 @@ dependencyPath, | ||
return spec; | ||
return path.resolve(where, spec); | ||
return path_1.default.resolve(where, spec); | ||
} | ||
@@ -83,0 +83,0 @@ function isAbsolute(dir) { |
{ | ||
"name": "@pnpm/local-resolver", | ||
"version": "5.1.3", | ||
"version": "6.0.0", | ||
"description": "Resolver for local packages", | ||
@@ -12,3 +12,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=10.16" | ||
"node": ">=12.17" | ||
}, | ||
@@ -21,3 +21,3 @@ "scripts": { | ||
"fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build" | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" | ||
}, | ||
@@ -30,3 +30,2 @@ "repository": "https://github.com/pnpm/pnpm/blob/master/packages/local-resolver", | ||
], | ||
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)", | ||
"license": "MIT", | ||
@@ -38,12 +37,10 @@ "bugs": { | ||
"dependencies": { | ||
"@pnpm/error": "1.4.0", | ||
"@pnpm/read-project-manifest": "1.1.7", | ||
"@pnpm/resolver-base": "7.1.1", | ||
"@pnpm/types": "6.4.0", | ||
"graceful-fs": "4.2.4", | ||
"@pnpm/error": "2.0.0", | ||
"@pnpm/read-project-manifest": "2.0.0", | ||
"@pnpm/resolver-base": "8.0.0", | ||
"@pnpm/types": "7.0.0", | ||
"normalize-path": "^3.0.0", | ||
"ssri": "6.0.1" | ||
"ssri": "^8.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/graceful-fs": "^4.1.4", | ||
"@types/normalize-path": "^3.0.0", | ||
@@ -50,0 +47,0 @@ "@types/ssri": "^7.1.0" |
@@ -38,2 +38,2 @@ # @pnpm/local-resolver | ||
MIT © [Zoltan Kochan](https://www.kochan.io/) | ||
MIT |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
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
12682
6
2
1
2
+ Added@pnpm/error@2.0.0(transitive)
+ Added@pnpm/read-project-manifest@2.0.0(transitive)
+ Added@pnpm/resolver-base@8.0.0(transitive)
+ Added@pnpm/types@7.0.0(transitive)
+ Added@pnpm/write-project-manifest@2.0.0(transitive)
+ Addedminipass@3.3.6(transitive)
+ Addedssri@8.0.1(transitive)
+ Addedyallist@4.0.0(transitive)
- Removedgraceful-fs@4.2.4
- Removed@pnpm/error@1.4.0(transitive)
- Removed@pnpm/read-project-manifest@1.1.7(transitive)
- Removed@pnpm/resolver-base@7.1.1(transitive)
- Removed@pnpm/types@6.4.0(transitive)
- Removed@pnpm/write-project-manifest@1.1.7(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedfiggy-pudding@3.5.2(transitive)
- Removedgraceful-fs@4.2.4(transitive)
- Removedmz@2.7.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedssri@6.0.1(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
Updated@pnpm/error@2.0.0
Updated@pnpm/resolver-base@8.0.0
Updated@pnpm/types@7.0.0
Updatedssri@^8.0.1