Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config tweaks #7574

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ graph LR;
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
npmcli-config-->npmcli-mock-globals["@npmcli/mock-globals"];
npmcli-config-->npmcli-package-json["@npmcli/package-json"];
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
npmcli-config-->proc-log;
npmcli-config-->read-package-json-fast;
npmcli-config-->semver;
npmcli-docs-->ignore-walk;
npmcli-docs-->npmcli-eslint-config["@npmcli/eslint-config"];
Expand Down Expand Up @@ -622,9 +622,9 @@ graph LR;
npmcli-config-->npmcli-eslint-config["@npmcli/eslint-config"];
npmcli-config-->npmcli-map-workspaces["@npmcli/map-workspaces"];
npmcli-config-->npmcli-mock-globals["@npmcli/mock-globals"];
npmcli-config-->npmcli-package-json["@npmcli/package-json"];
npmcli-config-->npmcli-template-oss["@npmcli/template-oss"];
npmcli-config-->proc-log;
npmcli-config-->read-package-json-fast;
npmcli-config-->semver;
npmcli-config-->tap;
npmcli-config-->walk-up-path;
Expand Down Expand Up @@ -797,9 +797,9 @@ packages higher up the chain.
- @npmcli/arborist
- @npmcli/metavuln-calculator
- pacote, libnpmversion
- @npmcli/run-script, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, init-package-json, npm-profile
- @npmcli/run-script, @npmcli/config, libnpmhook, libnpmorg, libnpmsearch, libnpmteam, init-package-json, npm-profile
- @npmcli/package-json, npm-registry-fetch
- @npmcli/git, make-fetch-happen, @npmcli/config
- @npmcli/git, make-fetch-happen
- @npmcli/installed-package-contents, @npmcli/map-workspaces, cacache, npm-pick-manifest, promzard
- @npmcli/docs, @npmcli/fs, npm-bundled, read-package-json-fast, unique-filename, npm-install-checks, npm-package-arg, normalize-package-data, npm-packlist, bin-links, nopt, parse-conflict-json, @npmcli/mock-globals, read
- @npmcli/eslint-config, @npmcli/template-oss, ignore-walk, semver, npm-normalize-package-bin, @npmcli/name-from-folder, json-parse-even-better-errors, fs-minipass, ssri, unique-slug, @npmcli/promise-spawn, hosted-git-info, proc-log, validate-npm-package-name, @npmcli/node-gyp, @npmcli/redact, @npmcli/agent, minipass-fetch, @npmcli/query, cmd-shim, read-cmd-shim, write-file-atomic, abbrev, proggy, minify-registry-metadata, ini, mute-stream, npm-audit-report, npm-user-validate
2 changes: 1 addition & 1 deletion package-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -15874,11 +15874,11 @@
"license": "ISC",
"dependencies": {
"@npmcli/map-workspaces": "^3.0.2",
"@npmcli/package-json": "^5.1.1",
"ci-info": "^4.0.0",
"ini": "^4.1.2",
"nopt": "^7.2.1",
"proc-log": "^4.2.0",
"read-package-json-fast": "^3.0.2",
"semver": "^7.3.5",
"walk-up-path": "^3.0.1"
},
Expand Down
6 changes: 3 additions & 3 deletions workspaces/config/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -669,12 +669,12 @@ class Config {
}

if (this.localPrefix && hasPackageJson) {
const rpj = require('read-package-json-fast')
const pkgJson = require('@npmcli/package-json')
// if we already set localPrefix but this dir has a package.json
// then we need to see if `p` is a workspace root by reading its package.json
// however, if reading it fails then we should just move on
const pkg = await rpj(resolve(p, 'package.json')).catch(() => false)
if (!pkg) {
const { content: pkg } = await pkgJson.normalize(p).catch(() => ({ content: {} }))
if (!pkg?.workspaces) {
continue
}

Expand Down
2 changes: 1 addition & 1 deletion workspaces/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
},
"dependencies": {
"@npmcli/map-workspaces": "^3.0.2",
"@npmcli/package-json": "^5.1.1",
"ci-info": "^4.0.0",
"ini": "^4.1.2",
"nopt": "^7.2.1",
"proc-log": "^4.2.0",
"read-package-json-fast": "^3.0.2",
"semver": "^7.3.5",
"walk-up-path": "^3.0.1"
},
Expand Down
Loading