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

@pnpm/read-project-manifest

Package Overview
Dependencies
Maintainers
2
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/read-project-manifest - npm Package Compare versions

Comparing version 4.0.2 to 4.1.0

2

lib/index.d.ts
import { ProjectManifest } from '@pnpm/types';
declare type WriteProjectManifest = (manifest: ProjectManifest, force?: boolean) => Promise<void>;
type WriteProjectManifest = (manifest: ProjectManifest, force?: boolean) => Promise<void>;
export declare function safeReadProjectManifestOnly(projectDir: string): Promise<ProjectManifest | null>;

@@ -4,0 +4,0 @@ export declare function readProjectManifest(projectDir: string): Promise<{

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

const error_1 = require("@pnpm/error");
const text_comments_parser_1 = require("@pnpm/text.comments-parser");
const write_project_manifest_1 = require("@pnpm/write-project-manifest");
const read_yaml_file_1 = __importDefault(require("read-yaml-file"));
const detect_indent_1 = __importDefault(require("detect-indent"));
const detect_indent_1 = __importDefault(require("@gwhitney/detect-indent"));
const fast_deep_equal_1 = __importDefault(require("fast-deep-equal"));

@@ -68,3 +69,3 @@ const is_windows_1 = __importDefault(require("is-windows"));

writeProjectManifest: createManifestWriter({
...detectFileFormatting(text),
...detectFileFormattingAndComments(text),
initialManifest: data,

@@ -115,2 +116,10 @@ manifestPath,

exports.tryReadProjectManifest = tryReadProjectManifest;
function detectFileFormattingAndComments(text) {
const { comments, text: newText, hasFinalNewline } = (0, text_comments_parser_1.extractComments)(text);
return {
comments,
indent: (0, detect_indent_1.default)(newText).indent,
insertFinalNewline: hasFinalNewline,
};
}
function detectFileFormatting(text) {

@@ -141,3 +150,3 @@ return {

writeProjectManifest: createManifestWriter({
...detectFileFormatting(text),
...detectFileFormattingAndComments(text),
initialManifest: data,

@@ -177,2 +186,3 @@ manifestPath,

await (0, write_project_manifest_1.writeProjectManifest)(opts.manifestPath, updatedManifest, {
comments: opts.comments,
indent: opts.indent,

@@ -179,0 +189,0 @@ insertFinalNewline: opts.insertFinalNewline,

{
"name": "@pnpm/read-project-manifest",
"version": "4.0.2",
"version": "4.1.0",
"description": "Read a project manifest (called package.json in most cases)",

@@ -14,3 +14,3 @@ "main": "lib/index.js",

],
"repository": "https://github.com/pnpm/pnpm/blob/main/packages/read-project-manifest",
"repository": "https://github.com/pnpm/pnpm/blob/main/pkg-manifest/read-project-manifest",
"keywords": [

@@ -24,9 +24,5 @@ "pnpm7",

},
"homepage": "https://github.com/pnpm/pnpm/blob/main/packages/read-project-manifest#readme",
"homepage": "https://github.com/pnpm/pnpm/blob/main/pkg-manifest/read-project-manifest#readme",
"dependencies": {
"@pnpm/error": "4.0.0",
"@pnpm/graceful-fs": "2.0.0",
"@pnpm/types": "8.9.0",
"@pnpm/write-project-manifest": "4.0.2",
"detect-indent": "^6.1.0",
"@gwhitney/detect-indent": "7.0.1",
"fast-deep-equal": "^3.1.3",

@@ -38,9 +34,14 @@ "is-windows": "^1.0.2",

"sort-keys": "^4.2.0",
"strip-bom": "^4.0.0"
"strip-bom": "^4.0.0",
"@pnpm/error": "4.0.0",
"@pnpm/graceful-fs": "2.0.0",
"@pnpm/text.comments-parser": "1.0.0",
"@pnpm/types": "8.9.0",
"@pnpm/write-project-manifest": "4.1.0"
},
"devDependencies": {
"@pnpm/read-project-manifest": "4.0.2",
"@types/is-windows": "^1.0.0",
"@types/parse-json": "^4.0.0",
"tempy": "^1.0.1"
"tempy": "^1.0.1",
"@pnpm/read-project-manifest": "4.1.0"
},

@@ -47,0 +48,0 @@ "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