File tree 1 file changed +6
-2
lines changed
workspaces/libnpmexec/lib
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
+ const { dirname, resolve } = require ( 'node:path' )
4
+ const crypto = require ( 'node:crypto' )
3
5
const { mkdir } = require ( 'node:fs/promises' )
4
6
const Arborist = require ( '@npmcli/arborist' )
5
7
const ciInfo = require ( 'ci-info' )
6
- const crypto = require ( 'node:crypto' )
7
8
const { log, input } = require ( 'proc-log' )
8
9
const npa = require ( 'npm-package-arg' )
9
10
const pacote = require ( 'pacote' )
10
11
const { read } = require ( 'read' )
11
12
const semver = require ( 'semver' )
13
+ const PackageJson = require ( '@npmcli/package-json' )
12
14
const { fileExists, localFileExists } = require ( './file-exists.js' )
13
15
const getBinFromManifest = require ( './get-bin-from-manifest.js' )
14
16
const noTTY = require ( './no-tty.js' )
15
17
const runScript = require ( './run-script.js' )
16
18
const isWindows = require ( './is-windows.js' )
17
- const { dirname, resolve } = require ( 'node:path' )
18
19
19
20
const binPaths = [ ]
20
21
@@ -293,6 +294,9 @@ const exec = async (opts) => {
293
294
} )
294
295
}
295
296
binPaths . push ( resolve ( installDir , 'node_modules/.bin' ) )
297
+ const pkgJson = await PackageJson . load ( installDir )
298
+ pkgJson . update ( { _npx : { packages } } )
299
+ await pkgJson . save ( )
296
300
}
297
301
298
302
return await run ( )
You can’t perform that action at this time.
0 commit comments