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

@pnpm/write-project-manifest

Package Overview
Dependencies
Maintainers
3
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

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

Comparing version 1.1.7 to 2.0.0

11

CHANGELOG.md
# @pnpm/write-project-manifest
## 2.0.0
### Major Changes
- 97b986fbc: Node.js 10 support is dropped. At least Node.js 12.17 is required for the package to work.
### Patch Changes
- Updated dependencies [97b986fbc]
- @pnpm/types@7.0.0
## 1.1.7

@@ -4,0 +15,0 @@

21

lib/index.js
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const path = require("path");
const JSON5 = require("json5");
const fs = require("mz/fs");
const writeFileAtomic = require("write-file-atomic");
const writeYamlFile = require("write-yaml-file");
const fs_1 = require("fs");
const path_1 = __importDefault(require("path"));
const json5_1 = __importDefault(require("json5"));
const write_file_atomic_1 = __importDefault(require("write-file-atomic"));
const write_yaml_file_1 = __importDefault(require("write-yaml-file"));
const YAML_FORMAT = {

@@ -16,11 +19,11 @@ noCompatMode: true,

if (fileType === 'yaml') {
return writeYamlFile(filePath, manifest, YAML_FORMAT);
return (0, write_yaml_file_1.default)(filePath, manifest, YAML_FORMAT);
}
await fs.mkdir(path.dirname(filePath), { recursive: true });
await fs_1.promises.mkdir(path_1.default.dirname(filePath), { recursive: true });
const trailingNewline = (opts === null || opts === void 0 ? void 0 : opts.insertFinalNewline) === false ? '' : '\n';
const json = (fileType === 'json5' ? JSON5 : JSON)
const json = (fileType === 'json5' ? json5_1.default : JSON)
.stringify(manifest, undefined, (_a = opts === null || opts === void 0 ? void 0 : opts.indent) !== null && _a !== void 0 ? _a : '\t');
return writeFileAtomic(filePath, `${json}${trailingNewline}`);
return (0, write_file_atomic_1.default)(filePath, `${json}${trailingNewline}`);
}
exports.default = writeProjectManifest;
//# sourceMappingURL=index.js.map
{
"name": "@pnpm/write-project-manifest",
"version": "1.1.7",
"version": "2.0.0",
"description": "Write a project manifest (called package.json in most cases)",

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

"engines": {
"node": ">=10.16"
"node": ">=12.17"
},

@@ -20,3 +20,3 @@ "files": [

"prepublishOnly": "pnpm run compile",
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build"
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix"
},

@@ -27,3 +27,2 @@ "repository": "https://github.com/pnpm/pnpm/blob/master/packages/write-project-manifest",

],
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)",
"license": "MIT",

@@ -35,11 +34,9 @@ "bugs": {

"dependencies": {
"@pnpm/types": "6.4.0",
"@pnpm/types": "7.0.0",
"json5": "^2.1.3",
"mz": "^2.7.0",
"write-file-atomic": "^3.0.3",
"write-yaml-file": "^4.1.3"
"write-yaml-file": "^4.2.0"
},
"devDependencies": {
"@types/json5": "^0.0.30",
"@types/mz": "^2.7.3",
"@types/json5": "^2.2.0",
"@types/write-file-atomic": "^3.0.1",

@@ -46,0 +43,0 @@ "tempy": "^1.0.0"

@@ -19,3 +19,3 @@ # @pnpm/write-project-manifest

import writeProjectManifest from '@pnpm/write-project-manifest'
import path = require('path')
import path from 'path'

@@ -27,2 +27,2 @@ (async () => await writeProjectManifest(path.resolve('package.yaml'), { name: 'foo', version: '1.0.0' }))()

MIT © [Zoltan Kochan](https://www.kochan.io/)
MIT

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