@pnpm/error
Advanced tools
Comparing version 2.0.0 to 2.1.0
@@ -28,1 +28,4 @@ export default class PnpmError extends Error { | ||
} | ||
export declare class LockfileMissingDependencyError extends PnpmError { | ||
constructor(depPath: string); | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FetchError = void 0; | ||
exports.LockfileMissingDependencyError = exports.FetchError = void 0; | ||
const constants_1 = require("@pnpm/constants"); | ||
class PnpmError extends Error { | ||
@@ -40,2 +41,12 @@ constructor(code, message, opts) { | ||
} | ||
class LockfileMissingDependencyError extends PnpmError { | ||
constructor(depPath) { | ||
const message = `Broken lockfile: no entry for '${depPath}' in ${constants_1.WANTED_LOCKFILE}`; | ||
super('LOCKFILE_MISSING_DEPENDENCY', message, { | ||
hint: 'This issue is probably caused by a badly resolved merge conflict.\n' + | ||
'To fix the lockfile, run \'pnpm install --no-frozen-lockfile\'.', | ||
}); | ||
} | ||
} | ||
exports.LockfileMissingDependencyError = LockfileMissingDependencyError; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@pnpm/error", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "An error class for pnpm errors", | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
@@ -14,10 +14,5 @@ "lib", | ||
}, | ||
"scripts": { | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts", | ||
"test": "pnpm run compile", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/error", | ||
"repository": "https://github.com/pnpm/pnpm/blob/main/packages/error", | ||
"keywords": [ | ||
"pnpm6", | ||
"pnpm", | ||
@@ -30,4 +25,15 @@ "error" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/error#readme", | ||
"funding": "https://opencollective.com/pnpm" | ||
} | ||
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/error#readme", | ||
"funding": "https://opencollective.com/pnpm", | ||
"devDependencies": { | ||
"@pnpm/error": "2.1.0" | ||
}, | ||
"dependencies": { | ||
"@pnpm/constants": "5.0.0" | ||
}, | ||
"scripts": { | ||
"lint": "eslint src/**/*.ts", | ||
"test": "pnpm run compile", | ||
"compile": "tsc --build && pnpm run lint --fix" | ||
} | ||
} |
@@ -22,3 +22,3 @@ # @pnpm/error | ||
throw new PnpmError('THE_ERROR_CODE', 'The error message') | ||
} catch (err) { | ||
} catch (err: any) { // eslint-disable-line | ||
console.log(err.code) | ||
@@ -25,0 +25,0 @@ //> ERR_PNPM_THE_ERROR_CODE |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
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
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
7242
80
1
1
1
+ Added@pnpm/constants@5.0.0
+ Added@pnpm/constants@5.0.0(transitive)