@pnpm/exportable-manifest
Advanced tools
Comparing version 1.2.2 to 2.0.0
# @pnpm/exportable-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/error@2.0.0 | ||
- @pnpm/read-project-manifest@2.0.0 | ||
- @pnpm/types@7.0.0 | ||
## 1.2.2 | ||
@@ -4,0 +17,0 @@ |
import { ProjectManifest } from '@pnpm/types'; | ||
export default function makePublishManifest(dir: string, originalManifest: ProjectManifest): Promise<Pick<ProjectManifest, "optionalDependencies" | "dependencies" | "devDependencies" | "private" | "name" | "version" | "bin" | "description" | "directories" | "peerDependencies" | "peerDependenciesMeta" | "bundleDependencies" | "bundledDependencies" | "homepage" | "repository" | "scripts" | "config" | "engines" | "cpu" | "os" | "main" | "module" | "typings" | "types" | "publishConfig" | "resolutions">>; | ||
export default function makePublishManifest(dir: string, originalManifest: ProjectManifest): Promise<Omit<ProjectManifest, "pnpm">>; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,6 +25,6 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const path_1 = __importDefault(require("path")); | ||
const error_1 = __importDefault(require("@pnpm/error")); | ||
const read_project_manifest_1 = require("@pnpm/read-project-manifest"); | ||
const path = require("path"); | ||
const R = require("ramda"); | ||
const R = __importStar(require("ramda")); | ||
// property keys that are copied from publishConfig into the manifest | ||
@@ -31,3 +50,3 @@ const PUBLISH_CONFIG_WHITELIST = new Set([ | ||
const deps = await makePublishDependencies(dir, originalManifest[depsField]); | ||
if (deps) { | ||
if (deps != null) { | ||
publishManifest[depsField] = deps; | ||
@@ -37,3 +56,3 @@ } | ||
const { publishConfig } = originalManifest; | ||
if (publishConfig) { | ||
if (publishConfig != null) { | ||
Object.keys(publishConfig) | ||
@@ -49,3 +68,3 @@ .filter(key => PUBLISH_CONFIG_WHITELIST.has(key)) | ||
async function makePublishDependencies(dir, dependencies) { | ||
if (!dependencies) | ||
if (dependencies == null) | ||
return dependencies; | ||
@@ -64,4 +83,4 @@ const publishDependencies = R.fromPairs(await Promise.all(Object.entries(dependencies) | ||
if (depSpec === 'workspace:*' || depSpec.endsWith('@*')) { | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path.join(dir, 'node_modules', depName)); | ||
if (!manifest || !manifest.version) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(path_1.default.join(dir, 'node_modules', depName)); | ||
if ((manifest == null) || !manifest.version) { | ||
throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + | ||
@@ -76,4 +95,4 @@ 'because this dependency is not installed. Try running "pnpm install".'); | ||
if (depSpec.startsWith('workspace:./') || depSpec.startsWith('workspace:../')) { | ||
const { manifest } = await read_project_manifest_1.tryReadProjectManifest(path.join(dir, depSpec.substr(10))); | ||
if (!manifest || !manifest.name || !manifest.version) { | ||
const { manifest } = await (0, read_project_manifest_1.tryReadProjectManifest)(path_1.default.join(dir, depSpec.substr(10))); | ||
if ((manifest == null) || !manifest.name || !manifest.version) { | ||
throw new error_1.default('CANNOT_RESOLVE_WORKSPACE_PROTOCOL', `Cannot resolve workspace protocol of dependency "${depName}" ` + | ||
@@ -80,0 +99,0 @@ 'because this dependency is not installed. Try running "pnpm install".'); |
{ | ||
"name": "@pnpm/exportable-manifest", | ||
"version": "1.2.2", | ||
"version": "2.0.0", | ||
"description": "Creates an exportable manifest", | ||
@@ -12,3 +12,3 @@ "main": "lib/index.js", | ||
"engines": { | ||
"node": ">=10.16" | ||
"node": ">=12.17" | ||
}, | ||
@@ -19,3 +19,3 @@ "scripts": { | ||
"prepublishOnly": "pnpm run compile", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build", | ||
"compile": "rimraf lib tsconfig.tsbuildinfo && tsc --build && pnpm run lint -- --fix", | ||
"_test": "jest" | ||
@@ -27,3 +27,2 @@ }, | ||
], | ||
"author": "Zoltan Kochan <z@kochan.io> (https://www.kochan.io/)", | ||
"license": "MIT", | ||
@@ -38,5 +37,5 @@ "bugs": { | ||
"dependencies": { | ||
"@pnpm/error": "1.4.0", | ||
"@pnpm/read-project-manifest": "1.1.7", | ||
"@pnpm/types": "6.4.0", | ||
"@pnpm/error": "2.0.0", | ||
"@pnpm/read-project-manifest": "2.0.0", | ||
"@pnpm/types": "7.0.0", | ||
"ramda": "^0.27.1" | ||
@@ -43,0 +42,0 @@ }, |
@@ -15,2 +15,2 @@ # @pnpm/exportable-manifest | ||
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
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
9020
106
1
+ Added@pnpm/error@2.0.0(transitive)
+ Added@pnpm/read-project-manifest@2.0.0(transitive)
+ Added@pnpm/types@7.0.0(transitive)
+ Added@pnpm/write-project-manifest@2.0.0(transitive)
- Removed@pnpm/error@1.4.0(transitive)
- Removed@pnpm/read-project-manifest@1.1.7(transitive)
- Removed@pnpm/types@6.4.0(transitive)
- Removed@pnpm/write-project-manifest@1.1.7(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedgraceful-fs@4.2.4(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/error@2.0.0
Updated@pnpm/types@7.0.0