skuba 13.1.1 → 14.0.0-esbuild-bundle-support-20260101042604

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 (42) hide show
  1. package/lib/cli/build/esbuild.d.ts +6 -1
  2. package/lib/cli/build/esbuild.js +14 -2
  3. package/lib/cli/build/esbuild.js.map +2 -2
  4. package/lib/cli/build/index.js +9 -1
  5. package/lib/cli/build/index.js.map +2 -2
  6. package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/index.js +6 -1
  7. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/index.js.map +7 -0
  8. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.d.ts +3 -0
  9. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js +133 -0
  10. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/patchRootTsconfig.js.map +7 -0
  11. package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.js +2 -5
  12. package/lib/cli/lint/internalLints/upgrade/patches/13.1.1/upgradeNode.js.map +7 -0
  13. package/lib/cli/migrate/index.d.ts +5 -0
  14. package/lib/cli/migrate/index.js +46 -6
  15. package/lib/cli/migrate/index.js.map +2 -2
  16. package/lib/cli/migrate/nodeVersion/checks.d.ts +1 -14
  17. package/lib/cli/migrate/nodeVersion/checks.js +27 -133
  18. package/lib/cli/migrate/nodeVersion/checks.js.map +3 -3
  19. package/lib/cli/migrate/nodeVersion/index.d.ts +8 -2
  20. package/lib/cli/migrate/nodeVersion/index.js +193 -49
  21. package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
  22. package/lib/cli/migrate/nodeVersion/upgrade.d.ts +8 -0
  23. package/lib/cli/migrate/nodeVersion/upgrade.js +179 -0
  24. package/lib/cli/migrate/nodeVersion/upgrade.js.map +7 -0
  25. package/package.json +13 -11
  26. package/template/express-rest-api/.nvmrc +1 -1
  27. package/template/express-rest-api/package.json +4 -4
  28. package/template/greeter/.nvmrc +1 -1
  29. package/template/greeter/package.json +4 -4
  30. package/template/koa-rest-api/.nvmrc +1 -1
  31. package/template/koa-rest-api/package.json +5 -6
  32. package/template/lambda-sqs-worker-cdk/.nvmrc +1 -1
  33. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +4 -4
  34. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +3 -3
  35. package/template/lambda-sqs-worker-cdk/package.json +6 -6
  36. package/template/oss-npm-package/.nvmrc +1 -1
  37. package/template/private-npm-package/.nvmrc +1 -1
  38. package/template/private-npm-package/_package.json +1 -1
  39. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +0 -7
  40. package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +0 -7
  41. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/index.d.ts +0 -0
  42. /package/lib/cli/lint/internalLints/upgrade/patches/{9.1.0 → 13.1.1}/upgradeNode.d.ts +0 -0
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var upgrade_exports = {};
30
+ __export(upgrade_exports, {
31
+ tryUpgradeInfraPackages: () => tryUpgradeInfraPackages,
32
+ upgradeInfraPackages: () => upgradeInfraPackages
33
+ });
34
+ module.exports = __toCommonJS(upgrade_exports);
35
+ var import_node_util = require("node:util");
36
+ var import_fast_glob = require("fast-glob");
37
+ var import_fs_extra = __toESM(require("fs-extra"));
38
+ var import_semver = require("semver");
39
+ var import_exec = require("../../../utils/exec.js");
40
+ var import_logging = require("../../../utils/logging.js");
41
+ var import_packageManager = require("../../../utils/packageManager.js");
42
+ const packageVersionRegex = (packageName) => new RegExp(`"\\b${packageName}\\b"\\s*:\\s*"([^"]+)"`, "g");
43
+ const yamlPackageVersionRegex = (packageName) => new RegExp(`\\b${packageName}\\b:\\s*([^\\s]+)`, "g");
44
+ const normalizeVersionRange = (currentVersion, newVersion) => {
45
+ if (currentVersion.startsWith("^")) {
46
+ return `^${newVersion}`;
47
+ }
48
+ if (currentVersion.startsWith("~")) {
49
+ return `~${newVersion}`;
50
+ }
51
+ if (currentVersion.startsWith(">=") || currentVersion.startsWith(">") || currentVersion.startsWith("<=") || currentVersion.startsWith("<")) {
52
+ return `^${newVersion}`;
53
+ }
54
+ if (currentVersion.includes("x") || currentVersion.includes("X")) {
55
+ return `^${newVersion}`;
56
+ }
57
+ if (currentVersion.includes(" - ")) {
58
+ return `^${newVersion}`;
59
+ }
60
+ const coercedCurrent = (0, import_semver.coerce)(currentVersion);
61
+ if (coercedCurrent && (0, import_semver.lt)(coercedCurrent, newVersion)) {
62
+ return newVersion;
63
+ }
64
+ return currentVersion;
65
+ };
66
+ const upgradeInfraPackages = async (mode, packages) => {
67
+ const [packageJsonPaths, pnpmWorkspacePaths] = await Promise.all([
68
+ (0, import_fast_glob.glob)(["**/package.json"], {
69
+ ignore: ["**/.git", "**/node_modules"]
70
+ }),
71
+ (0, import_fast_glob.glob)("**/pnpm-workspace.yaml", {
72
+ ignore: ["**/.git", "**/node_modules"]
73
+ })
74
+ ]);
75
+ if (packageJsonPaths.length === 0 && pnpmWorkspacePaths.length === 0) {
76
+ return {
77
+ result: "skip",
78
+ reason: "no package.json or pnpm-workspace.yaml files found"
79
+ };
80
+ }
81
+ const [packageJsons, pnpmWorkspaces] = await Promise.all([
82
+ Promise.all(
83
+ packageJsonPaths.map(async (file) => {
84
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
85
+ return {
86
+ file,
87
+ contents
88
+ };
89
+ })
90
+ ),
91
+ Promise.all(
92
+ pnpmWorkspacePaths.map(async (file) => {
93
+ const contents = await import_fs_extra.default.readFile(file, "utf8");
94
+ return {
95
+ file,
96
+ contents
97
+ };
98
+ })
99
+ )
100
+ ]);
101
+ const patchedPackageJsons = packageJsons.map((file) => {
102
+ const updated = packages.reduce((contents, packageName) => {
103
+ const regex = packageVersionRegex(packageName.name);
104
+ return contents.replaceAll(regex, (match, currentVersion) => {
105
+ if (currentVersion.startsWith("*") || currentVersion.startsWith("workspace:") || currentVersion.startsWith("link:") || currentVersion.startsWith("file:") || currentVersion.startsWith("catalog:")) {
106
+ return match;
107
+ }
108
+ const newVersion = normalizeVersionRange(
109
+ currentVersion,
110
+ packageName.version
111
+ );
112
+ return newVersion === currentVersion ? match : `"${packageName.name}":"${newVersion}"`;
113
+ });
114
+ }, file.contents);
115
+ return {
116
+ ...file,
117
+ updated
118
+ };
119
+ }).filter(({ contents, updated }) => contents !== updated);
120
+ const patchedPnpmWorkspaces = pnpmWorkspaces.map((file) => {
121
+ const updated = packages.reduce((contents, packageName) => {
122
+ const regex = yamlPackageVersionRegex(packageName.name);
123
+ return contents.replace(regex, (match, currentVersion) => {
124
+ const newVersion = normalizeVersionRange(
125
+ currentVersion,
126
+ packageName.version
127
+ );
128
+ return newVersion === currentVersion ? match : `${packageName.name}: ${newVersion}`;
129
+ });
130
+ }, file.contents);
131
+ return {
132
+ ...file,
133
+ updated
134
+ };
135
+ }).filter(({ contents, updated }) => contents !== updated);
136
+ if (patchedPackageJsons.length === 0 && patchedPnpmWorkspaces.length === 0) {
137
+ return {
138
+ result: "skip",
139
+ reason: "no package.json or pnpm-workspace.yaml files to patch"
140
+ };
141
+ }
142
+ if (mode === "lint") {
143
+ return {
144
+ result: "apply"
145
+ };
146
+ }
147
+ await Promise.all(
148
+ [...patchedPackageJsons, ...patchedPnpmWorkspaces].map(
149
+ async ({ file, updated }) => {
150
+ await import_fs_extra.default.writeFile(file, updated, "utf8");
151
+ }
152
+ )
153
+ );
154
+ const packageManager = await (0, import_packageManager.detectPackageManager)();
155
+ await (0, import_exec.exec)(
156
+ packageManager.command,
157
+ "install",
158
+ "--frozen-lockfile=false",
159
+ "--prefer-offline"
160
+ );
161
+ return {
162
+ result: "apply"
163
+ };
164
+ };
165
+ const tryUpgradeInfraPackages = async (mode, packages) => {
166
+ try {
167
+ return await upgradeInfraPackages(mode, packages);
168
+ } catch (err) {
169
+ import_logging.log.err("Failed to upgrade infrastructure packages");
170
+ import_logging.log.subtle((0, import_node_util.inspect)(err));
171
+ return { result: "skip", reason: "due to an error" };
172
+ }
173
+ };
174
+ // Annotate the CommonJS export names for ESM import in node:
175
+ 0 && (module.exports = {
176
+ tryUpgradeInfraPackages,
177
+ upgradeInfraPackages
178
+ });
179
+ //# sourceMappingURL=upgrade.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/cli/migrate/nodeVersion/upgrade.ts"],
4
+ "sourcesContent": ["import { inspect } from 'node:util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\nimport { coerce, lt } from 'semver';\n\nimport { exec } from '../../../utils/exec.js';\nimport { log } from '../../../utils/logging.js';\nimport { detectPackageManager } from '../../../utils/packageManager.js';\nimport type { PatchReturnType } from '../../lint/internalLints/upgrade/index.js';\n\nconst packageVersionRegex = (packageName: string) =>\n new RegExp(`\"\\\\b${packageName}\\\\b\"\\\\s*:\\\\s*\"([^\"]+)\"`, 'g');\n\nconst yamlPackageVersionRegex = (packageName: string) =>\n new RegExp(`\\\\b${packageName}\\\\b:\\\\s*([^\\\\s]+)`, 'g');\n\nconst normalizeVersionRange = (\n currentVersion: string,\n newVersion: string,\n): string => {\n if (currentVersion.startsWith('^')) {\n return `^${newVersion}`;\n }\n\n if (currentVersion.startsWith('~')) {\n return `~${newVersion}`;\n }\n\n // >=1.2.3, >1.2.3, <=1.2.3, <1.2.3\n if (\n currentVersion.startsWith('>=') ||\n currentVersion.startsWith('>') ||\n currentVersion.startsWith('<=') ||\n currentVersion.startsWith('<')\n ) {\n return `^${newVersion}`;\n }\n\n // 1.x, 1.2.x, 1.x.x\n if (currentVersion.includes('x') || currentVersion.includes('X')) {\n return `^${newVersion}`;\n }\n\n // 1.0.0 - 2.0.0\n if (currentVersion.includes(' - ')) {\n return `^${newVersion}`;\n }\n\n const coercedCurrent = coerce(currentVersion);\n if (coercedCurrent && lt(coercedCurrent, newVersion)) {\n return newVersion;\n }\n\n return currentVersion;\n};\n\ntype PackageInfo = {\n name: string;\n version: string;\n};\n\nexport const upgradeInfraPackages = async (\n mode: 'lint' | 'format',\n packages: PackageInfo[],\n): Promise<PatchReturnType> => {\n const [packageJsonPaths, pnpmWorkspacePaths] = await Promise.all([\n glob(['**/package.json'], {\n ignore: ['**/.git', '**/node_modules'],\n }),\n glob('**/pnpm-workspace.yaml', {\n ignore: ['**/.git', '**/node_modules'],\n }),\n ]);\n\n if (packageJsonPaths.length === 0 && pnpmWorkspacePaths.length === 0) {\n return {\n result: 'skip',\n reason: 'no package.json or pnpm-workspace.yaml files found',\n };\n }\n\n const [packageJsons, pnpmWorkspaces] = await Promise.all([\n Promise.all(\n packageJsonPaths.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n ),\n Promise.all(\n pnpmWorkspacePaths.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n ),\n ]);\n\n const patchedPackageJsons = packageJsons\n .map((file) => {\n const updated = packages.reduce((contents, packageName) => {\n const regex = packageVersionRegex(packageName.name);\n return contents.replaceAll(regex, (match, currentVersion: string) => {\n if (\n currentVersion.startsWith('*') ||\n currentVersion.startsWith('workspace:') ||\n currentVersion.startsWith('link:') ||\n currentVersion.startsWith('file:') ||\n currentVersion.startsWith('catalog:')\n ) {\n return match;\n }\n\n const newVersion = normalizeVersionRange(\n currentVersion,\n packageName.version,\n );\n\n return newVersion === currentVersion\n ? match\n : `\"${packageName.name}\":\"${newVersion}\"`;\n });\n }, file.contents);\n\n return {\n ...file,\n updated,\n };\n })\n .filter(({ contents, updated }) => contents !== updated);\n\n const patchedPnpmWorkspaces = pnpmWorkspaces\n .map((file) => {\n const updated = packages.reduce((contents, packageName) => {\n const regex = yamlPackageVersionRegex(packageName.name);\n return contents.replace(regex, (match, currentVersion: string) => {\n const newVersion = normalizeVersionRange(\n currentVersion,\n packageName.version,\n );\n\n return newVersion === currentVersion\n ? match\n : `${packageName.name}: ${newVersion}`;\n });\n }, file.contents);\n\n return {\n ...file,\n updated,\n };\n })\n .filter(({ contents, updated }) => contents !== updated);\n\n if (patchedPackageJsons.length === 0 && patchedPnpmWorkspaces.length === 0) {\n return {\n result: 'skip',\n reason: 'no package.json or pnpm-workspace.yaml files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n [...patchedPackageJsons, ...patchedPnpmWorkspaces].map(\n async ({ file, updated }) => {\n await fs.writeFile(file, updated, 'utf8');\n },\n ),\n );\n\n const packageManager = await detectPackageManager();\n\n await exec(\n packageManager.command,\n 'install',\n '--frozen-lockfile=false',\n '--prefer-offline',\n );\n\n return {\n result: 'apply',\n };\n};\n\nexport const tryUpgradeInfraPackages = async (\n mode: 'lint' | 'format',\n packages: PackageInfo[],\n): Promise<PatchReturnType> => {\n try {\n return await upgradeInfraPackages(mode, packages);\n } catch (err) {\n log.err('Failed to upgrade infrastructure packages');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AACf,oBAA2B;AAE3B,kBAAqB;AACrB,qBAAoB;AACpB,4BAAqC;AAGrC,MAAM,sBAAsB,CAAC,gBAC3B,IAAI,OAAO,OAAO,WAAW,0BAA0B,GAAG;AAE5D,MAAM,0BAA0B,CAAC,gBAC/B,IAAI,OAAO,MAAM,WAAW,qBAAqB,GAAG;AAEtD,MAAM,wBAAwB,CAC5B,gBACA,eACW;AACX,MAAI,eAAe,WAAW,GAAG,GAAG;AAClC,WAAO,IAAI,UAAU;AAAA,EACvB;AAEA,MAAI,eAAe,WAAW,GAAG,GAAG;AAClC,WAAO,IAAI,UAAU;AAAA,EACvB;AAGA,MACE,eAAe,WAAW,IAAI,KAC9B,eAAe,WAAW,GAAG,KAC7B,eAAe,WAAW,IAAI,KAC9B,eAAe,WAAW,GAAG,GAC7B;AACA,WAAO,IAAI,UAAU;AAAA,EACvB;AAGA,MAAI,eAAe,SAAS,GAAG,KAAK,eAAe,SAAS,GAAG,GAAG;AAChE,WAAO,IAAI,UAAU;AAAA,EACvB;AAGA,MAAI,eAAe,SAAS,KAAK,GAAG;AAClC,WAAO,IAAI,UAAU;AAAA,EACvB;AAEA,QAAM,qBAAiB,sBAAO,cAAc;AAC5C,MAAI,sBAAkB,kBAAG,gBAAgB,UAAU,GAAG;AACpD,WAAO;AAAA,EACT;AAEA,SAAO;A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;AAAA,IACA;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAQ;AAAA,EACV;AACF;AAEO,MAAM,0BAA0B,OACrC,MACA,aAC6B;AAC7B,MAAI;AACF,WAAO,MAAM,qBAAqB,MAAM,QAAQ;AAAA,EAClD,SAAS,KAAK;AACZ,uBAAI,IAAI,2CAA2C;AACnD,uBAAI,WAAO,0BAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
+ "names": ["fs"]
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skuba",
3
- "version": "13.1.1",
3
+ "version": "14.0.0-esbuild-bundle-support-20260101042604",
4
4
  "private": false,
5
5
  "description": "SEEK development toolkit for backend applications and packages",
6
6
  "homepage": "https://github.com/seek-oss/skuba#readme",
@@ -55,6 +55,8 @@
55
55
  ]
56
56
  },
57
57
  "dependencies": {
58
+ "@ast-grep/lang-json": "^0.0.5",
59
+ "@ast-grep/napi": "^0.40.0",
58
60
  "@esbuild-plugins/tsconfig-paths": "^0.1.0",
59
61
  "@inquirer/prompts": "^7.9.0",
60
62
  "@jest/types": "^30.0.0",
@@ -63,7 +65,7 @@
63
65
  "@octokit/rest": "^22.0.0",
64
66
  "@octokit/types": "^16.0.0",
65
67
  "@types/jest": "^30.0.0",
66
- "@types/node": "^22.0.0",
68
+ "@types/node": "^24.10.2",
67
69
  "concurrently": "^9.0.0",
68
70
  "ejs": "^3.1.6",
69
71
  "esbuild": "~0.27.0",
@@ -97,11 +99,11 @@
97
99
  "ts-node": "^10.9.2",
98
100
  "tsconfig-paths": "^4.0.0",
99
101
  "tsconfig-seek": "2.0.0",
100
- "tsx": "^4.16.2",
102
+ "tsx": "^4.21.0",
101
103
  "typescript": "~5.9.0",
102
104
  "zod": "^4.0.0",
103
- "@skuba-lib/api": "^1.0.1",
104
- "eslint-config-skuba": "7.2.1"
105
+ "@skuba-lib/api": "^2.0.0-esbuild-bundle-support-20260101042604",
106
+ "eslint-config-skuba": "8.0.0-esbuild-bundle-support-20260101042604"
105
107
  },
106
108
  "devDependencies": {
107
109
  "@changesets/cli": "2.29.8",
@@ -109,7 +111,7 @@
109
111
  "@jest/reporters": "30.2.0",
110
112
  "@jest/test-result": "30.2.0",
111
113
  "@types/ejs": "3.1.5",
112
- "@types/express": "5.0.3",
114
+ "@types/express": "5.0.6",
113
115
  "@types/fs-extra": "11.0.4",
114
116
  "@types/koa": "3.0.1",
115
117
  "@types/lodash.mergewith": "4.6.9",
@@ -120,13 +122,13 @@
120
122
  "@types/picomatch": "4.0.2",
121
123
  "@types/semver": "7.7.1",
122
124
  "@types/supertest": "6.0.3",
123
- "enhanced-resolve": "5.18.3",
124
- "express": "5.1.0",
125
+ "enhanced-resolve": "5.18.4",
126
+ "express": "5.2.1",
125
127
  "fastify": "5.6.2",
126
128
  "jest-diff": "30.2.0",
127
129
  "jsonfile": "6.2.0",
128
130
  "koa": "3.1.1",
129
- "memfs": "4.51.0",
131
+ "memfs": "4.51.1",
130
132
  "remark-cli": "12.0.1",
131
133
  "remark-preset-lint-recommended": "7.0.1",
132
134
  "semver": "7.7.3",
@@ -134,14 +136,14 @@
134
136
  "type-fest": "2.19.0"
135
137
  },
136
138
  "engines": {
137
- "node": ">=20.9.0"
139
+ "node": ">=22.14.0"
138
140
  },
139
141
  "skuba": {
140
142
  "build": "esbuild",
141
143
  "entryPoint": "src/index.ts",
142
144
  "template": null,
143
145
  "type": "package",
144
- "version": "13.0.0"
146
+ "version": "13.1.1"
145
147
  },
146
148
  "scripts": {
147
149
  "build": "scripts/build.sh",
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -28,9 +28,9 @@
28
28
  "@opentelemetry/sdk-node": "^0.208.0",
29
29
  "@seek/logger": "^11.1.0",
30
30
  "express": "^5.0.0",
31
- "hot-shots": "^11.0.0",
31
+ "hot-shots": "^12.0.0",
32
32
  "seek-datadog-custom-metrics": "^6.0.0",
33
- "skuba-dive": "^2.0.0"
33
+ "skuba-dive": "^3.0.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/express": "^5.0.0",
@@ -40,8 +40,8 @@
40
40
  "skuba": "*",
41
41
  "supertest": "^7.0.0"
42
42
  },
43
- "packageManager": "pnpm@10.24.0",
43
+ "packageManager": "pnpm@10.26.2",
44
44
  "engines": {
45
- "node": ">=22"
45
+ "node": ">=24"
46
46
  }
47
47
  }
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -19,14 +19,14 @@
19
19
  "test:watch": "skuba test --watch"
20
20
  },
21
21
  "dependencies": {
22
- "skuba-dive": "^3.0.0"
22
+ "skuba-dive": "4.0.0-esbuild-bundle-support-20260101042604"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@types/node": "^22.13.10",
26
- "skuba": "*"
26
+ "skuba": "14.0.0-esbuild-bundle-support-20260101042604"
27
27
  },
28
- "packageManager": "pnpm@10.24.0",
28
+ "packageManager": "pnpm@10.26.2",
29
29
  "engines": {
30
- "node": ">=22"
30
+ "node": ">=24"
31
31
  }
32
32
  }
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "@koa/bodyparser": "^6.0.0",
23
- "@koa/router": "^14.0.0",
23
+ "@koa/router": "15.0.0",
24
24
  "@opentelemetry/api": "^1.9.0",
25
25
  "@opentelemetry/core": "^2.0.0",
26
26
  "@opentelemetry/exporter-trace-otlp-grpc": "^0.208.0",
@@ -29,19 +29,18 @@
29
29
  "@opentelemetry/propagator-b3": "^2.0.0",
30
30
  "@opentelemetry/sdk-node": "^0.208.0",
31
31
  "@seek/logger": "^11.1.0",
32
- "hot-shots": "^11.0.0",
32
+ "hot-shots": "^12.0.0",
33
33
  "koa": "^3.0.1",
34
34
  "koa-compose": "^4.1.0",
35
35
  "seek-datadog-custom-metrics": "^6.0.0",
36
36
  "seek-koala": "^7.1.0",
37
- "skuba-dive": "^2.0.0",
37
+ "skuba-dive": "^3.0.0",
38
38
  "zod": "^4.0.0"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/chance": "^1.1.3",
42
42
  "@types/co-body": "^6.1.3",
43
43
  "@types/koa": "^3.0.0",
44
- "@types/koa__router": "^12.0.0",
45
44
  "@types/node": "^22.13.10",
46
45
  "@types/supertest": "^6.0.0",
47
46
  "chance": "^1.1.8",
@@ -49,8 +48,8 @@
49
48
  "skuba": "*",
50
49
  "supertest": "^7.0.0"
51
50
  },
52
- "packageManager": "pnpm@10.24.0",
51
+ "packageManager": "pnpm@10.26.2",
53
52
  "engines": {
54
- "node": ">=22"
53
+ "node": ">=24"
55
54
  }
56
55
  }
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -216,7 +216,7 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
216
216
  {
217
217
  "Ref": "AWS::Region",
218
218
  },
219
- ":464622532012:layer:Datadog-Node22-x:x",
219
+ ":464622532012:layer:Datadog-Node24-x:x",
220
220
  ],
221
221
  ],
222
222
  },
@@ -241,7 +241,7 @@ exports[`returns expected CloudFormation stack for dev 1`] = `
241
241
  "Arn",
242
242
  ],
243
243
  },
244
- "Runtime": "nodejs22.x",
244
+ "Runtime": "nodejs24.x",
245
245
  "Tags": [
246
246
  {
247
247
  "Key": "aws-codedeploy-hooks",
@@ -958,7 +958,7 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
958
958
  {
959
959
  "Ref": "AWS::Region",
960
960
  },
961
- ":464622532012:layer:Datadog-Node22-x:x",
961
+ ":464622532012:layer:Datadog-Node24-x:x",
962
962
  ],
963
963
  ],
964
964
  },
@@ -983,7 +983,7 @@ exports[`returns expected CloudFormation stack for prod 1`] = `
983
983
  "Arn",
984
984
  ],
985
985
  },
986
- "Runtime": "nodejs22.x",
986
+ "Runtime": "nodejs24.x",
987
987
  "Tags": [
988
988
  {
989
989
  "Key": "aws-codedeploy-hooks",
@@ -19,7 +19,7 @@ import { DatadogLambda } from 'datadog-cdk-constructs-v2';
19
19
  import { config } from './config.js';
20
20
 
21
21
  // Updated by https://github.com/seek-oss/rynovate
22
- const DATADOG_EXTENSION_LAYER_VERSION = 90;
22
+ const DATADOG_EXTENSION_LAYER_VERSION = 91;
23
23
 
24
24
  // Updated by https://github.com/seek-oss/rynovate
25
25
  const DATADOG_NODE_LAYER_VERSION = 126;
@@ -86,7 +86,7 @@ export class AppStack extends Stack {
86
86
 
87
87
  const worker = new aws_lambda_nodejs.NodejsFunction(this, 'worker', {
88
88
  architecture: aws_lambda.Architecture[architecture],
89
- runtime: aws_lambda.Runtime.NODEJS_22_X,
89
+ runtime: aws_lambda.Runtime.NODEJS_24_X,
90
90
  memorySize: 512,
91
91
  environmentEncryption: kmsKey,
92
92
  // aws-sdk-v3 sets this to true by default, so it is not necessary to set the environment variable
@@ -96,7 +96,7 @@ export class AppStack extends Stack {
96
96
  timeout: Duration.seconds(30),
97
97
  bundling: {
98
98
  sourceMap: true,
99
- target: 'node22',
99
+ target: 'node24',
100
100
  // aws-sdk-v3 is set as an external module by default, but we want it to be bundled with the function
101
101
  externalModules: [],
102
102
  esbuildArgs: {
@@ -24,7 +24,7 @@
24
24
  "@aws-sdk/client-sns": "^3.363.0",
25
25
  "@seek/aws-codedeploy-hooks": "^2.0.0",
26
26
  "@seek/logger": "^11.1.0",
27
- "skuba-dive": "^3.0.0",
27
+ "skuba-dive": "4.0.0-esbuild-bundle-support-20260101042604",
28
28
  "zod": "^4.0.0"
29
29
  },
30
30
  "devDependencies": {
@@ -33,19 +33,19 @@
33
33
  "@types/chance": "^1.1.3",
34
34
  "@types/node": "^22.13.10",
35
35
  "aws-cdk": "^2.1010.0",
36
- "aws-cdk-lib": "^2.190.0",
36
+ "aws-cdk-lib": "^2.232.1",
37
37
  "aws-sdk-client-mock": "^4.0.0",
38
38
  "aws-sdk-client-mock-jest": "^4.0.0",
39
39
  "chance": "^1.1.8",
40
40
  "constructs": "^10.0.17",
41
- "datadog-cdk-constructs-v2": "^3.0.0",
41
+ "datadog-cdk-constructs-v2": "^3.4.0",
42
42
  "datadog-lambda-js": "^12.0.0",
43
43
  "dd-trace": "^5.0.0",
44
44
  "pino-pretty": "^13.0.0",
45
- "skuba": "*"
45
+ "skuba": "14.0.0-esbuild-bundle-support-20260101042604"
46
46
  },
47
- "packageManager": "pnpm@10.24.0",
47
+ "packageManager": "pnpm@10.26.2",
48
48
  "engines": {
49
- "node": ">=22"
49
+ "node": ">=24"
50
50
  }
51
51
  }
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -1 +1 @@
1
- 22
1
+ 24
@@ -46,6 +46,6 @@
46
46
  },
47
47
  "packageManager": "pnpm@10.7.0",
48
48
  "engines": {
49
- "node": ">=22"
49
+ "node": ">=20"
50
50
  }
51
51
  }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.1.0/index.ts"],
4
- "sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryUpgradeNode } from './upgradeNode.js';\n\nexport const patches: Patches = [\n {\n apply: tryUpgradeNode,\n description: 'Upgrade Node.js to version 22',\n },\n];\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAA+B;AAExB,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.ts"],
4
- "sourcesContent": ["import { inspect } from 'util';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport { nodeVersionMigration } from '../../../../../migrate/nodeVersion/index.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst upgradeNode: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n if (process.env.SKIP_NODE_UPGRADE) {\n return {\n result: 'skip',\n reason: 'SKIP_NODE_UPGRADE environment variable set',\n };\n }\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await nodeVersionMigration({\n nodeVersion: 22,\n ECMAScriptVersion: 'ES2024',\n });\n\n return { result: 'apply' };\n};\n\nexport const tryUpgradeNode: PatchFunction = async (config) => {\n try {\n return await upgradeNode(config);\n } catch (err) {\n log.warn('Failed to upgrade node version');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,qBAAoB;AACpB,yBAAqC;AAGrC,MAAM,cAA6B,OAAO;AAAA,EACxC;AACF,MAAgC;AAC9B,MAAI,QAAQ,IAAI,mBAAmB;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AACA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,YAAM,yCAAqB;AAAA,IACzB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AAED,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,iBAAgC,OAAO,WAAW;AAC7D,MAAI;AACF,WAAO,MAAM,YAAY,MAAM;AAAA,EACjC,SAAS,KAAK;AACZ,uBAAI,KAAK,gCAAgC;AACzC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
6
- "names": []
7
- }