@pnpm/building.after-install 1101.0.5 → 1101.0.7

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.
Files changed (2) hide show
  1. package/lib/index.js +9 -6
  2. package/package.json +22 -22
package/lib/index.js CHANGED
@@ -19,7 +19,7 @@ import { logger, streamParser } from '@pnpm/logger';
19
19
  import npa from '@pnpm/npm-package-arg';
20
20
  import { safeReadPackageJsonFromDir } from '@pnpm/pkg-manifest.reader';
21
21
  import { createStoreController } from '@pnpm/store.connection-manager';
22
- import { StoreIndex, storeIndexKey } from '@pnpm/store.index';
22
+ import { pickStoreIndexKey, StoreIndex } from '@pnpm/store.index';
23
23
  import { hardLinkDir } from '@pnpm/worker';
24
24
  import pLimit from 'p-limit';
25
25
  import { runGroups } from 'run-groups';
@@ -250,9 +250,12 @@ async function _rebuild(ctx, opts) {
250
250
  }
251
251
  const resolution = pkgSnapshot.resolution;
252
252
  let sideEffectsCacheKey;
253
- const pkgId = `${pkgInfo.name}@${pkgInfo.version}`;
254
- if (opts.skipIfHasSideEffectsCache && resolution.integrity) {
255
- const filesIndexFile = storeIndexKey(resolution.integrity.toString(), pkgId);
253
+ // Match the resolver-supplied pkg.id used by the writer in
254
+ // @pnpm/installing.package-requester: that's the tarball URL for
255
+ // git-hosted packages (nonSemverVersion) and `name@version` otherwise.
256
+ const pkgId = pkgInfo.nonSemverVersion ?? `${pkgInfo.name}@${pkgInfo.version}`;
257
+ if (opts.skipIfHasSideEffectsCache && (resolution.gitHosted || resolution.integrity)) {
258
+ const filesIndexFile = pickStoreIndexKey(resolution, pkgId, { built: true });
256
259
  const pkgFilesIndex = storeIndex.get(filesIndexFile);
257
260
  if (pkgFilesIndex) {
258
261
  sideEffectsCacheKey = calcDepState(depGraph, depsStateCache, depPath, {
@@ -284,9 +287,9 @@ async function _rebuild(ctx, opts) {
284
287
  unsafePerm: opts.unsafePerm || false,
285
288
  userAgent: opts.userAgent,
286
289
  });
287
- if (hasSideEffects && (opts.sideEffectsCacheWrite ?? true) && resolution.integrity) {
290
+ if (hasSideEffects && (opts.sideEffectsCacheWrite ?? true) && (resolution.gitHosted || resolution.integrity)) {
288
291
  builtDepPaths.add(depPath);
289
- const filesIndexFile = storeIndexKey(resolution.integrity.toString(), pkgId);
292
+ const filesIndexFile = pickStoreIndexKey(resolution, pkgId, { built: true });
290
293
  try {
291
294
  if (!sideEffectsCacheKey) {
292
295
  sideEffectsCacheKey = calcDepState(depGraph, depsStateCache, depPath, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/building.after-install",
3
- "version": "1101.0.5",
3
+ "version": "1101.0.7",
4
4
  "description": "Rebuild packages that are already installed by running their lifecycle scripts",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -27,40 +27,40 @@
27
27
  "dependencies": {
28
28
  "@pnpm/npm-package-arg": "^2.0.0",
29
29
  "load-json-file": "^7.0.1",
30
- "p-limit": "^7.1.0",
30
+ "p-limit": "^7.3.0",
31
31
  "run-groups": "^5.0.0",
32
- "semver": "^7.7.2",
33
- "@pnpm/building.pkg-requires-build": "1100.0.2",
32
+ "semver": "^7.7.4",
34
33
  "@pnpm/bins.linker": "1100.0.3",
34
+ "@pnpm/building.pkg-requires-build": "1100.0.2",
35
35
  "@pnpm/config.normalize-registries": "1100.0.2",
36
- "@pnpm/building.policy": "1100.0.2",
37
- "@pnpm/config.reader": "1101.1.4",
36
+ "@pnpm/building.policy": "1100.0.3",
37
+ "@pnpm/config.reader": "1101.2.1",
38
+ "@pnpm/constants": "1100.0.0",
38
39
  "@pnpm/core-loggers": "1100.0.1",
40
+ "@pnpm/deps.graph-hasher": "1100.1.3",
39
41
  "@pnpm/deps.graph-sequencer": "1100.0.0",
40
- "@pnpm/deps.path": "1100.0.2",
41
- "@pnpm/deps.graph-hasher": "1100.1.2",
42
42
  "@pnpm/error": "1100.0.0",
43
- "@pnpm/installing.modules-yaml": "1100.0.2",
44
- "@pnpm/exec.lifecycle": "1100.0.5",
45
- "@pnpm/lockfile.types": "1100.0.3",
46
- "@pnpm/installing.context": "1100.0.5",
47
- "@pnpm/lockfile.utils": "1100.0.4",
48
- "@pnpm/store.cafs": "1100.1.1",
49
- "@pnpm/lockfile.walker": "1100.0.3",
50
- "@pnpm/store.connection-manager": "1100.0.9",
51
- "@pnpm/types": "1101.0.0",
43
+ "@pnpm/installing.context": "1100.0.6",
44
+ "@pnpm/deps.path": "1100.0.2",
45
+ "@pnpm/exec.lifecycle": "1100.0.6",
46
+ "@pnpm/installing.modules-yaml": "1100.0.3",
47
+ "@pnpm/lockfile.types": "1100.0.4",
48
+ "@pnpm/lockfile.utils": "1100.0.5",
49
+ "@pnpm/lockfile.walker": "1100.0.4",
50
+ "@pnpm/store.cafs": "1100.1.2",
52
51
  "@pnpm/pkg-manifest.reader": "1100.0.2",
53
- "@pnpm/store.controller-types": "1100.0.4",
52
+ "@pnpm/store.connection-manager": "1100.0.11",
54
53
  "@pnpm/store.index": "1100.0.0",
55
- "@pnpm/constants": "1100.0.0"
54
+ "@pnpm/types": "1101.0.0",
55
+ "@pnpm/store.controller-types": "1100.0.5"
56
56
  },
57
57
  "peerDependencies": {
58
- "@pnpm/logger": ">=1001.0.0 <1002.0.0",
59
- "@pnpm/worker": "^1100.1.1"
58
+ "@pnpm/logger": "^1001.0.1",
59
+ "@pnpm/worker": "^1100.1.2"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@types/semver": "7.7.1",
63
- "@pnpm/building.after-install": "1101.0.5"
63
+ "@pnpm/building.after-install": "1101.0.7"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=22.13"