@pnpm/package-is-installable
Advanced tools
Comparing version 6.0.12 to 7.0.0
@@ -1,2 +0,2 @@ | ||
import PnpmError from '@pnpm/error'; | ||
import { PnpmError } from '@pnpm/error'; | ||
export declare class UnsupportedEngineError extends PnpmError { | ||
@@ -8,3 +8,3 @@ wanted: WantedEngine; | ||
} | ||
export default function checkEngine(packageId: string, wantedEngine: WantedEngine, currentEngine: Engine): UnsupportedEngineError | null; | ||
export declare function checkEngine(packageId: string, wantedEngine: WantedEngine, currentEngine: Engine): UnsupportedEngineError | null; | ||
export interface Engine { | ||
@@ -11,0 +11,0 @@ node: string; |
@@ -6,6 +6,6 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UnsupportedEngineError = void 0; | ||
const error_1 = __importDefault(require("@pnpm/error")); | ||
exports.checkEngine = exports.UnsupportedEngineError = void 0; | ||
const error_1 = require("@pnpm/error"); | ||
const semver_1 = __importDefault(require("semver")); | ||
class UnsupportedEngineError extends error_1.default { | ||
class UnsupportedEngineError extends error_1.PnpmError { | ||
constructor(packageId, wanted, current) { | ||
@@ -34,3 +34,3 @@ super('UNSUPPORTED_ENGINE', `Unsupported engine for ${packageId}: wanted: ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); | ||
} | ||
exports.default = checkEngine; | ||
exports.checkEngine = checkEngine; | ||
//# sourceMappingURL=checkEngine.js.map |
@@ -1,2 +0,2 @@ | ||
import PnpmError from '@pnpm/error'; | ||
import { PnpmError } from '@pnpm/error'; | ||
export declare class UnsupportedPlatformError extends PnpmError { | ||
@@ -7,3 +7,3 @@ wanted: WantedPlatform; | ||
} | ||
export default function checkPlatform(packageId: string, wantedPlatform: WantedPlatform): UnsupportedPlatformError | null; | ||
export declare function checkPlatform(packageId: string, wantedPlatform: WantedPlatform): UnsupportedPlatformError | null; | ||
export interface Platform { | ||
@@ -10,0 +10,0 @@ cpu: string | string[]; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.UnsupportedPlatformError = void 0; | ||
const error_1 = __importDefault(require("@pnpm/error")); | ||
exports.checkPlatform = exports.UnsupportedPlatformError = void 0; | ||
const error_1 = require("@pnpm/error"); | ||
const detect_libc_1 = require("detect-libc"); | ||
const currentLibc = (0, detect_libc_1.familySync)() ?? 'unknown'; | ||
class UnsupportedPlatformError extends error_1.default { | ||
class UnsupportedPlatformError extends error_1.PnpmError { | ||
constructor(packageId, wanted, current) { | ||
@@ -37,3 +34,3 @@ super('UNSUPPORTED_PLATFORM', `Unsupported platform for ${packageId}: wanted ${JSON.stringify(wanted)} (current: ${JSON.stringify(current)})`); | ||
} | ||
exports.default = checkPlatform; | ||
exports.checkPlatform = checkPlatform; | ||
function checkList(value, list) { | ||
@@ -40,0 +37,0 @@ let tmp; |
@@ -6,3 +6,3 @@ import { UnsupportedEngineError, WantedEngine } from './checkEngine'; | ||
export { UnsupportedEngineError, UnsupportedPlatformError, WantedEngine, }; | ||
export default function packageIsInstallable(pkgId: string, pkg: { | ||
export declare function packageIsInstallable(pkgId: string, pkg: { | ||
name: string; | ||
@@ -9,0 +9,0 @@ version: string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.checkPackage = exports.UnsupportedPlatformError = exports.UnsupportedEngineError = void 0; | ||
exports.checkPackage = exports.packageIsInstallable = exports.UnsupportedPlatformError = exports.UnsupportedEngineError = void 0; | ||
const core_loggers_1 = require("@pnpm/core-loggers"); | ||
const checkEngine_1 = __importStar(require("./checkEngine")); | ||
const checkEngine_1 = require("./checkEngine"); | ||
Object.defineProperty(exports, "UnsupportedEngineError", { enumerable: true, get: function () { return checkEngine_1.UnsupportedEngineError; } }); | ||
const checkPlatform_1 = __importStar(require("./checkPlatform")); | ||
const checkPlatform_1 = require("./checkPlatform"); | ||
Object.defineProperty(exports, "UnsupportedPlatformError", { enumerable: true, get: function () { return checkPlatform_1.UnsupportedPlatformError; } }); | ||
@@ -58,5 +35,5 @@ const getSystemNodeVersion_1 = require("./getSystemNodeVersion"); | ||
} | ||
exports.default = packageIsInstallable; | ||
exports.packageIsInstallable = packageIsInstallable; | ||
function checkPackage(pkgId, manifest, options) { | ||
return (0, checkPlatform_1.default)(pkgId, { | ||
return (0, checkPlatform_1.checkPlatform)(pkgId, { | ||
cpu: manifest.cpu ?? ['any'], | ||
@@ -67,3 +44,3 @@ os: manifest.os ?? ['any'], | ||
? null | ||
: (0, checkEngine_1.default)(pkgId, manifest.engines, { | ||
: (0, checkEngine_1.checkEngine)(pkgId, manifest.engines, { | ||
node: options.nodeVersion ?? (0, getSystemNodeVersion_1.getSystemNodeVersion)(), | ||
@@ -70,0 +47,0 @@ pnpm: options.pnpmVersion, |
{ | ||
"name": "@pnpm/package-is-installable", | ||
"version": "6.0.12", | ||
"version": "7.0.0", | ||
"description": "Checks if a package is installable on the current system", | ||
@@ -19,3 +19,3 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@pnpm/logger": "^4.0.0" | ||
"@pnpm/logger": "^5.0.0" | ||
}, | ||
@@ -25,4 +25,4 @@ "repository": "https://github.com/pnpm/pnpm/blob/main/packages/package-is-installable", | ||
"dependencies": { | ||
"@pnpm/core-loggers": "7.1.0", | ||
"@pnpm/error": "3.1.0", | ||
"@pnpm/core-loggers": "8.0.0", | ||
"@pnpm/error": "4.0.0", | ||
"@pnpm/types": "8.7.0", | ||
@@ -32,6 +32,6 @@ "detect-libc": "^2.0.1", | ||
"mem": "^8.1.1", | ||
"semver": "^7.3.7" | ||
"semver": "^7.3.8" | ||
}, | ||
"devDependencies": { | ||
"@pnpm/package-is-installable": "6.0.12", | ||
"@pnpm/package-is-installable": "7.0.0", | ||
"@types/semver": "7.3.12" | ||
@@ -38,0 +38,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
17094
235
+ Added@pnpm/core-loggers@8.0.0(transitive)
+ Added@pnpm/error@4.0.0(transitive)
+ Added@pnpm/logger@5.2.0(transitive)
+ Addedbole@5.0.17(transitive)
- Removed@pnpm/core-loggers@7.1.0(transitive)
- Removed@pnpm/error@3.1.0(transitive)
- Removed@pnpm/logger@4.0.0(transitive)
- Removedbole@4.0.1(transitive)
Updated@pnpm/core-loggers@8.0.0
Updated@pnpm/error@4.0.0
Updatedsemver@^7.3.8