Skip to content

Commit 858412c

Browse files
committed
test(e2e): keep the release-age gate env away from dify
The gate env (any spelling, even 0) combined with dify's resolutionMode: time-based activates pnpm's resolution-policy engine, which vp's bundled pnpm cannot handle (ERR_PNPM_RESOLUTION_POLICY_VIOLATIONS_UNHANDLED, no handleResolutionPolicyViolations callback wired). This is the same crash the old flow tolerated by swallowing dify's whole migrate failure; with the gate env excluded (dify's minimumReleaseAge key is already stripped by the workspace patch) the policy stays inactive and the migrate auto-install can actually succeed. The packument-merge fix from the previous commit already got dify past lockfile verification and the ESLint migration.
1 parent 934f0cd commit 858412c

1 file changed

Lines changed: 15 additions & 4 deletions

File tree

ecosystem-ci/patch-project.ts

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,21 @@ const vitestOverrides = {
165165
// during `vp install`). Disable pnpm's minimumReleaseAge gate so a same-day
166166
// publish does not fail with ERR_PNPM_NO_MATURE_MATCHING_VERSION. pnpm >= 10.6
167167
// only reads the PNPM_CONFIG_* spelling; older pnpm reads the lowercase form.
168-
const releaseAgeEnv = {
169-
pnpm_config_minimum_release_age: '0',
170-
PNPM_CONFIG_MINIMUM_RELEASE_AGE: '0',
171-
};
168+
//
169+
// dify is the exception: it sets `resolutionMode: time-based`, and defining a
170+
// minimumReleaseAge (even 0, via any env spelling) activates pnpm's
171+
// resolution-policy engine, which vp's bundled pnpm cannot handle
172+
// (ERR_PNPM_RESOLUTION_POLICY_VIOLATIONS_UNHANDLED, no
173+
// handleResolutionPolicyViolations callback). Its `minimumReleaseAge:` key
174+
// was already removed above, so with no gate env the policy stays inactive
175+
// and installs work.
176+
const releaseAgeEnv =
177+
project === 'dify'
178+
? {}
179+
: {
180+
pnpm_config_minimum_release_age: '0',
181+
PNPM_CONFIG_MINIMUM_RELEASE_AGE: '0',
182+
};
172183

173184
const migrateEnv: NodeJS.ProcessEnv = {
174185
...process.env,

0 commit comments

Comments
 (0)