@pnpm/write-project-manifest
Advanced tools
Comparing version 1.1.7 to 2.0.0
# @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 @@ |
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6006
4
3
32
1
2
+ Added@pnpm/types@7.0.0(transitive)
- Removedmz@^2.7.0
- Removed@pnpm/types@6.4.0(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedmz@2.7.0(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
Updated@pnpm/types@7.0.0
Updatedwrite-yaml-file@^4.2.0