diff options
Diffstat (limited to 'node_modules/@npmcli/query/lib')
-rw-r--r-- | node_modules/@npmcli/query/lib/index.js | 9 |
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) } }) } |