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

@yarnpkg/core

Package Overview
Dependencies
Maintainers
5
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yarnpkg/core - npm Package Compare versions

Comparing version 2.0.0-rc.21 to 2.0.0-rc.22

lib/CorePlugin.d.ts

1

lib/Configuration.d.ts

@@ -46,2 +46,3 @@ /// <reference types="node" />

valueDefinition: SettingsDefinitionNoDefault;
normalizeKeys?: (key: string) => string;
};

@@ -48,0 +49,0 @@ export declare type SimpleSettingsDefinition = BaseSettingsDefinition<Exclude<SettingsType, SettingsType.SHAPE | SettingsType.MAP>> & {

10

lib/Configuration.js

@@ -22,2 +22,3 @@ "use strict";

const tmp_1 = require("tmp");
const CorePlugin_1 = require("./CorePlugin");
const Manifest_1 = require("./Manifest");

@@ -374,7 +375,8 @@ const MultiFetcher_1 = require("./MultiFetcher");

for (const [propKey, propValue] of Object.entries(value)) {
const subPath = `${path}['${propKey}']`;
const normalizedKey = definition.normalizeKeys ? definition.normalizeKeys(propKey) : propKey;
const subPath = `${path}['${normalizedKey}']`;
// @ts-ignore: SettingsDefinitionNoDefault has ... no default ... but
// that's fine because we're guaranteed it's not undefined.
const valueDefinition = definition.valueDefinition;
result.set(propKey, parseValue(configuration, subPath, propValue, valueDefinition, folder));
result.set(normalizedKey, parseValue(configuration, subPath, propValue, valueDefinition, folder));
}

@@ -508,3 +510,5 @@ return result;

const rcFiles = await Configuration.findRcFiles(startingCwd);
const plugins = new Map();
const plugins = new Map([
[`@@core`, CorePlugin_1.CorePlugin],
]);
const interop = (obj) => obj.__esModule ? obj.default : obj;

@@ -511,0 +515,0 @@ if (pluginConfiguration !== null) {

@@ -29,2 +29,3 @@ import { FakeFS, Filename, PortablePath } from '@yarnpkg/fslib';

version: string | null;
type: string | null;
["private"]: boolean;

@@ -31,0 +32,0 @@ license: string | null;

@@ -27,2 +27,3 @@ "use strict";

this.version = null;
this.type = null;
this["private"] = false;

@@ -103,2 +104,4 @@ this.license = null;

this.version = data.version;
if (typeof data.type === `string`)
this.type = data.type;
if (typeof data.private === `boolean`)

@@ -414,2 +417,6 @@ this.private = data.private;

delete data.version;
if (this.type !== null)
data.type = this.type;
else
delete data.type;
if (this.private)

@@ -416,0 +423,0 @@ data.private = true;

@@ -9,3 +9,3 @@ /// <reference types="node" />

import { Project } from './Project';
import { Resolver } from './Resolver';
import { Resolver, ResolveOptions } from './Resolver';
import { Locator, Descriptor } from './types';

@@ -45,3 +45,6 @@ declare type ProcessEnvironment = {

globalHashGeneration?: (project: Project, contributeHash: (data: string | Buffer) => void) => Promise<void>;
reduceDependency?: (dependency: Descriptor, project: Project, locator: Locator, initialDependency: Descriptor) => Promise<Descriptor>;
reduceDependency?: (dependency: Descriptor, project: Project, locator: Locator, initialDependency: Descriptor, extra: {
resolver: Resolver;
resolveOptions: ResolveOptions;
}) => Promise<Descriptor>;
afterAllInstalled?: (project: Project) => void;

@@ -48,0 +51,0 @@ };

@@ -276,2 +276,7 @@ "use strict";

}
function hasParams(params) {
if (params === null)
return false;
return Object.entries(params).length > 0;
}
function makeRange({ protocol, source, selector, params }) {

@@ -284,3 +289,3 @@ let range = ``;

range += encodeUnsafeCharacters(selector);
if (params !== null)
if (hasParams(params))
range += `::${querystring_1.default.stringify(params)}`;

@@ -297,10 +302,4 @@ return range;

function convertToManifestRange(range) {
const { protocol, source, selector } = parseRange(range);
if (!source)
return range;
const queryIndex = source.indexOf(`?`);
if (queryIndex === -1)
return range;
const params = querystring_1.default.parse(source.slice(queryIndex + 1));
for (const name of Object.keys(params))
const { params, protocol, source, selector } = parseRange(range);
for (const name in params)
if (name.startsWith(`__`))

@@ -307,0 +306,0 @@ delete params[name];

{
"name": "@yarnpkg/core",
"version": "2.0.0-rc.21",
"version": "2.0.0-rc.22",
"main": "./lib/index.js",

@@ -12,7 +12,7 @@ "sideEffects": false,

"@yarnpkg/pnp": "^2.0.0-rc.16",
"@yarnpkg/shell": "^2.0.0-rc.7",
"@yarnpkg/shell": "^2.0.0-rc.8",
"camelcase": "^5.3.1",
"chalk": "^3.0.0",
"clipanion": "^2.1.5",
"cross-spawn": "^6.0.5",
"cross-spawn": "6.0.5",
"diff": "^4.0.1",

@@ -45,5 +45,5 @@ "globby": "^10.0.1",

"@types/tunnel": "^0.0.0",
"@yarnpkg/cli": "^2.0.0-rc.27",
"@yarnpkg/cli": "^2.0.0-rc.28",
"@yarnpkg/plugin-link": "^2.0.0-rc.11",
"@yarnpkg/plugin-pnp": "^2.0.0-rc.15"
"@yarnpkg/plugin-pnp": "^2.0.0-rc.16"
},

@@ -50,0 +50,0 @@ "scripts": {

Sorry, the diff of this file is too big to display

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