Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/parse-wanted-dependency

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/parse-wanted-dependency - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

CHANGELOG.md

4

lib/index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc