@pnpm/exec.lifecycle 1001.0.25 → 1100.0.0

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.
@@ -7,7 +7,6 @@ export interface RunLifecycleHookOptions {
7
7
  initCwd?: string;
8
8
  optional?: boolean;
9
9
  pkgRoot: string;
10
- rawConfig: object;
11
10
  rootModulesDir: string;
12
11
  scriptShell?: string;
13
12
  silent?: boolean;
@@ -15,5 +14,6 @@ export interface RunLifecycleHookOptions {
15
14
  shellEmulator?: boolean;
16
15
  stdio?: string;
17
16
  unsafePerm: boolean;
17
+ userAgent?: string;
18
18
  }
19
19
  export declare function runLifecycleHook(stage: string, manifest: ProjectManifest | DependencyManifest, opts: RunLifecycleHookOptions): Promise<boolean>;
@@ -3,7 +3,8 @@ import path from 'node:path';
3
3
  import { lifecycleLogger } from '@pnpm/core-loggers';
4
4
  import { PnpmError } from '@pnpm/error';
5
5
  import { globalWarn } from '@pnpm/logger';
6
- import lifecycle from '@pnpm/npm-lifecycle';
6
+ import { lifecycle } from '@pnpm/npm-lifecycle';
7
+ import chalk from 'chalk';
7
8
  import isWindows from 'is-windows';
8
9
  import { join as shellQuote } from 'shlex';
9
10
  function noop() { } // eslint-disable-line:no-empty
@@ -78,20 +79,21 @@ Please unset the scriptShell option, or configure it to a .exe instead.
78
79
  wd: opts.pkgRoot,
79
80
  });
80
81
  }
82
+ else if (!opts.silent) {
83
+ process.stderr.write(chalk.dim(`$ ${m.scripts[stage]}`) + '\n');
84
+ }
81
85
  const logLevel = (opts.stdio !== 'inherit' || opts.silent)
82
86
  ? 'silent'
83
87
  : undefined;
84
88
  await lifecycle(m, stage, opts.pkgRoot, {
85
- config: {
86
- ...opts.rawConfig,
87
- 'frozen-lockfile': false,
88
- },
89
+ config: {},
89
90
  dir: opts.rootModulesDir,
90
91
  extraBinPaths: opts.extraBinPaths,
91
92
  extraEnv: {
92
93
  ...opts.extraEnv,
93
94
  INIT_CWD: opts.initCwd ?? process.cwd(),
94
95
  PNPM_SCRIPT_SRC_DIR: opts.pkgRoot,
96
+ ...(opts.userAgent ? { npm_config_user_agent: opts.userAgent } : {}),
95
97
  },
96
98
  log: {
97
99
  clearProgress: noop,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/exec.lifecycle",
3
- "version": "1001.0.25",
3
+ "version": "1100.0.0",
4
4
  "description": "Package lifecycle hook runner",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -26,19 +26,20 @@
26
26
  "!*.map"
27
27
  ],
28
28
  "dependencies": {
29
- "@pnpm/npm-lifecycle": "^1001.0.0",
29
+ "@pnpm/npm-lifecycle": "1100.0.0-1",
30
+ "chalk": "^5.6.0",
30
31
  "is-windows": "^1.0.2",
31
32
  "path-exists": "^5.0.0",
32
33
  "run-groups": "^5.0.0",
33
34
  "shlex": "^3.0.0",
34
- "@pnpm/core-loggers": "1001.0.4",
35
- "@pnpm/bins.linker": "1000.2.6",
36
- "@pnpm/fetching.directory-fetcher": "1000.1.14",
37
- "@pnpm/error": "1000.0.5",
38
- "@pnpm/store.cafs-types": "1000.0.0",
39
- "@pnpm/store.controller-types": "1004.1.0",
40
- "@pnpm/types": "1000.9.0",
41
- "@pnpm/pkg-manifest.reader": "1000.1.2"
35
+ "@pnpm/bins.linker": "1100.0.0",
36
+ "@pnpm/core-loggers": "1100.0.0",
37
+ "@pnpm/error": "1100.0.0",
38
+ "@pnpm/fetching.directory-fetcher": "1100.0.0",
39
+ "@pnpm/store.cafs-types": "1100.0.0",
40
+ "@pnpm/pkg-manifest.reader": "1100.0.0",
41
+ "@pnpm/store.controller-types": "1100.0.0",
42
+ "@pnpm/types": "1100.0.0"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "@pnpm/logger": ">=1001.0.0 <1002.0.0"
@@ -47,11 +48,11 @@
47
48
  "@types/is-windows": "^1.0.2",
48
49
  "@zkochan/rimraf": "^4.0.0",
49
50
  "load-json-file": "^7.0.1",
50
- "@pnpm/prepare": "1000.0.4",
51
- "@pnpm/exec.lifecycle": "1001.0.25",
52
- "@pnpm/test-fixtures": "1000.0.0",
53
- "@pnpm/test-ipc-server": "1000.0.0",
54
- "@pnpm/logger": "1001.0.1"
51
+ "@pnpm/exec.lifecycle": "1100.0.0",
52
+ "@pnpm/logger": "1100.0.0",
53
+ "@pnpm/prepare": "1100.0.0",
54
+ "@pnpm/test-fixtures": "1100.0.0",
55
+ "@pnpm/test-ipc-server": "1100.0.0"
55
56
  },
56
57
  "engines": {
57
58
  "node": ">=22.13"
@@ -61,9 +62,9 @@
61
62
  },
62
63
  "scripts": {
63
64
  "lint": "eslint \"src/**/*.ts\" \"test/**/*.ts\"",
64
- "_test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest",
65
- "test": "pnpm run compile && pnpm run _test",
65
+ "test": "pn compile && pn .test",
66
66
  "fix": "tslint -c tslint.json src/**/*.ts test/**/*.ts --fix",
67
- "compile": "tsgo --build && pnpm run lint --fix"
67
+ "compile": "tsgo --build && pn lint --fix",
68
+ ".test": "cross-env NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules --disable-warning=ExperimentalWarning --disable-warning=DEP0169\" jest"
68
69
  }
69
70
  }