@npmcli/arborist
Advanced tools
Comparing version 7.5.2 to 7.5.3
#!/usr/bin/env node | ||
const fs = require('fs') | ||
const path = require('path') | ||
const fs = require('node:fs') | ||
const path = require('node:path') | ||
const { time } = require('proc-log') | ||
@@ -6,0 +6,0 @@ |
const { log } = require('proc-log') | ||
const fs = require('fs') | ||
const { dirname } = require('path') | ||
const os = require('os') | ||
const { inspect, format } = require('util') | ||
const fs = require('node:fs') | ||
const { dirname } = require('node:path') | ||
const os = require('node:os') | ||
const { inspect, format } = require('node:util') | ||
@@ -7,0 +7,0 @@ const { bin: options } = require('./options.js') |
const nopt = require('nopt') | ||
const path = require('path') | ||
const path = require('node:path') | ||
@@ -4,0 +4,0 @@ const has = (o, k) => Object.prototype.hasOwnProperty.call(o, k) |
@@ -1,4 +0,4 @@ | ||
const { inspect } = require('util') | ||
const { inspect } = require('node:util') | ||
const log = require('./logging.js') | ||
module.exports = tree => log.info(inspect(tree.toJSON(), { depth: Infinity })) |
@@ -9,6 +9,6 @@ // mixin implementing the buildIdealTree method | ||
const realpath = require('../../lib/realpath.js') | ||
const { resolve, dirname } = require('path') | ||
const { resolve, dirname } = require('node:path') | ||
const treeCheck = require('../tree-check.js') | ||
const { readdirScoped } = require('@npmcli/fs') | ||
const { lstat, readlink } = require('fs/promises') | ||
const { lstat, readlink } = require('node:fs/promises') | ||
const { depth } = require('treeverse') | ||
@@ -15,0 +15,0 @@ const { log, time } = require('proc-log') |
@@ -29,4 +29,4 @@ // The arborist manages three trees: | ||
const { resolve } = require('path') | ||
const { homedir } = require('os') | ||
const { resolve } = require('node:path') | ||
const { homedir } = require('node:os') | ||
const { depth } = require('treeverse') | ||
@@ -51,3 +51,3 @@ const mapWorkspaces = require('@npmcli/map-workspaces') | ||
const _setWorkspaces = Symbol.for('setWorkspaces') | ||
const Base = mixins.reduce((a, b) => b(a), require('events')) | ||
const Base = mixins.reduce((a, b) => b(a), require('node:events')) | ||
@@ -54,0 +54,0 @@ // if it's 1, 2, or 3, set it explicitly that. |
const _makeIdealGraph = Symbol('makeIdealGraph') | ||
const _createIsolatedTree = Symbol.for('createIsolatedTree') | ||
const _createBundledTree = Symbol('createBundledTree') | ||
const { mkdirSync } = require('fs') | ||
const { mkdirSync } = require('node:fs') | ||
const pacote = require('pacote') | ||
const { join } = require('path') | ||
const { join } = require('node:path') | ||
const { depth } = require('treeverse') | ||
const crypto = require('crypto') | ||
const crypto = require('node:crypto') | ||
@@ -10,0 +10,0 @@ // cache complicated function results |
// mix-in implementing the loadActual method | ||
const { relative, dirname, resolve, join, normalize } = require('path') | ||
const { relative, dirname, resolve, join, normalize } = require('node:path') | ||
@@ -5,0 +5,0 @@ const rpj = require('read-package-json-fast') |
// mixin providing the loadVirtual method | ||
const mapWorkspaces = require('@npmcli/map-workspaces') | ||
const { resolve } = require('path') | ||
const { resolve } = require('node:path') | ||
@@ -6,0 +6,0 @@ const nameFromFolder = require('@npmcli/name-from-folder') |
@@ -11,3 +11,3 @@ // Arborist.rebuild({path = this.path}) will do all the binlinks and | ||
const { callLimit: promiseCallLimit } = require('promise-call-limit') | ||
const { resolve } = require('path') | ||
const { resolve } = require('node:path') | ||
const { isNodeGypPackage, defaultGypInstallScript } = require('@npmcli/node-gyp') | ||
@@ -14,0 +14,0 @@ const { log, time } = require('proc-log') |
@@ -14,3 +14,3 @@ // mixin implementing the reify method | ||
const { dirname, resolve, relative, join } = require('path') | ||
const { dirname, resolve, relative, join } = require('node:path') | ||
const { depth: dfwalk } = require('treeverse') | ||
@@ -22,3 +22,3 @@ const { | ||
symlink, | ||
} = require('fs/promises') | ||
} = require('node:fs/promises') | ||
const { moveFile } = require('@npmcli/fs') | ||
@@ -25,0 +25,0 @@ const PackageJson = require('@npmcli/package-json') |
@@ -21,3 +21,3 @@ // certain assertions we should do only when testing arborist itself, because | ||
['test', 'snap'].includes(process.env.npm_lifecycle_event) || | ||
process.cwd() === require('path').resolve(__dirname, '..') | ||
process.cwd() === require('node:path').resolve(__dirname, '..') | ||
) | ||
@@ -28,6 +28,7 @@ | ||
module.exports.log = (...msg) => module.exports(() => { | ||
const { format } = require('util') | ||
const { format } = require('node:util') | ||
const prefix = `\n${process.pid} ${red(format(msg.shift()))} ` | ||
msg = (prefix + format(...msg).trim().split('\n').join(prefix)).trim() | ||
/* eslint-disable-next-line no-console */ | ||
console.error(msg) | ||
}) |
@@ -9,3 +9,3 @@ // Do not rely on package._fields, so that we don't throw | ||
const npa = require('npm-package-arg') | ||
const { relative } = require('path') | ||
const { relative } = require('node:path') | ||
const fromPath = require('./from-path.js') | ||
@@ -12,0 +12,0 @@ |
@@ -9,3 +9,3 @@ // a tree representing the difference between two trees | ||
const { depth } = require('treeverse') | ||
const { existsSync } = require('fs') | ||
const { existsSync } = require('node:fs') | ||
@@ -12,0 +12,0 @@ const ssri = require('ssri') |
// An edge in the dependency graph | ||
// Represents a dependency relationship of some kind | ||
const util = require('util') | ||
const util = require('node:util') | ||
const npa = require('npm-package-arg') | ||
@@ -6,0 +6,0 @@ const depValid = require('./dep-valid.js') |
@@ -6,3 +6,3 @@ // file dependencies need their dependencies resolved based on the location | ||
const { dirname } = require('path') | ||
const { dirname } = require('node:path') | ||
const npa = require('npm-package-arg') | ||
@@ -9,0 +9,0 @@ |
@@ -5,3 +5,3 @@ const relpath = require('./relpath.js') | ||
const _target = Symbol.for('_target') | ||
const { dirname } = require('path') | ||
const { dirname } = require('node:path') | ||
// defined by Node class | ||
@@ -8,0 +8,0 @@ const _delistFromMeta = Symbol.for('_delistFromMeta') |
@@ -44,4 +44,4 @@ // inventory, path, realpath, root, and parent | ||
const { resolve, relative, dirname, basename } = require('path') | ||
const util = require('util') | ||
const { resolve, relative, dirname, basename } = require('node:path') | ||
const util = require('node:util') | ||
const _package = Symbol('_package') | ||
@@ -48,0 +48,0 @@ const _parent = Symbol('_parent') |
// helper function to output a clearer visualization | ||
// of the current node and its descendents | ||
const localeCompare = require('@isaacs/string-locale-compare')('en') | ||
const util = require('util') | ||
const util = require('node:util') | ||
const relpath = require('./relpath.js') | ||
@@ -6,0 +6,0 @@ |
'use strict' | ||
const { resolve } = require('path') | ||
const { resolve } = require('node:path') | ||
const { parser, arrayDelimiter } = require('@npmcli/query') | ||
@@ -5,0 +5,0 @@ const localeCompare = require('@isaacs/string-locale-compare')('en') |
@@ -8,4 +8,4 @@ // look up the realpath, but cache stats to minimize overhead | ||
const { lstat, readlink } = require('fs/promises') | ||
const { resolve, basename, dirname } = require('path') | ||
const { lstat, readlink } = require('node:fs/promises') | ||
const { resolve, basename, dirname } = require('node:path') | ||
@@ -12,0 +12,0 @@ const realpathCached = (path, rpcache, stcache, depth) => { |
@@ -1,3 +0,3 @@ | ||
const { relative } = require('path') | ||
const { relative } = require('node:path') | ||
const relpath = (from, to) => relative(from, to).replace(/\\/g, '/') | ||
module.exports = relpath |
@@ -1,3 +0,3 @@ | ||
const crypto = require('crypto') | ||
const { dirname, basename, resolve } = require('path') | ||
const crypto = require('node:crypto') | ||
const { dirname, basename, resolve } = require('node:path') | ||
@@ -4,0 +4,0 @@ // use sha1 because it's faster, and collisions extremely unlikely anyway |
@@ -45,5 +45,5 @@ // a module that manages a shrinkwrap file (npm-shrinkwrap.json or | ||
writeFile, | ||
} = require('fs/promises') | ||
} = require('node:fs/promises') | ||
const { resolve, basename, relative } = require('path') | ||
const { resolve, basename, relative } = require('node:path') | ||
const specFromLock = require('./spec-from-lock.js') | ||
@@ -50,0 +50,0 @@ const versionFromTgz = require('./version-from-tgz.js') |
const semver = require('semver') | ||
const { basename } = require('path') | ||
const { URL } = require('url') | ||
const { basename } = require('node:path') | ||
const { URL } = require('node:url') | ||
module.exports = (name, tgz) => { | ||
@@ -5,0 +5,0 @@ const base = basename(tgz) |
@@ -32,3 +32,3 @@ // parse a yarn lock file | ||
const consistentResolve = require('./consistent-resolve.js') | ||
const { dirname } = require('path') | ||
const { dirname } = require('node:path') | ||
const { breadth } = require('treeverse') | ||
@@ -35,0 +35,0 @@ |
{ | ||
"name": "@npmcli/arborist", | ||
"version": "7.5.2", | ||
"version": "7.5.3", | ||
"description": "Manage node_modules trees", | ||
@@ -5,0 +5,0 @@ "dependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 2 instances in 1 package
459988
12273
9