Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/@npmcli/query/lib/index.js')
-rw-r--r--node_modules/@npmcli/query/lib/index.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/node_modules/@npmcli/query/lib/index.js b/node_modules/@npmcli/query/lib/index.js
index 44f539ee0..09cff0f59 100644
--- a/node_modules/@npmcli/query/lib/index.js
+++ b/node_modules/@npmcli/query/lib/index.js
@@ -168,6 +168,13 @@ const fixupPaths = astNode => {
astNode.nodes.length = 0
}
+const fixupOutdated = astNode => {
+ if (astNode.nodes.length) {
+ astNode.outdatedKind = String(astNode.nodes[0])
+ astNode.nodes.length = 0
+ }
+}
+
// a few of the supported ast nodes need to be tweaked in order to properly be
// interpreted as proper arborist query selectors, namely semver ranges from
// both ids and :semver pseudo-class selectors need to be translated from what
@@ -196,6 +203,8 @@ const transformAst = selector => {
return fixupSemverSpecs(nextAstNode)
case ':type':
return fixupTypes(nextAstNode)
+ case ':outdated':
+ return fixupOutdated(nextAstNode)
}
})
}