@vltpkg/run 1.0.0-rc.32 → 1.0.0-rc.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -0
- package/package.json +14 -7
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,11 @@ import { PackageJson } from '@vltpkg/package-json';
|
|
|
2
2
|
import type { PromiseSpawnOptions, SpawnResultNoStdio, SpawnResultStdioStrings } from '@vltpkg/promise-spawn';
|
|
3
3
|
import type { Manifest } from '@vltpkg/types';
|
|
4
4
|
export * from './node-gyp.ts';
|
|
5
|
+
/**
|
|
6
|
+
* The user agent string set as `npm_config_user_agent` in lifecycle script
|
|
7
|
+
* environments. Follows the conventional format used by package managers.
|
|
8
|
+
*/
|
|
9
|
+
export declare const npmConfigUserAgent: string;
|
|
5
10
|
/** options shared by run() and exec() */
|
|
6
11
|
export type SharedOptions = PromiseSpawnOptions & {
|
|
7
12
|
/** additional arguments to pass to the command */
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,11 @@ import { walkUp } from 'walk-up-path';
|
|
|
9
9
|
import { getNodeGypShimDir, hasNodeGypReference, hasNodeGypBinding, } from "./node-gyp.js";
|
|
10
10
|
// Re-export all named exports from node-gyp.ts
|
|
11
11
|
export * from "./node-gyp.js";
|
|
12
|
+
/**
|
|
13
|
+
* The user agent string set as `npm_config_user_agent` in lifecycle script
|
|
14
|
+
* environments. Follows the conventional format used by package managers.
|
|
15
|
+
*/
|
|
16
|
+
export const npmConfigUserAgent = `vlt/${process.version.slice(1)} node/${process.version} ${process.platform} ${process.arch}`;
|
|
12
17
|
/** map of which node_modules/.bin folders exist */
|
|
13
18
|
const dotBins = new Map();
|
|
14
19
|
/** Check if a directory exists, and cache result */
|
|
@@ -136,6 +141,7 @@ const runImpl = async (options, execImpl, empty) => {
|
|
|
136
141
|
args: preOrPost ? [] : (execArgs.args ?? []),
|
|
137
142
|
env: {
|
|
138
143
|
...execArgs.env,
|
|
144
|
+
npm_config_user_agent: npmConfigUserAgent,
|
|
139
145
|
npm_package_json: pjPath,
|
|
140
146
|
npm_lifecycle_event: `${preOrPost ?? ''}${arg0}`,
|
|
141
147
|
npm_lifecycle_script: command,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/run",
|
|
3
3
|
"description": "Run package.json scripts and execute commands",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.34",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/error-cause": "1.0.0-rc.
|
|
17
|
-
"@vltpkg/package-json": "1.0.0-rc.
|
|
18
|
-
"@vltpkg/promise-spawn": "1.0.0-rc.
|
|
19
|
-
"@vltpkg/types": "1.0.0-rc.
|
|
20
|
-
"@vltpkg/xdg": "1.0.0-rc.
|
|
16
|
+
"@vltpkg/error-cause": "1.0.0-rc.34",
|
|
17
|
+
"@vltpkg/package-json": "1.0.0-rc.34",
|
|
18
|
+
"@vltpkg/promise-spawn": "1.0.0-rc.34",
|
|
19
|
+
"@vltpkg/types": "1.0.0-rc.34",
|
|
20
|
+
"@vltpkg/xdg": "1.0.0-rc.34",
|
|
21
21
|
"foreground-child": "^3.3.1",
|
|
22
22
|
"walk-up-path": "^4.0.0"
|
|
23
23
|
},
|
|
@@ -62,5 +62,12 @@
|
|
|
62
62
|
},
|
|
63
63
|
"files": [
|
|
64
64
|
"dist"
|
|
65
|
-
]
|
|
65
|
+
],
|
|
66
|
+
"bugs": [
|
|
67
|
+
{
|
|
68
|
+
"type": "link",
|
|
69
|
+
"url": "https://github.com/vltpkg/vltpkg/issues"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"homepage": "https://github.com/vltpkg/vltpkg/tree/main/src/run#readme"
|
|
66
73
|
}
|