Socket
Socket
Sign inDemoInstall

@pnpm/directory-fetcher

Package Overview
Dependencies
Maintainers
2
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/directory-fetcher - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

9

lib/index.js

@@ -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

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