@catladder/cli 0.0.0-next-a2f59d07 → 0.0.0-next-cf4e99eb

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 (24) hide show
  1. package/dist/bundles/catenv/index.js +92 -102
  2. package/dist/bundles/cli/index.js +92 -102
  3. package/dist/bundles/skills/catladder-builds/references/build-types.md +10 -0
  4. package/dist/bundles/skills/catladder-migrate-package-manager/SKILL.md +15 -9
  5. package/dist/bundles/skills/catladder-migrate-package-manager/references/yarn-to-pnpm-differences.md +30 -4
  6. package/dist/bundles/skills/catladder-pipelines/SKILL.md +7 -6
  7. package/dist/packages/pipeline/src/build/node/buildJob.js +11 -14
  8. package/dist/packages/pipeline/src/build/node/buildJob.js.map +1 -1
  9. package/dist/packages/pipeline/src/build/node/cache.d.ts +8 -3
  10. package/dist/packages/pipeline/src/build/node/cache.js +34 -47
  11. package/dist/packages/pipeline/src/build/node/cache.js.map +1 -1
  12. package/dist/packages/pipeline/src/build/node/packageManagerInstall.d.ts +7 -4
  13. package/dist/packages/pipeline/src/build/node/packageManagerInstall.js +32 -26
  14. package/dist/packages/pipeline/src/build/node/packageManagerInstall.js.map +1 -1
  15. package/dist/packages/pipeline/src/build/node/testJob.js +14 -14
  16. package/dist/packages/pipeline/src/build/node/testJob.js.map +1 -1
  17. package/dist/packages/pipeline/src/build/types.d.ts +17 -3
  18. package/dist/packages/pipeline/src/build/types.js.map +1 -1
  19. package/dist/skills/catladder-builds/references/build-types.md +10 -0
  20. package/dist/skills/catladder-migrate-package-manager/SKILL.md +15 -9
  21. package/dist/skills/catladder-migrate-package-manager/references/yarn-to-pnpm-differences.md +30 -4
  22. package/dist/skills/catladder-pipelines/SKILL.md +7 -6
  23. package/dist/tsconfig.tsbuildinfo +1 -1
  24. package/package.json +1 -1
@@ -6096,11 +6096,14 @@ const createNodeDockerJobDefinition = async (context) => {
6096
6096
  (0, packageManagerInstall_1.getDockerAppCopyAndBuildScript)(context),
6097
6097
  context.packageManagerInfo,
6098
6098
  ]);
6099
- // the pnpm store (pulled via the cache above) is copied into the
6100
- // image so the prod install works offline — like the yarn zip cache,
6101
- // which travels inside the copied `.yarn` config folder
6102
- const copyPnpmStore = packageManagerInfo.type === "pnpm" &&
6103
- packageManagerInfo.componentIsInWorkspace;
6099
+ // The pnpm store is deliberately NOT copied into the image. It used
6100
+ // to be, so the prod install could link instead of hitting the
6101
+ // registry — but the store lands in an earlier layer than
6102
+ // node_modules, so pnpm cannot hardlink across the overlay boundary
6103
+ // and copies every package instead. Measured on one component: the
6104
+ // in-image install was *slower* that way (28s vs 10s from the
6105
+ // registry), the store added 3GB to the build context and the final
6106
+ // image, and the build took 339s instead of 27s.
6104
6107
  // pnpm copies every workspace manifest into the image — as individual
6105
6108
  // COPY instructions that many layers exceed docker's depth limit, so
6106
6109
  // the job tars them up and a single ADD extracts them
@@ -6108,8 +6111,6 @@ const createNodeDockerJobDefinition = async (context) => {
6108
6111
  const WORKSPACE_FILES_TAR = ".catladder-workspace-files.tar";
6109
6112
  return {
6110
6113
  script: [
6111
- // the COPY source must exist even when the cache was cold
6112
- ...(copyPnpmStore ? ["mkdir -p .pnpm-store"] : []),
6113
6114
  ...(isPnpm
6114
6115
  ? [
6115
6116
  `tar -cf ${WORKSPACE_FILES_TAR} ${packageManagerInfo.pathsToCopyInDocker.join(" ")}`,
@@ -6126,14 +6127,10 @@ const createNodeDockerJobDefinition = async (context) => {
6126
6127
  `ADD ${WORKSPACE_FILES_TAR} /app/`,
6127
6128
  // ADD does not apply --chown to extracted tars, and parent
6128
6129
  // dirs of the entries come out root-owned — fix ownership
6129
- // while the stage still runs as root (store not copied yet,
6130
- // so this only touches the small manifest tree). Custom
6131
- // base images without a node user run as root and don't
6132
- // need it, hence the fallback
6130
+ // while the stage still runs as root (this only touches the
6131
+ // small manifest tree). Custom base images without a node
6132
+ // user run as root and don't need it, hence the fallback
6133
6133
  `RUN chown -R node:node /app || true`,
6134
- ...(copyPnpmStore
6135
- ? [`COPY --chown=node:node .pnpm-store /app/.pnpm-store`]
6136
- : []),
6137
6134
  ].join("\n")
6138
6135
  : packageManagerInfo.pathsToCopyInDocker
6139
6136
  .map((dir) => `COPY --chown=node:node ${dir} /app/${dir}`)
@@ -6167,10 +6164,9 @@ const lodash_es_1 = __nccwpck_require__(50210);
6167
6164
  const path_1 = __nccwpck_require__(16928);
6168
6165
  const slugify_1 = __importDefault(__nccwpck_require__(84007));
6169
6166
  /**
6170
- * stable reference between the two node caches: the package-manager
6171
- * (yarn zip / pnpm store) cache declares itself redundant when the
6172
- * node_modules cache scored an exact-lockfile hit (github skips the
6173
- * ~0.6GB download on warm runs)
6167
+ * stable reference between the two yarn caches: the zip cache declares
6168
+ * itself redundant when the node_modules cache scored an exact-lockfile
6169
+ * hit (github skips the ~0.6GB download on warm runs)
6174
6170
  */
6175
6171
  const NODE_MODULES_CACHE_ID = "node-modules";
6176
6172
  /**
@@ -6198,36 +6194,36 @@ const getCacheBaseDir = async (context) => {
6198
6194
  : ".";
6199
6195
  };
6200
6196
  /**
6201
- * the package manager's download cache: yarn's `.yarn` zip cache, or
6202
- * pnpm's content-addressable store (which catladder points at a
6203
- * project-local `.pnpm-store`, see the install script)
6197
+ * the package manager's download cache: yarn's `.yarn` zip cache.
6198
+ *
6199
+ * pnpm gets nothing. Its store is a content-addressable tree of
6200
+ * hundreds of thousands of small files, and moving it costs more than
6201
+ * the install it saves: measured on a 3800-package monorepo, restoring
6202
+ * the 1 GB store took ~53s on gitlab (which zips file by file) and
6203
+ * ~23s on github, against a from-registry install of ~30-40s. See
6204
+ * getNodeModulesCache for the node_modules half of the same finding.
6204
6205
  */
6205
6206
  const getYarnCache = async (context, policy = "pull-push") => {
6206
6207
  const packageManagerInfo = await context.packageManagerInfo;
6207
- const isPnpm = packageManagerInfo.type === "pnpm";
6208
+ if (packageManagerInfo.type === "pnpm")
6209
+ return [];
6208
6210
  const baseDir = await getCacheBaseDir(context);
6209
- // pnpm keeps its store in a format-versioned subdir (v10, v11, ...)
6210
- // and never cleans old ones up — scope the cache slot by major so a
6211
- // pnpm upgrade starts a fresh slot instead of dragging the dead old
6212
- // store tree along in every cache transfer (formats change only on
6213
- // majors)
6214
- const pnpmStoreKey = `pnpm-v${packageManagerInfo.version.split(".")[0]}`;
6215
6211
  return [
6216
6212
  {
6217
6213
  scope: "buildDir",
6218
6214
  pathMode: "relative",
6219
6215
  buildDir: baseDir,
6220
- key: isPnpm ? pnpmStoreKey : "yarn",
6216
+ key: "yarn",
6221
6217
  policy,
6222
- paths: [isPnpm ? ".pnpm-store" : ".yarn"],
6218
+ paths: [".yarn"],
6223
6219
  // content-key for immutable-cache backends (github); the lockfile
6224
6220
  // decides whether the cached content could have changed
6225
- keyFiles: [isPnpm ? "pnpm-lock.yaml" : "yarn.lock"],
6226
- // the package manager's download cache (~hundreds of MB) is only
6227
- // read when packages have to be (re)installed. When the
6228
- // node_modules cache hit for the same lockfile, install verifies
6229
- // its state file and never touches the store — so github skips
6230
- // downloading this cache entirely
6221
+ keyFiles: ["yarn.lock"],
6222
+ // the yarn zip cache (~hundreds of MB) is only read when packages
6223
+ // have to be (re)installed. When the node_modules cache hit for
6224
+ // the same lockfile, install verifies its state file and never
6225
+ // touches the zips — so github skips downloading this cache
6226
+ // entirely
6231
6227
  redundantOnExactHitOf: NODE_MODULES_CACHE_ID,
6232
6228
  },
6233
6229
  ];
@@ -6236,12 +6232,18 @@ exports.getYarnCache = getYarnCache;
6236
6232
  const getNodeModulesCache = async (context, policy = "pull-push") => {
6237
6233
  const packageManagerInfo = await context.packageManagerInfo;
6238
6234
  const baseDir = await getCacheBaseDir(context);
6239
- const { workspaces } = packageManagerInfo;
6240
- const isPnpm = packageManagerInfo.type === "pnpm";
6241
- const lockFileName = isPnpm ? "pnpm-lock.yaml" : "yarn.lock";
6242
- // yarn berry tracks install state in .yarn/install-state.gz (pnpm's
6243
- // equivalent lives inside node_modules and is covered by the paths)
6244
- const hasInstallState = packageManagerInfo.type === "yarn" && !packageManagerInfo.isClassic;
6235
+ // pnpm gets no node_modules cache either: archiving the tree (root
6236
+ // plus every workspace's symlink farm, >1GB in real monorepos) costs
6237
+ // ~190s per saving job to spare ~6s of install, and a safe pnpm slot
6238
+ // must be keyed by lockfile hash (a pnpm install over a node_modules
6239
+ // from a different lockfile leaves orphaned .pnpm dirs that break
6240
+ // type identity), so it misses on every dependency change anyway.
6241
+ // pnpm projects run entirely uncached — see getYarnCache
6242
+ if (packageManagerInfo.type === "pnpm")
6243
+ return [];
6244
+ const lockFileName = "yarn.lock";
6245
+ // yarn berry tracks install state in .yarn/install-state.gz
6246
+ const hasInstallState = !packageManagerInfo.isClassic;
6245
6247
  // We intentionally do not use the contents of the lockfile as a cache key, as install should always guarantee that the files are updated, but it can still use part of the cache if not all packages are up-to-date.
6246
6248
  // It would slow down all pipelines whenever one adds a new dependency as it will need to download all node_modules again.
6247
6249
  return [
@@ -6249,19 +6251,7 @@ const getNodeModulesCache = async (context, policy = "pull-push") => {
6249
6251
  scope: "global",
6250
6252
  pathMode: "absolute",
6251
6253
  // we use the dirname, not the component name, because in certain cases we have two apps in the same directory and want to share the cache, e.g. when having storybook in the same package.json
6252
- //
6253
- // pnpm gets its own, lockfile-keyed cache: node_modules layouts
6254
- // are not compatible between package managers (a migrating
6255
- // project must not inherit the yarn slot), and unlike yarn, a
6256
- // pnpm install on top of a node_modules from a different lockfile
6257
- // leaves orphaned .pnpm dirs behind that break type identity —
6258
- // so the slot changes whenever the lockfile changes
6259
- key: isPnpm
6260
- ? {
6261
- prefix: "pnpm-" + (0, slugify_1.default)(baseDir) + "-node-modules",
6262
- files: [(0, path_1.join)(baseDir, "pnpm-lock.yaml")],
6263
- }
6264
- : (0, slugify_1.default)(baseDir) + "-node-modules",
6254
+ key: (0, slugify_1.default)(baseDir) + "-node-modules",
6265
6255
  // content-key for immutable-cache backends (github); the lockfile
6266
6256
  // decides whether the cached content could have changed (absolute
6267
6257
  // pathMode: resolve the lockfile explicitly)
@@ -6272,12 +6262,6 @@ const getNodeModulesCache = async (context, policy = "pull-push") => {
6272
6262
  policy,
6273
6263
  paths: (0, lodash_es_1.uniq)([
6274
6264
  (0, path_1.join)(baseDir, "node_modules"),
6275
- // pnpm's per-package node_modules are symlink farms worth
6276
- // keeping warm (yarn hoists into the root, so root-only
6277
- // matches its historical behavior)
6278
- ...(isPnpm
6279
- ? workspaces.map((w) => (0, path_1.join)(w.location, "node_modules"))
6280
- : []),
6281
6265
  ...(hasInstallState ? [(0, path_1.join)(baseDir, ".yarn/install-state.gz")] : []),
6282
6266
  ]),
6283
6267
  },
@@ -6445,7 +6429,7 @@ exports.createMeteorBuildJobs = createMeteorBuildJobs;
6445
6429
  "use strict";
6446
6430
 
6447
6431
  Object.defineProperty(exports, "__esModule", ({ value: true }));
6448
- exports.getDockerAppCopyAndBuildScript = exports.getPackageManagerInstall = exports.ensureNodeVersion = exports.getDefaultAuditCommand = void 0;
6432
+ exports.getDockerAppCopyAndBuildScript = exports.getPackageManagerInstall = exports.ensureNodeVersion = exports.getDefaultAuditCommand = exports.DEFAULT_AUDIT_LEVEL = void 0;
6449
6433
  const bash_1 = __nccwpck_require__(94143);
6450
6434
  const utils_1 = __nccwpck_require__(49401);
6451
6435
  const gitlab_1 = __nccwpck_require__(86962);
@@ -6469,33 +6453,38 @@ const isInWorkspace = (context, packageManagerInfo) => context.type === "workspa
6469
6453
  */
6470
6454
  const getEnsurePnpmCommand = (version) => `if ! command -v pnpm &> /dev/null; then corepack enable pnpm 2>/dev/null || npm install -g pnpm@${version}; fi`;
6471
6455
  /**
6472
- * pnpm's store is global by default; point it at a project-local
6473
- * directory so CI can cache it (the pnpm equivalent of the `.yarn`
6474
- * zip cache). Passed as the --store-dir flag: pnpm 11 stopped reading
6475
- * the npm_config_store_dir env var (settings only come from
6476
- * pnpm-workspace.yaml / global config / CLI flags), the flag works on
6477
- * v10 and v11
6478
- */
6479
- const getPnpmStoreDirExpression = (inWorkspace) => inWorkspace
6480
- ? `"$(git rev-parse --show-toplevel 2>/dev/null || pwd)/.pnpm-store"`
6481
- : `"$PWD/.pnpm-store"`;
6482
- const getPnpmInstallCommands = (context, packageManagerInfo) => [
6456
+ * pnpm jobs use pnpm's own (global, per-runner) store location. There
6457
+ * used to be a `--store-dir` pointing at a project-local
6458
+ * `.pnpm-store`, so CI could cache it — that cache is gone (see
6459
+ * getYarnCache), and keeping the store inside the repo only meant it
6460
+ * landed in docker build contexts.
6461
+ */
6462
+ const getPnpmInstallCommands = (packageManagerInfo) => [
6483
6463
  getEnsurePnpmCommand(packageManagerInfo.version),
6484
- `pnpm install --frozen-lockfile --store-dir ${getPnpmStoreDirExpression(isInWorkspace(context, packageManagerInfo))}`,
6464
+ `pnpm install --frozen-lockfile`,
6485
6465
  ];
6466
+ exports.DEFAULT_AUDIT_LEVEL = "critical";
6486
6467
  /**
6487
- * default `audit` job command per package manager. Exhaustive on the
6488
- * package-manager type and throws for anything unsupported, so adding a
6489
- * new package manager surfaces every place that needs a command here.
6468
+ * default `audit` job command per package manager, failing on advisories
6469
+ * of `level` and above. Exhaustive on the package-manager type and throws
6470
+ * for anything unsupported, so adding a new package manager surfaces every
6471
+ * place that needs a command here.
6490
6472
  */
6491
- const getDefaultAuditCommand = (packageManagerInfo) => {
6473
+ const getDefaultAuditCommand = (packageManagerInfo, level = exports.DEFAULT_AUDIT_LEVEL) => {
6492
6474
  switch (packageManagerInfo.type) {
6493
6475
  case "pnpm":
6494
- return "pnpm audit --prod --audit-level critical";
6476
+ return `pnpm audit --prod --audit-level ${level}`;
6495
6477
  case "yarn":
6496
6478
  return packageManagerInfo.isClassic
6497
- ? "yarn audit --level critical"
6498
- : "yarn npm audit --environment production --severity critical"; // yarn 2+
6479
+ ? // classic walks the whole tree; --groups limits it to production
6480
+ `yarn audit --level ${level} --groups dependencies`
6481
+ : // yarn 2+ audits only the CURRENT workspace's DIRECT dependencies
6482
+ // by default — in a monorepo that is the root manifest, which
6483
+ // usually has no production dependencies at all, so the job passed
6484
+ // without checking anything. --all covers every workspace,
6485
+ // --recursive the transitive dependencies (what `pnpm audit` and
6486
+ // `yarn audit` classic do on their own).
6487
+ `yarn npm audit --environment production --severity ${level} --all --recursive`;
6499
6488
  default:
6500
6489
  throw new Error(`no audit command implemented for package manager "${packageManagerInfo.type}"`);
6501
6490
  }
@@ -6516,7 +6505,7 @@ const getPackageManagerInstall = async (context, options) => {
6516
6505
  ? context.build.config.postInstall
6517
6506
  : null;
6518
6507
  const installSection = packageManagerInfo.type === "pnpm"
6519
- ? (0, gitlab_1.collapseableSection)("pnpminstall", "pnpm install")(getPnpmInstallCommands(context, packageManagerInfo))
6508
+ ? (0, gitlab_1.collapseableSection)("pnpminstall", "pnpm install")(getPnpmInstallCommands(packageManagerInfo))
6520
6509
  : (0, gitlab_1.collapseableSection)("yarninstall", "Yarn install")([getYarnInstallCommand(packageManagerInfo)]);
6521
6510
  return [
6522
6511
  ...(0, exports.ensureNodeVersion)(context),
@@ -6529,11 +6518,12 @@ const getPackageManagerInstall = async (context, options) => {
6529
6518
  exports.getPackageManagerInstall = getPackageManagerInstall;
6530
6519
  const DOCKER_COPY_FILES = `COPY --chown=node:node $APP_DIR .`;
6531
6520
  const getPnpmDockerAppCopyAndBuildScript = (packageManagerInfo) => {
6532
- // the store was copied into the image (like the yarn zip cache), so
6533
- // the prod install links from it instead of hitting the registry
6534
- const storeDir = packageManagerInfo.componentIsInWorkspace
6535
- ? "/app/.pnpm-store"
6536
- : "/app/$APP_DIR/.pnpm-store";
6521
+ // the prod install downloads from the registry: nothing is copied
6522
+ // into the image to link from (see createNodeDockerJobDefinition).
6523
+ // The store it fills is scratch space outside /app, dropped in the
6524
+ // same layer so the packages ship once — node_modules holds
6525
+ // hardlinks, so removing the store keeps the files alive
6526
+ const storeDir = "/tmp/pnpm-store";
6537
6527
  // in a workspace, only install the component (and its workspace
6538
6528
  // dependencies) — the pnpm equivalent of `yarn workspaces focus`.
6539
6529
  // npm package names are shell-safe unquoted (the whole script is
@@ -6545,7 +6535,7 @@ const getPnpmDockerAppCopyAndBuildScript = (packageManagerInfo) => {
6545
6535
  return new bash_1.BashExpression(`
6546
6536
  ${DOCKER_COPY_FILES}
6547
6537
  RUN command -v pnpm >/dev/null 2>&1 || npm install -g pnpm@${packageManagerInfo.version}
6548
- RUN pnpm install --prod --frozen-lockfile --store-dir ${storeDir}${filter}
6538
+ RUN pnpm install --prod --frozen-lockfile --store-dir ${storeDir}${filter} && rm -rf ${storeDir}
6549
6539
  `.trim());
6550
6540
  };
6551
6541
  const getDockerAppCopyAndBuildScript = async (context) => {
@@ -6608,7 +6598,7 @@ const cache_1 = __nccwpck_require__(74559);
6608
6598
  const constants_1 = __nccwpck_require__(5576);
6609
6599
  const packageManagerInstall_1 = __nccwpck_require__(28419);
6610
6600
  const createNodeTestJobs = async (context) => {
6611
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
6601
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
6612
6602
  // don't run tests after release
6613
6603
  // TODO: this will be replaced by using rules
6614
6604
  if (context.trigger === "taggedRelease") {
@@ -6654,11 +6644,11 @@ const createNodeTestJobs = async (context) => {
6654
6644
  script: [
6655
6645
  `cd ${context.build.dir}`,
6656
6646
  ...((_f = (0, utils_1.ensureArrayOrNull)((_e = buildConfig.audit) === null || _e === void 0 ? void 0 : _e.command)) !== null && _f !== void 0 ? _f : [
6657
- (0, packageManagerInstall_1.getDefaultAuditCommand)(packageManagerInfo),
6647
+ (0, packageManagerInstall_1.getDefaultAuditCommand)(packageManagerInfo, (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.level),
6658
6648
  ]),
6659
6649
  ],
6660
- allow_failure: (_h = (_g = buildConfig.audit) === null || _g === void 0 ? void 0 : _g.allowFailure) !== null && _h !== void 0 ? _h : true,
6661
- ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_j = buildConfig.audit) === null || _j === void 0 ? void 0 : _j.artifactsReports, (_k = buildConfig.audit) === null || _k === void 0 ? void 0 : _k.artifacts),
6650
+ allow_failure: (_j = (_h = buildConfig.audit) === null || _h === void 0 ? void 0 : _h.allowFailure) !== null && _j !== void 0 ? _j : true,
6651
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_k = buildConfig.audit) === null || _k === void 0 ? void 0 : _k.artifactsReports, (_l = buildConfig.audit) === null || _l === void 0 ? void 0 : _l.artifacts),
6662
6652
  })
6663
6653
  : null;
6664
6654
  const lintJob = buildConfig.lint !== false
@@ -6667,20 +6657,20 @@ const createNodeTestJobs = async (context) => {
6667
6657
  ...base,
6668
6658
  runnerVariables: {
6669
6659
  ...constants_1.NODE_RUNNER_BUILD_VARIABLES,
6670
- ...((_m = (_l = buildConfig.lint) === null || _l === void 0 ? void 0 : _l.runnerVariables) !== null && _m !== void 0 ? _m : {}),
6660
+ ...((_o = (_m = buildConfig.lint) === null || _m === void 0 ? void 0 : _m.runnerVariables) !== null && _o !== void 0 ? _o : {}),
6671
6661
  },
6672
- image: (_p = (_o = buildConfig.lint) === null || _o === void 0 ? void 0 : _o.jobImage) !== null && _p !== void 0 ? _p : defaultImage,
6662
+ image: (_q = (_p = buildConfig.lint) === null || _p === void 0 ? void 0 : _p.jobImage) !== null && _q !== void 0 ? _q : defaultImage,
6673
6663
  caches: nodeCache,
6674
6664
  script: [
6675
6665
  ...(0, packageManagerInstall_1.ensureNodeVersion)(context),
6676
6666
  `cd ${context.build.dir}`,
6677
6667
  ...packageManagerInstall,
6678
- ...((_r = (0, utils_1.ensureArrayOrNull)((_q = buildConfig.lint) === null || _q === void 0 ? void 0 : _q.command)) !== null && _r !== void 0 ? _r : [
6668
+ ...((_s = (0, utils_1.ensureArrayOrNull)((_r = buildConfig.lint) === null || _r === void 0 ? void 0 : _r.command)) !== null && _s !== void 0 ? _s : [
6679
6669
  (0, runScript_1.runScript)(packageManagerInfo.type, "lint"),
6680
6670
  ]),
6681
6671
  ],
6682
- allow_failure: (_s = buildConfig.lint) === null || _s === void 0 ? void 0 : _s.allowFailure,
6683
- ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_t = buildConfig.lint) === null || _t === void 0 ? void 0 : _t.artifactsReports, (_u = buildConfig.lint) === null || _u === void 0 ? void 0 : _u.artifacts),
6672
+ allow_failure: (_t = buildConfig.lint) === null || _t === void 0 ? void 0 : _t.allowFailure,
6673
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_u = buildConfig.lint) === null || _u === void 0 ? void 0 : _u.artifactsReports, (_v = buildConfig.lint) === null || _v === void 0 ? void 0 : _v.artifacts),
6684
6674
  })
6685
6675
  : null;
6686
6676
  const testJob = buildConfig.test !== false
@@ -6689,22 +6679,22 @@ const createNodeTestJobs = async (context) => {
6689
6679
  ...base,
6690
6680
  runnerVariables: {
6691
6681
  ...constants_1.NODE_RUNNER_BUILD_VARIABLES,
6692
- ...((_w = (_v = buildConfig.test) === null || _v === void 0 ? void 0 : _v.runnerVariables) !== null && _w !== void 0 ? _w : {}),
6682
+ ...((_x = (_w = buildConfig.test) === null || _w === void 0 ? void 0 : _w.runnerVariables) !== null && _x !== void 0 ? _x : {}),
6693
6683
  },
6694
6684
  // browser tests need a jobImage carrying the browser, e.g. the
6695
6685
  // official playwright image (version-matched to the project)
6696
- image: (_y = (_x = buildConfig.test) === null || _x === void 0 ? void 0 : _x.jobImage) !== null && _y !== void 0 ? _y : (0, runner_1.getRunnerImage)("jobs-default"),
6686
+ image: (_z = (_y = buildConfig.test) === null || _y === void 0 ? void 0 : _y.jobImage) !== null && _z !== void 0 ? _z : (0, runner_1.getRunnerImage)("jobs-default"),
6697
6687
  caches: nodeCache,
6698
6688
  script: [
6699
6689
  ...(0, packageManagerInstall_1.ensureNodeVersion)(context),
6700
6690
  `cd ${context.build.dir}`,
6701
6691
  ...packageManagerInstall,
6702
- ...((_0 = (0, utils_1.ensureArrayOrNull)((_z = buildConfig.test) === null || _z === void 0 ? void 0 : _z.command)) !== null && _0 !== void 0 ? _0 : [
6692
+ ...((_1 = (0, utils_1.ensureArrayOrNull)((_0 = buildConfig.test) === null || _0 === void 0 ? void 0 : _0.command)) !== null && _1 !== void 0 ? _1 : [
6703
6693
  (0, runScript_1.runScript)(packageManagerInfo.type, "test"),
6704
6694
  ]),
6705
6695
  ],
6706
- allow_failure: (_1 = buildConfig.test) === null || _1 === void 0 ? void 0 : _1.allowFailure,
6707
- ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_2 = buildConfig.test) === null || _2 === void 0 ? void 0 : _2.artifactsReports, (_3 = buildConfig.test) === null || _3 === void 0 ? void 0 : _3.artifacts),
6696
+ allow_failure: (_2 = buildConfig.test) === null || _2 === void 0 ? void 0 : _2.allowFailure,
6697
+ ...(0, createArtifactsConfig_1.createArtifactsConfig)(context.build.dir, (_3 = buildConfig.test) === null || _3 === void 0 ? void 0 : _3.artifactsReports, (_4 = buildConfig.test) === null || _4 === void 0 ? void 0 : _4.artifacts),
6708
6698
  })
6709
6699
  : null;
6710
6700
  return [auditJob, lintJob, testJob].filter(utils_1.notNil);