@gadicc/loom 1.22.1 → 1.24.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.
@@ -47,6 +47,7 @@ exports.ensureAgentsMdText = ensureAgentsMdText;
47
47
  exports.ensureNextAgentsMdText = ensureNextAgentsMdText;
48
48
  exports.ensurePnpmWorkspaceLocalDevText = ensurePnpmWorkspaceLocalDevText;
49
49
  exports.clearPnpmWorkspaceLocalDevText = clearPnpmWorkspaceLocalDevText;
50
+ exports.ensurePnpmWorkspaceLoomReleaseAgeExcludeText = ensurePnpmWorkspaceLoomReleaseAgeExcludeText;
50
51
  exports.syncLocalDevPackage = syncLocalDevPackage;
51
52
  exports.useLocalDevPackage = useLocalDevPackage;
52
53
  exports.usePublishedDevPackage = usePublishedDevPackage;
@@ -76,6 +77,7 @@ const node_module_1 = require("node:module");
76
77
  const node_path_1 = require("node:path");
77
78
  const node_process_1 = __importDefault(require("node:process"));
78
79
  const node_util_1 = require("node:util");
80
+ const releaseConfig_js_1 = require("./releaseConfig.js");
79
81
  const retention_js_1 = require("../apiKeys/retention.js");
80
82
  const projectSkills_js_1 = require("./projectSkills.js");
81
83
  const migrationEnv_js_1 = require("./migrationEnv.js");
@@ -1271,6 +1273,7 @@ function mergeDbConfig(framework, featureConfig) {
1271
1273
  ...featureConfig?.modules,
1272
1274
  },
1273
1275
  provider: featureConfig?.provider,
1276
+ release: featureConfig?.release,
1274
1277
  };
1275
1278
  }
1276
1279
  function isIdentifierLikeChar(char) {
@@ -2131,6 +2134,55 @@ function clearPnpmWorkspaceLocalDevText(existingText) {
2131
2134
  text: nextText,
2132
2135
  };
2133
2136
  }
2137
+ function pnpmWorkspaceExcludesMinimumReleaseAge(text, dependency) {
2138
+ if (!text)
2139
+ return false;
2140
+ const lines = normalizeText(text).split("\n");
2141
+ const index = lines.findIndex((line) => /^minimumReleaseAgeExclude:\s*/.test(line));
2142
+ if (index === -1)
2143
+ return false;
2144
+ const value = lines[index].replace(/^minimumReleaseAgeExclude:\s*/, "");
2145
+ return yamlScalarValueContainsToken(value, dependency) ||
2146
+ yamlListContainsToken(lines, index, 0, dependency);
2147
+ }
2148
+ /** Keeps first-party Loom releases outside pnpm's package-age delay. */
2149
+ function ensurePnpmWorkspaceLoomReleaseAgeExcludeText(existingText) {
2150
+ const normalized = existingText ? normalizeText(existingText) : "";
2151
+ if (pnpmWorkspaceExcludesMinimumReleaseAge(normalized, exports.LOOM_DEPENDENCY)) {
2152
+ return { changed: false, conflict: null, text: normalized };
2153
+ }
2154
+ const lines = normalized === ""
2155
+ ? []
2156
+ : normalized.replace(/\n$/, "").split("\n");
2157
+ const index = lines.findIndex((line) => /^minimumReleaseAgeExclude:\s*/.test(line));
2158
+ const entry = ` - "${exports.LOOM_DEPENDENCY}"`;
2159
+ if (index === -1) {
2160
+ if (lines.length && lines.at(-1) !== "")
2161
+ lines.push("");
2162
+ lines.push("minimumReleaseAgeExclude:", entry);
2163
+ }
2164
+ else {
2165
+ const value = lines[index].replace(/^minimumReleaseAgeExclude:\s*/, "");
2166
+ if (value === "" || value.startsWith("#")) {
2167
+ lines.splice(index + 1, 0, entry);
2168
+ }
2169
+ else {
2170
+ const inline = value.match(/^\[([^\]]*)\](\s*#.*)?$/);
2171
+ if (!inline) {
2172
+ return {
2173
+ changed: false,
2174
+ conflict: "pnpm-workspace.yaml defines minimumReleaseAgeExclude in an unsupported scalar form; add @gadicc/loom manually.",
2175
+ text: normalized,
2176
+ };
2177
+ }
2178
+ const existingItems = inline[1].trim();
2179
+ const comment = inline[2] ?? "";
2180
+ lines[index] = `minimumReleaseAgeExclude: [${existingItems ? `${existingItems}, ` : ""}"${exports.LOOM_DEPENDENCY}"]${comment}`;
2181
+ }
2182
+ }
2183
+ const text = formatYamlLines(lines);
2184
+ return { changed: text !== normalized, conflict: null, text };
2185
+ }
2134
2186
  async function writeTextOrDeleteIfEmpty(path, text) {
2135
2187
  if (text === "") {
2136
2188
  try {
@@ -2803,6 +2855,97 @@ async function checkNextAgentGuidance(cwd, packageJson) {
2803
2855
  }
2804
2856
  return { issues: [], suggestions: [], warnings: [] };
2805
2857
  }
2858
+ const PNPM_11_LEGACY_WORKSPACE_SETTINGS = [
2859
+ "allowNonAppliedPatches",
2860
+ "ignoreDepScripts",
2861
+ "ignorePatchFailures",
2862
+ "ignoredBuiltDependencies",
2863
+ "neverBuiltDependencies",
2864
+ "onlyBuiltDependencies",
2865
+ "onlyBuiltDependenciesFile",
2866
+ ];
2867
+ function getPnpmMajor(packageManager) {
2868
+ const match = packageManager?.match(/^pnpm@(\d+)(?:\.|$)/);
2869
+ return match ? Number(match[1]) : null;
2870
+ }
2871
+ function isPnpmRegistryOrAuthSetting(key) {
2872
+ return key === "registry" || key.endsWith(":registry") ||
2873
+ /^(?:\/\/[^:]+\/?:)?(?::_authToken|_auth|username|_password|email|always-auth)$/i
2874
+ .test(key);
2875
+ }
2876
+ function findUnsupportedPnpm11NpmrcSettings(text) {
2877
+ if (!text)
2878
+ return [];
2879
+ const settings = new Set();
2880
+ for (const line of normalizeText(text).split("\n")) {
2881
+ const trimmed = line.trim();
2882
+ if (!trimmed || trimmed.startsWith("#") || trimmed.startsWith(";")) {
2883
+ continue;
2884
+ }
2885
+ const separator = trimmed.indexOf("=");
2886
+ const key = (separator === -1 ? trimmed : trimmed.slice(0, separator))
2887
+ .trim();
2888
+ if (key && !isPnpmRegistryOrAuthSetting(key))
2889
+ settings.add(key);
2890
+ }
2891
+ return [...settings].sort();
2892
+ }
2893
+ function findLegacyPnpm11WorkspaceSettings(text) {
2894
+ if (!text)
2895
+ return [];
2896
+ const settings = new Set();
2897
+ const pattern = new RegExp(`^(${PNPM_11_LEGACY_WORKSPACE_SETTINGS.join("|")}):\\s*`);
2898
+ for (const line of normalizeText(text).split("\n")) {
2899
+ const match = line.match(pattern);
2900
+ if (match)
2901
+ settings.add(match[1]);
2902
+ }
2903
+ return [...settings].sort();
2904
+ }
2905
+ async function checkPnpm11Compatibility(cwd, packageJson, npmrcText) {
2906
+ const workspaceText = await readTextIfExists((0, node_path_1.join)(cwd, "pnpm-workspace.yaml"));
2907
+ const usesPnpm = packageJson.packageManager?.startsWith("pnpm@") ||
2908
+ workspaceText !== null || await exists((0, node_path_1.join)(cwd, "pnpm-lock.yaml"));
2909
+ if (!usesPnpm)
2910
+ return { issues: [], suggestions: [], warnings: [] };
2911
+ const findings = [];
2912
+ if (packageJson.pnpm && Object.keys(packageJson.pnpm).length > 0) {
2913
+ findings.push("pnpm 11+ ignores package.json#pnpm; move those settings to pnpm-workspace.yaml.");
2914
+ }
2915
+ const npmrcSettings = findUnsupportedPnpm11NpmrcSettings(npmrcText);
2916
+ if (npmrcSettings.length > 0) {
2917
+ findings.push(`pnpm 11+ reads only registry/auth settings from .npmrc; move ${npmrcSettings.join(", ")} to pnpm-workspace.yaml.`);
2918
+ }
2919
+ const legacyWorkspaceSettings = findLegacyPnpm11WorkspaceSettings(workspaceText);
2920
+ if (legacyWorkspaceSettings.length > 0) {
2921
+ findings.push(`pnpm 11+ no longer supports ${legacyWorkspaceSettings.join(", ")} in pnpm-workspace.yaml; migrate dependency build policy to allowBuilds and replace removed patch settings.`);
2922
+ }
2923
+ if (!pnpmWorkspaceExcludesMinimumReleaseAge(workspaceText, exports.LOOM_DEPENDENCY)) {
2924
+ findings.push("pnpm 11's release-age policy can delay first-party @gadicc/loom updates; add it to minimumReleaseAgeExclude in pnpm-workspace.yaml.");
2925
+ }
2926
+ const workflowPaths = await getGithubWorkflowRelativePaths(cwd);
2927
+ const legacyWorkflowPaths = [];
2928
+ for (const relativePath of workflowPaths) {
2929
+ const text = await readTextIfExists((0, node_path_1.join)(cwd, relativePath));
2930
+ if (text && /\buses:\s*pnpm\/action-setup@/m.test(text)) {
2931
+ legacyWorkflowPaths.push(relativePath);
2932
+ }
2933
+ }
2934
+ if (legacyWorkflowPaths.length > 0) {
2935
+ findings.push(`pnpm 11+ projects should use pnpm/setup instead of pnpm/action-setup in ${legacyWorkflowPaths.join(", ")}.`);
2936
+ }
2937
+ if (findings.length === 0) {
2938
+ return { issues: [], suggestions: [], warnings: [] };
2939
+ }
2940
+ const major = getPnpmMajor(packageJson.packageManager);
2941
+ return {
2942
+ issues: major !== null && major >= 11 ? findings : [],
2943
+ suggestions: [
2944
+ "Follow the pnpm 11 migration guide, keep registry/auth settings in .npmrc, and rerun `loom check`.",
2945
+ ],
2946
+ warnings: major === null || major < 11 ? findings : [],
2947
+ };
2948
+ }
2806
2949
  function getSkillsContext(packageJson, manifest) {
2807
2950
  return {
2808
2951
  activeFeatureKeys: new Set(manifest
@@ -3152,12 +3295,6 @@ function yamlListContainsToken(lines, startIndex, parentIndent, token) {
3152
3295
  }
3153
3296
  return false;
3154
3297
  }
3155
- function yamlBranchValueContainsMain(value) {
3156
- return yamlScalarValueContainsToken(value, "main");
3157
- }
3158
- function yamlListContainsMainBranch(lines, startIndex, parentIndent) {
3159
- return yamlListContainsToken(lines, startIndex, parentIndent, "main");
3160
- }
3161
3298
  function findGithubOnPushIndex(lines) {
3162
3299
  const onIndex = lines.findIndex((line) => /^\s*on:\s*(?:#.*)?$/.test(line));
3163
3300
  if (onIndex === -1) {
@@ -3180,7 +3317,7 @@ function findGithubOnPushIndex(lines) {
3180
3317
  }
3181
3318
  return -1;
3182
3319
  }
3183
- function githubWorkflowRunsOnMainPush(text) {
3320
+ function githubWorkflowRunsOnBranchPush(text, productionBranch) {
3184
3321
  const normalized = normalizeText(text);
3185
3322
  if (/^\s*on:\s*(?:push|\[\s*push\s*\])\s*(?:#.*)?$/m.test(normalized)) {
3186
3323
  return true;
@@ -3192,7 +3329,7 @@ function githubWorkflowRunsOnMainPush(text) {
3192
3329
  }
3193
3330
  const pushIndent = lines[pushIndex].match(/^(\s*)/)?.[1].length ?? 0;
3194
3331
  let hasBranchFilter = false;
3195
- let ignoresMain = false;
3332
+ let ignoresProductionBranch = false;
3196
3333
  for (let index = pushIndex + 1; index < lines.length; index++) {
3197
3334
  const line = lines[index];
3198
3335
  const indent = line.match(/^(\s*)/)?.[1].length ?? 0;
@@ -3206,20 +3343,20 @@ function githubWorkflowRunsOnMainPush(text) {
3206
3343
  const branchMatch = line.match(/^\s*branches:\s*(.*)$/);
3207
3344
  if (branchMatch) {
3208
3345
  hasBranchFilter = true;
3209
- if (yamlBranchValueContainsMain(branchMatch[1]) ||
3210
- yamlListContainsMainBranch(lines, index, indent)) {
3346
+ if (yamlScalarValueContainsToken(branchMatch[1], productionBranch) ||
3347
+ yamlListContainsToken(lines, index, indent, productionBranch)) {
3211
3348
  return true;
3212
3349
  }
3213
3350
  continue;
3214
3351
  }
3215
3352
  const branchIgnoreMatch = line.match(/^\s*branches-ignore:\s*(.*)$/);
3216
3353
  if (branchIgnoreMatch &&
3217
- (yamlBranchValueContainsMain(branchIgnoreMatch[1]) ||
3218
- yamlListContainsMainBranch(lines, index, indent))) {
3219
- ignoresMain = true;
3354
+ (yamlScalarValueContainsToken(branchIgnoreMatch[1], productionBranch) ||
3355
+ yamlListContainsToken(lines, index, indent, productionBranch))) {
3356
+ ignoresProductionBranch = true;
3220
3357
  }
3221
3358
  }
3222
- return !hasBranchFilter && !ignoresMain;
3359
+ return !hasBranchFilter && !ignoresProductionBranch;
3223
3360
  }
3224
3361
  function workflowStepRunsDbMigrate(block) {
3225
3362
  return /\b(?:deno\s+task\s+db:migrate|pnpm\s+(?:run\s+)?db:migrate|npm\s+run\s+db:migrate|yarn\s+(?:run\s+)?db:migrate|bun\s+run\s+db:migrate)\b/
@@ -3357,7 +3494,7 @@ function getGithubWorkflowJobBlocks(text) {
3357
3494
  };
3358
3495
  });
3359
3496
  }
3360
- function inspectDbMigrationWorkflow(relativePath, workflowText) {
3497
+ function inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch) {
3361
3498
  const normalized = normalizeText(workflowText);
3362
3499
  const workflowEnvText = workflowPreambleBeforeJobs(normalized);
3363
3500
  const jobs = getGithubWorkflowJobBlocks(normalized).map((job) => {
@@ -3409,7 +3546,7 @@ function inspectDbMigrationWorkflow(relativePath, workflowText) {
3409
3546
  });
3410
3547
  return {
3411
3548
  jobs,
3412
- mainPush: githubWorkflowRunsOnMainPush(normalized),
3549
+ productionPush: githubWorkflowRunsOnBranchPush(normalized, productionBranch),
3413
3550
  usesGithubDatabaseUrlVariable: workflowUsesGithubDatabaseUrlVariable(normalized),
3414
3551
  relativePath,
3415
3552
  usesGithubDatabaseUrlSecret: workflowUsesGithubDatabaseUrlSecret(normalized),
@@ -3439,7 +3576,7 @@ function dbMigrationWorkflowIsValid(workflow) {
3439
3576
  function isJsonObject(value) {
3440
3577
  return typeof value === "object" && value !== null && !Array.isArray(value);
3441
3578
  }
3442
- function vercelMainDeploymentIsDisabled(vercelJson) {
3579
+ function vercelProductionDeploymentIsDisabled(vercelJson, productionBranch) {
3443
3580
  const git = vercelJson.git;
3444
3581
  if (!isJsonObject(git)) {
3445
3582
  return false;
@@ -3449,9 +3586,9 @@ function vercelMainDeploymentIsDisabled(vercelJson) {
3449
3586
  return true;
3450
3587
  }
3451
3588
  return isJsonObject(deploymentEnabled) &&
3452
- deploymentEnabled.main === false;
3589
+ deploymentEnabled[productionBranch] === false;
3453
3590
  }
3454
- async function checkDbProductionMigrationFlow(cwd, production) {
3591
+ async function checkDbProductionMigrationFlow(cwd, production, productionBranch) {
3455
3592
  const issues = [];
3456
3593
  const suggestions = new Set();
3457
3594
  const warnings = [];
@@ -3459,21 +3596,21 @@ async function checkDbProductionMigrationFlow(cwd, production) {
3459
3596
  const vercelJsonPath = (0, node_path_1.join)(cwd, "vercel.json");
3460
3597
  const vercelJsonText = await readTextIfExists(vercelJsonPath);
3461
3598
  if (!vercelJsonText) {
3462
- findings.push("DB production migration flow is missing vercel.json with automatic main deployments disabled.");
3463
- suggestions.add("Add `git.deploymentEnabled.main: false` to vercel.json so production deploys wait for the GitHub Actions migration job.");
3599
+ findings.push(`DB production migration flow is missing vercel.json with automatic ${productionBranch} deployments disabled.`);
3600
+ suggestions.add(`Add \`git.deploymentEnabled[${JSON.stringify(productionBranch)}]: false\` to vercel.json so production deploys wait for the GitHub Actions migration job.`);
3464
3601
  }
3465
3602
  else {
3466
3603
  try {
3467
3604
  const vercelJson = parseJson(vercelJsonText, "vercel.json");
3468
- if (!vercelMainDeploymentIsDisabled(vercelJson)) {
3469
- findings.push("DB production migration flow does not disable Vercel automatic deployments for main in vercel.json.");
3605
+ if (!vercelProductionDeploymentIsDisabled(vercelJson, productionBranch)) {
3606
+ findings.push(`DB production migration flow does not disable Vercel automatic deployments for ${productionBranch} in vercel.json.`);
3470
3607
  suggestions.add("Set `git.deploymentEnabled` to `false` in vercel.json so GitHub Actions owns production deployments.");
3471
3608
  }
3472
3609
  }
3473
3610
  catch (error) {
3474
3611
  findings.push("DB production migration flow could not inspect vercel.json: " +
3475
3612
  (error instanceof Error ? error.message : String(error)));
3476
- suggestions.add("Fix vercel.json so Loom can verify `git.deploymentEnabled.main: false`.");
3613
+ suggestions.add(`Fix vercel.json so Loom can verify \`git.deploymentEnabled[${JSON.stringify(productionBranch)}]: false\`.`);
3477
3614
  }
3478
3615
  }
3479
3616
  const workflowInspections = [];
@@ -3482,67 +3619,69 @@ async function checkDbProductionMigrationFlow(cwd, production) {
3482
3619
  if (!workflowText) {
3483
3620
  continue;
3484
3621
  }
3485
- workflowInspections.push(inspectDbMigrationWorkflow(relativePath, workflowText));
3622
+ workflowInspections.push(inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch));
3486
3623
  }
3487
- const mainPushWorkflows = workflowInspections.filter((inspection) => inspection.mainPush);
3488
- const migrationJobs = mainPushWorkflows.flatMap((inspection) => inspection.jobs.filter((job) => job.migrateStepIndex >= 0));
3624
+ const productionPushWorkflows = workflowInspections.filter((inspection) => inspection.productionPush);
3625
+ const migrationJobs = productionPushWorkflows.flatMap((inspection) => inspection.jobs.filter((job) => job.migrateStepIndex >= 0));
3489
3626
  const migrationWorkflowPaths = [
3490
3627
  ...new Set(migrationJobs.map((inspection) => inspection.relativePath)),
3491
3628
  ];
3492
- const validMigrationWorkflow = mainPushWorkflows.find(dbMigrationWorkflowIsValid);
3493
- const oldDeployHookWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesOldVercelDeployHook);
3494
- const duplicatedDatabaseUrlWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlSecret);
3495
- const databaseUrlVariableWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlVariable);
3496
- const legacyUnpooledSecretWorkflows = mainPushWorkflows.filter((inspection) => inspection.usesGithubUnpooledDatabaseUrlSecret &&
3629
+ const validMigrationWorkflow = productionPushWorkflows.find(dbMigrationWorkflowIsValid);
3630
+ const oldDeployHookWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesOldVercelDeployHook);
3631
+ const duplicatedDatabaseUrlWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlSecret);
3632
+ const databaseUrlVariableWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubDatabaseUrlVariable);
3633
+ const legacyUnpooledSecretWorkflows = productionPushWorkflows.filter((inspection) => inspection.usesGithubUnpooledDatabaseUrlSecret &&
3497
3634
  !inspection.usesGithubMigrationDatabaseUrlSecret);
3498
- const invalidMigrationValidationPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 &&
3635
+ const invalidMigrationValidationPaths = productionPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 &&
3499
3636
  !job.migrationVerifyUsesPulledSnapshot
3500
3637
  ? [inspection.relativePath]
3501
3638
  : []));
3502
- const structuralOnlyMigrationValidationPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 && !job.migrationVerifyConnects
3639
+ const structuralOnlyMigrationValidationPaths = productionPushWorkflows
3640
+ .flatMap((inspection) => inspection.jobs.flatMap((job) => job.migrationVerifyStepIndex >= 0 && !job.migrationVerifyConnects
3503
3641
  ? [inspection.relativePath]
3504
3642
  : []));
3505
- const vercelCurlWorkflowPaths = mainPushWorkflows.flatMap((inspection) => inspection.jobs.some((job) => job.vercelCurlStepIndex >= 0)
3643
+ const vercelCurlWorkflowPaths = productionPushWorkflows.flatMap((inspection) => inspection.jobs.some((job) => job.vercelCurlStepIndex >= 0)
3506
3644
  ? [inspection.relativePath]
3507
3645
  : []);
3508
3646
  if (!validMigrationWorkflow) {
3509
- if (mainPushWorkflows.length === 0) {
3510
- findings.push("DB production migration flow is missing a GitHub Actions workflow for pushes to main.");
3647
+ if (productionPushWorkflows.length === 0) {
3648
+ findings.push(`DB production migration flow is missing a GitHub Actions workflow for pushes to ${productionBranch}.`);
3511
3649
  }
3512
3650
  else if (migrationJobs.length === 0) {
3513
- findings.push("DB production migration flow does not run `db:migrate` in the main release workflow: " +
3514
- mainPushWorkflows.map((inspection) => inspection.relativePath).join(", "));
3651
+ findings.push(`DB production migration flow does not run \`db:migrate\` in the ${productionBranch} release workflow: ` +
3652
+ productionPushWorkflows.map((inspection) => inspection.relativePath)
3653
+ .join(", "));
3515
3654
  }
3516
3655
  else if (!migrationJobs.some((inspection) => inspection.hasDatabaseUrlBinding ||
3517
3656
  inspection.migrateWithVercelProductionEnvStepIndex >= 0)) {
3518
3657
  findings.push("DB production migration flow runs migrations without Vercel production env injection: " +
3519
3658
  migrationWorkflowPaths.join(", "));
3520
3659
  }
3521
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.stageStepIndex >= 0))) {
3660
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.stageStepIndex >= 0))) {
3522
3661
  findings.push("DB production migration flow does not stage a prebuilt production deployment before migrations: " +
3523
3662
  migrationWorkflowPaths.join(", "));
3524
3663
  }
3525
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.promoteStepIndex >= 0))) {
3664
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.promoteStepIndex >= 0))) {
3526
3665
  findings.push("DB production migration flow does not promote the staged deployment after migrations: " +
3527
3666
  migrationWorkflowPaths.join(", "));
3528
3667
  }
3529
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.snapshotStepIndex === job.pullStepIndex &&
3668
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.snapshotStepIndex === job.pullStepIndex &&
3530
3669
  job.metadataStepIndex > job.pullStepIndex &&
3531
3670
  job.prepareBuildEnvStepIndex > job.metadataStepIndex &&
3532
3671
  job.verifyBuildEnvStepIndex > job.buildStepIndex))) {
3533
3672
  findings.push("DB production migration flow does not preserve the pulled migration env and verify metadata-backed build placeholders: " +
3534
3673
  migrationWorkflowPaths.join(", "));
3535
3674
  }
3536
- else if (!mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.migrateStepRestoresPulledEnv))) {
3675
+ else if (!productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => job.migrateStepRestoresPulledEnv))) {
3537
3676
  findings.push("DB production migration flow does not restore the untouched pulled env before migrations: " +
3538
3677
  migrationWorkflowPaths.join(", "));
3539
3678
  }
3540
- else if (!mainPushWorkflows.some((inspection) => inspection.usesGithubMigrationDatabaseUrlSecret ||
3679
+ else if (!productionPushWorkflows.some((inspection) => inspection.usesGithubMigrationDatabaseUrlSecret ||
3541
3680
  inspection.usesGithubUnpooledDatabaseUrlSecret)) {
3542
3681
  findings.push("DB production migration flow is not ready for Sensitive database variables because it lacks a GitHub migration-secret binding: " +
3543
3682
  migrationWorkflowPaths.join(", "));
3544
3683
  }
3545
- else if (mainPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3684
+ else if (productionPushWorkflows.some((inspection) => inspection.jobs.some((job) => dbMigrationJobHasOrderedStagedRelease(job) &&
3546
3685
  !job.promoteStepUsesExplicitScope))) {
3547
3686
  findings.push("DB production migration flow promotes the staged deployment without an explicit Vercel team scope: " +
3548
3687
  migrationWorkflowPaths.join(", "));
@@ -6324,14 +6463,14 @@ function findGithubVariableValue(name, ...collections) {
6324
6463
  }
6325
6464
  return null;
6326
6465
  }
6327
- async function hasMainPushDbMigrationWorkflow(cwd) {
6466
+ async function hasProductionPushDbMigrationWorkflow(cwd, productionBranch) {
6328
6467
  for (const relativePath of await getGithubWorkflowRelativePaths(cwd)) {
6329
6468
  const workflowText = await readTextIfExists((0, node_path_1.join)(cwd, relativePath));
6330
6469
  if (!workflowText) {
6331
6470
  continue;
6332
6471
  }
6333
- const inspection = inspectDbMigrationWorkflow(relativePath, workflowText);
6334
- if (inspection.mainPush &&
6472
+ const inspection = inspectDbMigrationWorkflow(relativePath, workflowText, productionBranch);
6473
+ if (inspection.productionPush &&
6335
6474
  inspection.jobs.some((job) => job.migrateStepIndex >= 0 ||
6336
6475
  job.stageStepIndex >= 0 ||
6337
6476
  job.promoteStepIndex >= 0)) {
@@ -6778,6 +6917,19 @@ async function checkDbNetworkFeature(context) {
6778
6917
  if (!feature || feature.status !== "active") {
6779
6918
  return [];
6780
6919
  }
6920
+ let productionBranch;
6921
+ try {
6922
+ productionBranch = (0, releaseConfig_js_1.resolveProductionBranch)(feature.config?.release);
6923
+ }
6924
+ catch (error) {
6925
+ return [{
6926
+ label: "DB release configuration",
6927
+ run: () => Promise.resolve(networkCheckResult("issue", error.message, {
6928
+ issues: [error.message],
6929
+ suggestions: ["Fix features.db.config.release in loom.json."],
6930
+ })),
6931
+ }];
6932
+ }
6781
6933
  const provider = feature.config
6782
6934
  ?.provider;
6783
6935
  const state = {
@@ -6885,7 +7037,7 @@ async function checkDbNetworkFeature(context) {
6885
7037
  createDbEnvCheckStep("Preview has Neon/Postgres env vars", "preview", "present", state, context),
6886
7038
  createDbEnvCheckStep("Development does not have Neon/Postgres env vars", "development", "absent", state, context),
6887
7039
  ];
6888
- if (await hasMainPushDbMigrationWorkflow(context.cwd)) {
7040
+ if (await hasProductionPushDbMigrationWorkflow(context.cwd, productionBranch)) {
6889
7041
  steps.push(createGithubReleaseConfigCheckStep(state, context));
6890
7042
  }
6891
7043
  return steps;
@@ -7399,6 +7551,7 @@ async function setupGithubVercelRelease(cwd, options = {}) {
7399
7551
  const manifest = manifestText
7400
7552
  ? parseJson(manifestText, "loom.json")
7401
7553
  : null;
7554
+ const productionBranch = (0, releaseConfig_js_1.resolveProductionBranch)(manifest?.features.db?.config?.release);
7402
7555
  const vercelLink = await readVercelProjectLink(cwd);
7403
7556
  if (!vercelLink.linked || !vercelLink.orgId || !vercelLink.projectId) {
7404
7557
  throw new Error(`${vercelLink.detail} Run \`vercel link\` before \`loom db release setup-github\`.`);
@@ -7437,8 +7590,8 @@ async function setupGithubVercelRelease(cwd, options = {}) {
7437
7590
  `repos/:owner/:repo/environments/${environment}/deployment-branch-policies`,
7438
7591
  ], { cwd, env, stdio: "pipe" });
7439
7592
  const branchPolicies = parseJson(branchPoliciesResult.stdout || "{}", "GitHub deployment branch policies");
7440
- if (!branchPolicies.branch_policies?.some((policy) => policy.name === "main")) {
7441
- await requireCommand(`Allow main to deploy to GitHub ${environment}`, commandRunner, "gh", [
7593
+ if (!branchPolicies.branch_policies?.some((policy) => policy.name === productionBranch)) {
7594
+ await requireCommand(`Allow ${productionBranch} to deploy to GitHub ${environment}`, commandRunner, "gh", [
7442
7595
  "api",
7443
7596
  "--method",
7444
7597
  "POST",
@@ -7448,11 +7601,11 @@ async function setupGithubVercelRelease(cwd, options = {}) {
7448
7601
  ], {
7449
7602
  cwd,
7450
7603
  env,
7451
- input: JSON.stringify({ name: "main", type: "branch" }),
7604
+ input: JSON.stringify({ name: productionBranch, type: "branch" }),
7452
7605
  stdio: "pipe",
7453
7606
  });
7454
7607
  }
7455
- notes.push(`Ensured GitHub environment \`${environment}\` exists and only allows the main release branch.`);
7608
+ notes.push(`Ensured GitHub environment \`${environment}\` exists and allows the ${productionBranch} release branch; existing branch policies are preserved.`);
7456
7609
  await requireCommand("Set GitHub VERCEL_ORG_ID variable", commandRunner, "gh", [
7457
7610
  "variable",
7458
7611
  "set",
@@ -7610,6 +7763,7 @@ async function applyDbFeature(cwd, framework, manifest, activate) {
7610
7763
  const currentFeature = manifest.features.db;
7611
7764
  const currentConfig = currentFeature?.config;
7612
7765
  const config = mergeDbConfig(framework, currentConfig);
7766
+ (0, releaseConfig_js_1.resolveProductionBranch)(config.release);
7613
7767
  const feature = currentFeature
7614
7768
  ? structuredClone(currentFeature)
7615
7769
  : { status: "planned" };
@@ -8516,11 +8670,22 @@ async function checkDbFeature(cwd, framework, manifest, options) {
8516
8670
  return { issues, suggestions: [], warnings };
8517
8671
  }
8518
8672
  const config = mergeDbConfig(framework, feature.config);
8673
+ let productionBranch;
8674
+ try {
8675
+ productionBranch = (0, releaseConfig_js_1.resolveProductionBranch)(config.release);
8676
+ }
8677
+ catch (error) {
8678
+ return {
8679
+ issues: [error.message],
8680
+ suggestions: ["Fix features.db.config.release in loom.json."],
8681
+ warnings,
8682
+ };
8683
+ }
8519
8684
  const { packageJson } = await readProjectPackageJson(cwd);
8520
8685
  const tooling = await getProjectTooling(cwd, manifest);
8521
8686
  const testRunner = await getDbTestRunner(cwd, tooling);
8522
8687
  const expectedScripts = getDbExpectedScripts(config, tooling);
8523
- const migrationFlowCheck = await checkDbProductionMigrationFlow(cwd, options.production ?? false);
8688
+ const migrationFlowCheck = await checkDbProductionMigrationFlow(cwd, options.production ?? false, productionBranch);
8524
8689
  issues.push(...migrationFlowCheck.issues);
8525
8690
  warnings.push(...migrationFlowCheck.warnings);
8526
8691
  for (const suggestion of migrationFlowCheck.suggestions) {
@@ -9716,6 +9881,18 @@ async function initProject(cwd, versionRange) {
9716
9881
  }
9717
9882
  const packageJson = (await (0, projectTooling_js_1.readProjectPackageMetadata)(cwd))
9718
9883
  .packageJson;
9884
+ if (tooling.dependencies.manager === "pnpm") {
9885
+ const workspacePath = (0, node_path_1.join)(cwd, "pnpm-workspace.yaml");
9886
+ const releaseAgeUpdate = ensurePnpmWorkspaceLoomReleaseAgeExcludeText(await readTextIfExists(workspacePath));
9887
+ if (releaseAgeUpdate.conflict) {
9888
+ notes.push(releaseAgeUpdate.conflict);
9889
+ }
9890
+ else if (releaseAgeUpdate.changed) {
9891
+ await (0, promises_1.writeFile)(workspacePath, releaseAgeUpdate.text, "utf8");
9892
+ changedFiles.push("pnpm-workspace.yaml");
9893
+ notes.push("Excluded first-party @gadicc/loom releases from pnpm's minimum release-age delay.");
9894
+ }
9895
+ }
9719
9896
  const framework = await detectFramework(cwd, packageJson);
9720
9897
  const manifest = buildManifest(cwd, packageJson, framework, existingManifest, tooling);
9721
9898
  const featureInit = await ensureActiveFeatureScaffolds(cwd, framework, manifest);
@@ -9920,6 +10097,12 @@ async function checkProject(cwd, env = node_process_1.default.env, options = {})
9920
10097
  warnings.push(".npmrc retains Loom's obsolete GitHub Packages registry configuration.");
9921
10098
  suggestions.add("Run `loom init` to remove the obsolete Loom registry lines.");
9922
10099
  }
10100
+ const pnpmCompatibilityCheck = await checkPnpm11Compatibility(cwd, packageJson, npmrcText);
10101
+ issues.push(...pnpmCompatibilityCheck.issues);
10102
+ warnings.push(...pnpmCompatibilityCheck.warnings);
10103
+ for (const suggestion of pnpmCompatibilityCheck.suggestions) {
10104
+ suggestions.add(suggestion);
10105
+ }
9923
10106
  const framework = await detectFramework(cwd, packageJson);
9924
10107
  const dependency = packageJson.dependencies?.[exports.LOOM_DEPENDENCY];
9925
10108
  if (!dependency) {
@@ -0,0 +1,10 @@
1
+ /** App-owned production release settings in features.db.config.release. */
2
+ export type DbReleaseConfig = {
3
+ /** Literal short Git branch name; omitted settings retain the main default. */
4
+ productionBranch?: string;
5
+ };
6
+ /** Portable literal branch names, excluding Git-invalid paths and glob syntax. */
7
+ export declare const PRODUCTION_BRANCH_PATTERN: string;
8
+ /** Resolve the release branch before writing provider configuration or checking it. */
9
+ export declare function resolveProductionBranch(release: unknown): string;
10
+ //# sourceMappingURL=releaseConfig.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseConfig.d.ts","sourceRoot":"","sources":["../../../src/src/cli/releaseConfig.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,MAAM,eAAe,GAAG;IAC5B,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,kFAAkF;AAClF,eAAO,MAAM,yBAAyB,QAC8E,CAAC;AAErH,uFAAuF;AACvF,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAuBhE"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PRODUCTION_BRANCH_PATTERN = void 0;
4
+ exports.resolveProductionBranch = resolveProductionBranch;
5
+ /** Portable literal branch names, excluding Git-invalid paths and glob syntax. */
6
+ exports.PRODUCTION_BRANCH_PATTERN = String
7
+ .raw `^(?!HEAD$)(?!refs/)(?!.*(?:\.\.|//|/\.))(?!.*\.lock(?:/|$))(?!.*[/.]$)[A-Za-z0-9_][A-Za-z0-9._/-]*(?![\s\S])`;
8
+ /** Resolve the release branch before writing provider configuration or checking it. */
9
+ function resolveProductionBranch(release) {
10
+ if (release === undefined)
11
+ return "main";
12
+ if (typeof release !== "object" || release === null || Array.isArray(release)) {
13
+ throw new Error("features.db.config.release must be an object.");
14
+ }
15
+ if (Object.keys(release).some((key) => key !== "productionBranch")) {
16
+ throw new Error("features.db.config.release only supports productionBranch.");
17
+ }
18
+ const branch = release.productionBranch;
19
+ if (branch === undefined)
20
+ return "main";
21
+ if (typeof branch !== "string" ||
22
+ !new RegExp(exports.PRODUCTION_BRANCH_PATTERN).test(branch)) {
23
+ throw new Error("features.db.config.release.productionBranch must be a literal short Git branch name using letters, numbers, underscores, dots, hyphens or slashes; patterns and refs/ prefixes are not supported.");
24
+ }
25
+ return branch;
26
+ }
@@ -6,6 +6,10 @@ export declare const DEFAULT_LOOM_PWA_UPDATE_PROMPT = "A newer version of this w
6
6
  export interface LoomSerwistLifecycleEvent {
7
7
  /** Whether Serwist identified the event as an update to an existing worker. */
8
8
  isUpdate?: boolean;
9
+ /** Worker associated with this event, when supplied by the integration. */
10
+ sw?: ServiceWorker;
11
+ /** Whether another registration or tab initiated this lifecycle event. */
12
+ isExternal?: boolean;
9
13
  /** The Serwist lifecycle event name. */
10
14
  type: string;
11
15
  /** Whether a waiting service worker existed before registration completed. */
@@ -21,7 +25,7 @@ export type LoomSerwistEventName = "activated" | "controlling" | "installed" | "
21
25
  */
22
26
  export interface LoomWindowSerwist {
23
27
  addEventListener: (type: LoomSerwistEventName, listener: (event: LoomSerwistLifecycleEvent) => void) => void;
24
- messageSkipWaiting: () => Promise<void>;
28
+ messageSkipWaiting: () => void | Promise<void>;
25
29
  register: () => Promise<ServiceWorkerRegistration | undefined>;
26
30
  removeEventListener: (type: LoomSerwistEventName, listener: (event: LoomSerwistLifecycleEvent) => void) => void;
27
31
  }
@@ -80,6 +84,7 @@ export interface LoomPwaLifecycleOptions {
80
84
  updateMode?: LoomPwaUpdateMode;
81
85
  }
82
86
  declare global {
87
+ var serwist: LoomWindowSerwist | undefined;
83
88
  interface Window {
84
89
  serwist?: LoomWindowSerwist;
85
90
  }
@@ -87,7 +92,10 @@ declare global {
87
92
  /**
88
93
  * Registers Loom's Serwist lifecycle listeners and optional update polling.
89
94
  *
90
- * The returned cleanup function removes listeners and clears the polling timer.
95
+ * Cleanup removes this observer's listeners and polling without unregistering
96
+ * the worker or removing offline caches. Pending callbacks cannot activate or
97
+ * reload after cleanup. Registration is shared across effect remounts.
98
+ *
91
99
  * In `prompt` mode, a waiting worker is activated only after `canReloadNow` and
92
100
  * `confirmUpdate` both allow it; in `manual` mode Loom reports availability but
93
101
  * never activates the worker for the app.
@@ -1 +1 @@
1
- {"version":3,"file":"mod.d.ts","sourceRoot":"","sources":["../../../../src/src/next/pwa/mod.tsx"],"names":[],"mappings":"AAAA,OAAO,4BAA4B,CAAC;AAIpC,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,EAAE,iBAAiB,EAAE,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