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

@pnpm/modules-yaml

Package Overview
Dependencies
Maintainers
3
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/modules-yaml - npm Package Compare versions

Comparing version 3.0.3 to 4.0.0-0

10

lib/index.d.ts

@@ -6,10 +6,6 @@ import { DependenciesField, Registries } from '@pnpm/types';

export interface Modules {
importers: {
[id: string]: {
hoistedAliases: {
[depPath: string]: string[];
};
shamefullyFlatten: boolean;
};
hoistedAliases: {
[depPath: string]: string[];
};
hoistPattern?: string;
included: IncludedDependencies;

@@ -16,0 +12,0 @@ independentLeaves: boolean;

@@ -12,21 +12,3 @@ "use strict";

try {
const m = await read_yaml_file_1.default(modulesYamlPath);
// for backward compatibility
// tslint:disable:no-string-literal
if (m['storePath']) {
m.store = m['storePath'];
delete m['storePath'];
}
if (!m.importers) {
m.importers = {
'.': {
hoistedAliases: m['hoistedAliases'],
shamefullyFlatten: m['shamefullyFlatten'],
},
};
delete m['hoistedAliases'];
delete m['shamefullyFlatten'];
}
// tslint:enable:no-string-literal
return m;
return await read_yaml_file_1.default(modulesYamlPath);
}

@@ -44,14 +26,11 @@ catch (err) {

const modulesYamlPath = path.join(virtualStoreDir, MODULES_FILENAME);
if (modules['skipped'])
modules['skipped'].sort(); // tslint:disable-line:no-string-literal
return writeYamlFile(modulesYamlPath, normalizeModules(modules), YAML_OPTS);
if (modules.skipped)
modules.skipped.sort();
if (!modules.hoistPattern) {
// Because the YAML writer fails on undefined fields
delete modules.hoistPattern;
delete modules.hoistedAliases;
}
return writeYamlFile(modulesYamlPath, modules, YAML_OPTS);
}
exports.write = write;
function normalizeModules(m) {
const normalized = Object.assign({}, m);
if (Object.keys(m.importers).length === 1 && m.importers['.']) {
Object.assign(normalized, m.importers['.']);
delete normalized.importers;
}
return normalized;
}
{
"name": "@pnpm/modules-yaml",
"version": "3.0.3",
"description": "Reads/writes `node_modules/.modules.yaml`",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib"
],
"engines": {
"node": ">=8.15"
},
"scripts": {
"lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts",
"tsc": "rimraf lib && tsc",
"test": "pnpm run tsc && pnpm run lint && ts-node test --type-check",
"prepublishOnly": "pnpm run tsc",
"fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix"
},
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/modules-yaml",
"keywords": [
"pnpm",
"modules.yaml"
],
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/modules-yaml#readme",
"dependencies": {
"@pnpm/types": "3.2.0",
"read-yaml-file": "1.1.0",
"write-yaml-file": "3.0.1"
},
"devDependencies": {
"@pnpm/modules-yaml": "3.0.3",
"rimraf": "2.6.3",
"tape": "4.10.2",
"tempy": "0.3.0",
"ts-node": "8.2.0",
"tslint": "5.17.0",
"typescript": "3.4.5"
}
"name": "@pnpm/modules-yaml",
"version": "4.0.0-0",
"description": "Reads/writes `node_modules/.modules.yaml`",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib"
],
"engines": {
"node": ">=8.15"
},
"scripts": {
"lint": "tslint -c tslint.json src/**/*.ts test/**/*.ts",
"tsc": "rimraf lib && tsc",
"test": "pnpm run tsc && pnpm run lint && ts-node test --type-check",
"prepublishOnly": "pnpm run tsc",
"fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix"
},
"repository": "https://github.com/pnpm/pnpm/blob/master/packages/modules-yaml",
"keywords": [
"pnpm",
"modules.yaml"
],
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",
"license": "MIT",
"bugs": {
"url": "https://github.com/pnpm/pnpm/issues"
},
"homepage": "https://github.com/pnpm/pnpm/blob/master/packages/modules-yaml#readme",
"dependencies": {
"@pnpm/types": "3.2.0",
"read-yaml-file": "1.1.0",
"write-yaml-file": "3.0.1"
},
"devDependencies": {
"@pnpm/modules-yaml": "link:",
"rimraf": "3.0.0",
"tape": "4.11.0",
"tempy": "0.3.0"
}
}
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