diff --git a/workspaces/arborist/lib/arborist/build-ideal-tree.js b/workspaces/arborist/lib/arborist/build-ideal-tree.js index a65cff09724ab..ac3062928ebd8 100644 --- a/workspaces/arborist/lib/arborist/build-ideal-tree.js +++ b/workspaces/arborist/lib/arborist/build-ideal-tree.js @@ -9,7 +9,7 @@ const realpath = require('../../lib/realpath.js') const { resolve, dirname } = require('path') const treeCheck = require('../tree-check.js') const { readdirScoped } = require('@npmcli/fs') -const { lstat, readlink } = require('node:fs/promises') +const { lstat, readlink } = require('fs/promises') const { depth } = require('treeverse') const { log, time } = require('proc-log') const { redact } = require('@npmcli/redact') diff --git a/workspaces/arborist/lib/arborist/reify.js b/workspaces/arborist/lib/arborist/reify.js index c067d5ec3e3f9..42bbdfef8eb42 100644 --- a/workspaces/arborist/lib/arborist/reify.js +++ b/workspaces/arborist/lib/arborist/reify.js @@ -18,7 +18,7 @@ const { mkdir, rm, symlink, -} = require('node:fs/promises') +} = require('fs/promises') const { moveFile } = require('@npmcli/fs') const PackageJson = require('@npmcli/package-json') const packageContents = require('@npmcli/installed-package-contents') diff --git a/workspaces/arborist/lib/realpath.js b/workspaces/arborist/lib/realpath.js index 6574387cb35ee..8dc20ab63d836 100644 --- a/workspaces/arborist/lib/realpath.js +++ b/workspaces/arborist/lib/realpath.js @@ -5,7 +5,7 @@ // built-in fs.realpath, because we only care about symbolic links, // so we can handle many fewer edge cases. -const { lstat, readlink } = require('node:fs/promises') +const { lstat, readlink } = require('fs/promises') const { resolve, basename, dirname } = require('path') const realpathCached = (path, rpcache, stcache, depth) => { diff --git a/workspaces/arborist/lib/shrinkwrap.js b/workspaces/arborist/lib/shrinkwrap.js index 451f7b1fda317..026abc55ccba1 100644 --- a/workspaces/arborist/lib/shrinkwrap.js +++ b/workspaces/arborist/lib/shrinkwrap.js @@ -42,7 +42,7 @@ const { rm, stat, writeFile, -} = require('node:fs/promises') +} = require('fs/promises') const { resolve, basename, relative } = require('path') const specFromLock = require('./spec-from-lock.js') diff --git a/workspaces/arborist/scripts/benchmark.js b/workspaces/arborist/scripts/benchmark.js index 39dbfe253e163..21f5432de76f6 100644 --- a/workspaces/arborist/scripts/benchmark.js +++ b/workspaces/arborist/scripts/benchmark.js @@ -2,7 +2,7 @@ process.env.ARBORIST_DEBUG = '0' const { Suite } = require('benchmark') const { relative, resolve } = require('path') -const { mkdir, rm } = require('node:fs/promises') +const { mkdir, rm } = require('fs/promises') const { execSync } = require('child_process') const { linkSync, writeFileSync, readdirSync } = require('fs') const registryServer = require('../test/fixtures/server.js') diff --git a/workspaces/arborist/scripts/benchmark/load-actual.js b/workspaces/arborist/scripts/benchmark/load-actual.js index 036df495bc172..ddc8145bcb60d 100644 --- a/workspaces/arborist/scripts/benchmark/load-actual.js +++ b/workspaces/arborist/scripts/benchmark/load-actual.js @@ -1,7 +1,7 @@ const Arborist = require('../..') const { resolve, basename } = require('path') const { writeFileSync } = require('fs') -const { mkdir, rm } = require('node:fs/promises') +const { mkdir, rm } = require('fs/promises') const dir = resolve(__dirname, basename(__filename, '.js')) diff --git a/workspaces/arborist/scripts/benchmark/reify.js b/workspaces/arborist/scripts/benchmark/reify.js index 45ebb256c0f8f..797a5cb803682 100644 --- a/workspaces/arborist/scripts/benchmark/reify.js +++ b/workspaces/arborist/scripts/benchmark/reify.js @@ -1,7 +1,7 @@ const Arborist = require('../..') const { resolve, basename } = require('path') const { writeFileSync, rmSync } = require('fs') -const { mkdir } = require('node:fs/promises') +const { mkdir } = require('fs/promises') const dir = resolve(__dirname, basename(__filename, '.js')) // these are not arbitrary, the empty/full and no-* bits matter diff --git a/workspaces/arborist/test/arborist/pruner.js b/workspaces/arborist/test/arborist/pruner.js index 9e65c26bdca3f..9be29442acdea 100644 --- a/workspaces/arborist/test/arborist/pruner.js +++ b/workspaces/arborist/test/arborist/pruner.js @@ -80,7 +80,7 @@ t.test('prune with lockfile omit dev', async t => { }) t.test('prune omit dev with bins', async t => { - const { readdir } = require('node:fs/promises') + const { readdir } = require('fs/promises') const { statSync, lstatSync } = require('fs') const path = fixture(t, 'prune-dev-bins') diff --git a/workspaces/arborist/test/arborist/reify.js b/workspaces/arborist/test/arborist/reify.js index 7af5e772c8ba9..d0615add3540a 100644 --- a/workspaces/arborist/test/arborist/reify.js +++ b/workspaces/arborist/test/arborist/reify.js @@ -4,7 +4,7 @@ const runScript = require('@npmcli/run-script') const localeCompare = require('@isaacs/string-locale-compare')('en') const tnock = require('../fixtures/tnock') const fs = require('fs') -const fsp = require('node:fs/promises') +const fsp = require('fs/promises') const npmFs = require('@npmcli/fs') let failRm = false @@ -71,10 +71,10 @@ const fspMock = { }, } // need this to be injected so that it doesn't pull from main cache -const { moveFile } = t.mock('@npmcli/fs', { 'node:fs/promises': fspMock }) +const { moveFile } = t.mock('@npmcli/fs', { 'fs/promises': fspMock }) const mocks = { fs: fsMock, - 'node:fs/promises': fspMock, + 'fs/promises': fspMock, '@npmcli/fs': { ...npmFs, moveFile }, } diff --git a/workspaces/arborist/test/isolated-mode.js b/workspaces/arborist/test/isolated-mode.js index 26234947642e2..1e376b62b871f 100644 --- a/workspaces/arborist/test/isolated-mode.js +++ b/workspaces/arborist/test/isolated-mode.js @@ -1,6 +1,6 @@ const tap = require('tap') const fs = require('fs') -const { readFile } = require('node:fs/promises') +const { readFile } = require('fs/promises') const path = require('path') const os = require('os')