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 4.0.0 to 5.0.0

5

lib/index.d.ts

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

store: string;
virtualStoreDir: string;
}
export declare function read(virtualStoreDir: string): Promise<Modules | null>;
export declare function write(virtualStoreDir: string, modules: Modules & {
export declare function read(modulesDir: string): Promise<Modules | null>;
export declare function write(modulesDir: string, modules: Modules & {
registries: Registries;
}): Promise<void>;

14

lib/index.js

@@ -9,6 +9,10 @@ "use strict";

const MODULES_FILENAME = '.modules.yaml';
async function read(virtualStoreDir) {
const modulesYamlPath = path.join(virtualStoreDir, MODULES_FILENAME);
async function read(modulesDir) {
const modulesYamlPath = path.join(modulesDir, MODULES_FILENAME);
try {
return await read_yaml_file_1.default(modulesYamlPath);
const modules = await read_yaml_file_1.default(modulesYamlPath);
if (!modules.virtualStoreDir) {
modules.virtualStoreDir = path.join(modulesDir, '.pnpm');
}
return modules;
}

@@ -24,4 +28,4 @@ catch (err) {

const YAML_OPTS = { sortKeys: true };
function write(virtualStoreDir, modules) {
const modulesYamlPath = path.join(virtualStoreDir, MODULES_FILENAME);
function write(modulesDir, modules) {
const modulesYamlPath = path.join(modulesDir, MODULES_FILENAME);
if (modules.skipped)

@@ -28,0 +32,0 @@ modules.skipped.sort();

{
"name": "@pnpm/modules-yaml",
"version": "4.0.0",
"version": "5.0.0",
"description": "Reads/writes `node_modules/.modules.yaml`",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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