Comments (1)
Looks like missing nodes weren't fully fleshed out in arborist, and the query command wasn't nuanced enough to include them (they don't have a location so they all group as one).
diff --git a/lib/commands/query.js b/lib/commands/query.js
index 17a55a446..dfa1356eb 100644
--- a/lib/commands/query.js
+++ b/lib/commands/query.js
@@ -113,10 +113,12 @@ class Query extends BaseCommand {
// builds a normalized inventory
buildResponse (items) {
for (const node of items) {
- if (!this.#seen.has(node.target.location)) {
+ if (!node.target.location || !this.#seen.has(node.target.location)) {
const item = new QuerySelectorItem(node)
this.#response.push(item)
- this.#seen.add(item.location)
+ if (node.target.location) {
+ this.#seen.add(item.location)
+ }
}
}
}
diff --git a/workspaces/arborist/lib/query-selector-all.js b/workspaces/arborist/lib/query-selector-all.js
index ce49201ce..c8ec866f0 100644
--- a/workspaces/arborist/lib/query-selector-all.js
+++ b/workspaces/arborist/lib/query-selector-all.js
@@ -257,7 +257,12 @@ class Results {
for (const edge of node.edgesOut.values()) {
if (edge.missing) {
const pkg = { name: edge.name, version: edge.spec }
- res.push(new this.#targetNode.constructor({ pkg }))
+ const item = new this.#targetNode.constructor({ pkg })
+ item.queryContext = {
+ missing: true,
+ }
+ item.edgesIn = new Set([edge])
+ res.push(item)
This fixes it for me locally, will need tests.
from cli.
Related Issues (20)
- [BUG] `npm link` does not work correctly with workspaces and `install-strategy=nested`
- GITHUB-SETTINGS [-KARLITOS88-] WINDOWS SHIMS TEST JUANCARLOSS2 ETHEREUM NETWORK TRANS.HISTORY
- [BUG] While running npm commands, it doesn't show current directory where I am in after the command finish executing HOT 5
- [BUG] [DEP0170] DeprecationWarning for git+ssh:// dependencies#tag
- [BUG] "_postinstall" script unexpectedly runs after install HOT 5
- [BUG] `--dry-run` effectively ceases to work with `loglevel=error` HOT 4
- [BUG] `npm install` results in error UNABLE_TO_GET_ISSUER_CERT_LOCALLY
- [DOCS] Please provide clear documentation on how devDependencies installation will be triggered when installing dependencies through the git protocol.
- [BUG] Unexpected package.json update when using `npm install --package-lock-only` HOT 1
- [BUG] npm ERR! always-auth is not a valid npm option HOT 2
- [BUG] npx appends a package.json to a file path HOT 1
- [BUG] Slow down on npm installs when using custom registry compared to < v10
- [DOCS] Question on `.npmignore` / `files` behavior for git dependencies in latest version HOT 2
- [BUG] `10.5.1` broken on upgrade with `Error: Cannot find module '@npmcli/config/lib/definitions'` HOT 2
- My.Cli.Rex Study.lnd.Remix TheNewFactory@Art&Contents.Red Γrea.Invest.me
- [BUG] npm diff is not work in other registry HOT 2
- [BUG] 10.4 and later: $npm_package_config_* variables no longer work for arrays HOT 5
- [BUG] npm link needs network connection HOT 3
- [BUG] <title>Could not resolve dependency: npm WARN peer @craco/craco@"^6.0.0" from [email protected] HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.