Skip to content

Commit

Permalink
feat(query): display queryContext in results
Browse files Browse the repository at this point in the history
  • Loading branch information
nlf committed Sep 20, 2022
1 parent 2c7a224 commit d33ec32
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/commands/query.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class QuerySelectorItem {
this.inBundle = node.target.inBundle
this.deduped = this.from.length > 1
this.overridden = node.overridden
this.queryContext = node.queryContext
for (const edge of node.target.edgesIn) {
this.from.push(edge.from.location)
}
Expand Down Expand Up @@ -63,7 +64,7 @@ class Query extends BaseCommand {
}
const arb = new Arborist(opts)
const tree = await arb.loadActual(opts)
const items = await tree.querySelectorAll(args[0])
const items = await tree.querySelectorAll(args[0], this.npm.flatOptions)
this.buildResponse(items)

this.npm.output(this.parsedResponse)
Expand All @@ -84,7 +85,7 @@ class Query extends BaseCommand {
items = await tree.querySelectorAll(args[0])
} else {
const [workspace] = await tree.querySelectorAll(`.workspace:path(${workspacePath})`)
items = await workspace.target.querySelectorAll(args[0])
items = await workspace.target.querySelectorAll(args[0], this.npm.flatOptions)
}
this.buildResponse(items)
}
Expand Down

0 comments on commit d33ec32

Please sign in to comment.