@pnpm/parse-wanted-dependency
Advanced tools
Comparing version 1.0.0 to 2.0.0
@@ -1,6 +0,6 @@ | ||
declare type ParsedWantedDependency = { | ||
interface ParsedWantedDependency { | ||
alias: string; | ||
pref: string; | ||
}; | ||
} | ||
export default function parseWantedDependency(rawWantedDependency: string): Partial<ParsedWantedDependency> & (Omit<ParsedWantedDependency, 'pref'> | Omit<ParsedWantedDependency, 'alias'> | ParsedWantedDependency); | ||
export {}; |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const validateNpmPackageName = require("validate-npm-package-name"); | ||
const validate_npm_package_name_1 = __importDefault(require("validate-npm-package-name")); | ||
function parseWantedDependency(rawWantedDependency) { | ||
@@ -8,3 +11,3 @@ const versionDelimiter = rawWantedDependency.indexOf('@', 1); // starting from 1 to skip the @ that marks scope | ||
const alias = rawWantedDependency.substr(0, versionDelimiter); | ||
if (validateNpmPackageName(alias).validForOldPackages) { | ||
if ((0, validate_npm_package_name_1.default)(alias).validForOldPackages) { | ||
return { | ||
@@ -19,3 +22,3 @@ alias, | ||
} | ||
if (validateNpmPackageName(rawWantedDependency).validForOldPackages) { | ||
if ((0, validate_npm_package_name_1.default)(rawWantedDependency).validForOldPackages) { | ||
return { | ||
@@ -22,0 +25,0 @@ alias: rawWantedDependency, |
{ | ||
"name": "@pnpm/parse-wanted-dependency", | ||
"description": "Parse dependency specifier", | ||
"version": "1.0.0", | ||
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"!*.map" | ||
], | ||
"devDependencies": { | ||
"@pnpm/parse-wanted-dependency": "link:", | ||
"@types/validate-npm-package-name": "3.0.0" | ||
}, | ||
"keywords": [], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=10.13" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/parse-wanted-dependency", | ||
"scripts": { | ||
"test": "pnpm run compile", | ||
"lint": "tslint -c ../../tslint.json --project .", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build" | ||
}, | ||
"dependencies": { | ||
"validate-npm-package-name": "3.0.0" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/parse-wanted-dependency#readme" | ||
"name": "@pnpm/parse-wanted-dependency", | ||
"description": "Parse dependency specifier", | ||
"version": "2.0.0", | ||
"bugs": { | ||
"url": "https://github.com/pnpm/pnpm/issues" | ||
}, | ||
"main": "lib/index.js", | ||
"typings": "lib/index.d.ts", | ||
"files": [ | ||
"lib", | ||
"!*.map" | ||
], | ||
"devDependencies": { | ||
"@types/validate-npm-package-name": "^3.0.2" | ||
}, | ||
"keywords": [], | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=12.17" | ||
}, | ||
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/parse-wanted-dependency", | ||
"scripts": { | ||
"test": "pnpm run compile", | ||
"lint": "eslint -c ../../eslint.json src/**/*.ts", | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix" | ||
}, | ||
"dependencies": { | ||
"validate-npm-package-name": "3.0.0" | ||
}, | ||
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/parse-wanted-dependency#readme", | ||
"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
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
3958
1
6
36
1