@pnpm/directory-fetcher
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -8,4 +8,4 @@ "use strict"; | ||
const path_1 = __importDefault(require("path")); | ||
const read_project_manifest_1 = require("@pnpm/read-project-manifest"); | ||
const fromPairs_1 = __importDefault(require("ramda/src/fromPairs")); | ||
const load_json_file_1 = __importDefault(require("load-json-file")); | ||
const npm_packlist_1 = __importDefault(require("npm-packlist")); | ||
@@ -21,6 +21,11 @@ exports.default = () => { | ||
async function fetchFromDir(dir, opts) { | ||
var _a; | ||
const files = await (0, npm_packlist_1.default)({ path: dir }); | ||
const filesIndex = (0, fromPairs_1.default)(files.map((file) => [file, path_1.default.join(dir, file)])); | ||
if (opts.manifest) { | ||
opts.manifest.resolve(await (0, load_json_file_1.default)(path_1.default.join(dir, 'package.json'))); | ||
// In a regular pnpm workspace it will probably never happen that a dependency has no package.json file. | ||
// Safe read was added to support the Bit workspace in which the components have no package.json files. | ||
// Related PR in Bit: https://github.com/teambit/bit/pull/5251 | ||
const manifest = (_a = await (0, read_project_manifest_1.safeReadProjectManifestOnly)(dir)) !== null && _a !== void 0 ? _a : {}; | ||
opts.manifest.resolve(manifest); // eslint-disable-line @typescript-eslint/no-explicit-any | ||
} | ||
@@ -27,0 +32,0 @@ return { |
{ | ||
"name": "@pnpm/directory-fetcher", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "A fetcher for local directory packages", | ||
@@ -27,8 +27,12 @@ "funding": "https://opencollective.com/pnpm", | ||
"dependencies": { | ||
"@pnpm/fetcher-base": "11.1.4", | ||
"@pnpm/resolver-base": "8.1.4", | ||
"load-json-file": "^6.2.0", | ||
"npm-packlist": "^2.2.2", | ||
"@pnpm/fetcher-base": "11.1.5", | ||
"@pnpm/read-project-manifest": "2.0.11", | ||
"@pnpm/resolver-base": "8.1.5", | ||
"npm-packlist": "^3.0.0", | ||
"ramda": "^0.27.1" | ||
}, | ||
"devDependencies": { | ||
"@pnpm/directory-fetcher": "1.0.5", | ||
"@pnpm/test-fixtures": "0.0.2" | ||
}, | ||
"scripts": { | ||
@@ -40,3 +44,3 @@ "_test": "jest", | ||
}, | ||
"readme": "# @pnpm/directory-fetcher\n\n> Fetcher for local directory packages\n\n[![npm version](https://img.shields.io/npm/v/@pnpm/directory-fetcher.svg)](https://www.npmjs.com/package/@pnpm/directory-fetcher)\n\n## Installation\n\n```\n<pnpm|npm|yarn> add @pnpm/directory-fetcher\n```\n\n## License\n\nMIT\n" | ||
"readme": "# @pnpm/directory-fetcher\n\n> Fetcher for local directory packages\n\n[![npm version](https://img.shields.io/npm/v/@pnpm/directory-fetcher.svg)](https://www.npmjs.com/package/@pnpm/directory-fetcher)\n\n## Installation\n\n```\npnpm add @pnpm/directory-fetcher\n```\n\n## License\n\nMIT\n" | ||
} |
@@ -10,3 +10,3 @@ # @pnpm/directory-fetcher | ||
``` | ||
<pnpm|npm|yarn> add @pnpm/directory-fetcher | ||
pnpm add @pnpm/directory-fetcher | ||
``` | ||
@@ -13,0 +13,0 @@ |
Sorry, the diff of this file is not supported yet
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
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
6346
55
2
+ Added@pnpm/error@2.0.0(transitive)
+ Added@pnpm/fetcher-base@11.1.5(transitive)
+ Added@pnpm/graceful-fs@1.0.0(transitive)
+ Added@pnpm/read-project-manifest@2.0.11(transitive)
+ Added@pnpm/resolver-base@8.1.5(transitive)
+ Added@pnpm/types@7.9.0(transitive)
+ Added@pnpm/write-project-manifest@2.0.10(transitive)
+ Addedargparse@2.0.1(transitive)
+ Addeddetect-indent@6.1.0(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedignore-walk@4.0.1(transitive)
+ Addedimurmurhash@0.1.4(transitive)
+ Addedis-plain-obj@2.1.0(transitive)
+ Addedis-typedarray@1.0.0(transitive)
+ Addedis-windows@1.0.2(transitive)
+ Addedjs-yaml@4.1.0(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addednpm-packlist@3.0.0(transitive)
+ Addedread-yaml-file@2.1.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedsort-keys@4.2.0(transitive)
+ Addedtypedarray-to-buffer@3.1.5(transitive)
+ Addedwrite-file-atomic@3.0.3(transitive)
+ Addedwrite-yaml-file@4.2.0(transitive)
- Removedload-json-file@^6.2.0
- Removed@pnpm/fetcher-base@11.1.4(transitive)
- Removed@pnpm/resolver-base@8.1.4(transitive)
- Removed@pnpm/types@7.8.0(transitive)
- Removedignore-walk@3.0.4(transitive)
- Removedload-json-file@6.2.0(transitive)
- Removednpm-packlist@2.2.2(transitive)
- Removedtype-fest@0.6.0(transitive)
Updated@pnpm/fetcher-base@11.1.5
Updated@pnpm/resolver-base@8.1.5
Updatednpm-packlist@^3.0.0