MCPcopy Create free account
hub / github.com/npm/cli / hasNonRegistryShape

Function hasNonRegistryShape

workspaces/arborist/lib/install-scripts.js:34–42  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

32// behaviour is correct for its boundary; the two helpers must not be
33// merged.
34const hasNonRegistryShape = (node) => {
35 if (typeof node.isRegistryDependency === 'boolean') {
36 return !node.isRegistryDependency
37 }
38 if (!node.resolved) {
39 return false
40 }
41 return !/^https?:\/\/[^/]+\/.+\/-\/[^/]+-\d/.test(node.resolved)
42}
43
44const getInstallScripts = async (node) => {
45 /* istanbul ignore next: arborist Nodes always carry a `package` object;

Callers 1

getInstallScriptsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected