skuba 9.0.0-renovate-eslint-9.x-20240811060718 → 9.0.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.
Files changed (70) hide show
  1. package/lib/api/buildkite/annotate.d.ts +2 -0
  2. package/lib/api/buildkite/annotate.js +14 -1
  3. package/lib/api/buildkite/annotate.js.map +2 -2
  4. package/lib/api/github/issueComment.js.map +2 -2
  5. package/lib/cli/adapter/eslint.js +16 -10
  6. package/lib/cli/adapter/eslint.js.map +2 -2
  7. package/lib/cli/build/index.js +1 -0
  8. package/lib/cli/build/index.js.map +1 -1
  9. package/lib/cli/configure/analyseDependencies.js +0 -2
  10. package/lib/cli/configure/analyseDependencies.js.map +2 -2
  11. package/lib/cli/configure/analysis/package.d.ts +1 -2
  12. package/lib/cli/configure/analysis/package.js +0 -27
  13. package/lib/cli/configure/analysis/package.js.map +2 -2
  14. package/lib/cli/configure/dependencies/skubaDeps.js +4 -3
  15. package/lib/cli/configure/dependencies/skubaDeps.js.map +2 -2
  16. package/lib/cli/lint/autofix.js +0 -15
  17. package/lib/cli/lint/autofix.js.map +2 -2
  18. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +16 -10
  19. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
  20. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +15 -0
  21. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +2 -2
  22. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +2 -0
  23. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +82 -0
  24. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +7 -0
  25. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +2 -0
  26. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +97 -0
  27. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +7 -0
  28. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +2 -0
  29. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +141 -0
  30. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +7 -0
  31. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +24 -18
  32. package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +2 -2
  33. package/lib/cli/node.d.ts +2 -1
  34. package/lib/cli/node.js +23 -18
  35. package/lib/cli/node.js.map +3 -3
  36. package/lib/cli/start.js +3 -3
  37. package/lib/cli/start.js.map +2 -2
  38. package/lib/utils/template.d.ts +4 -4
  39. package/lib/wrapper/requestListener.js.map +2 -2
  40. package/package.json +17 -16
  41. package/template/express-rest-api/.buildkite/pipeline.yml +3 -3
  42. package/template/express-rest-api/Dockerfile +1 -1
  43. package/template/express-rest-api/Dockerfile.dev-deps +2 -2
  44. package/template/express-rest-api/package.json +3 -3
  45. package/template/greeter/.buildkite/pipeline.yml +3 -3
  46. package/template/greeter/Dockerfile +2 -2
  47. package/template/greeter/package.json +2 -2
  48. package/template/koa-rest-api/.buildkite/pipeline.yml +3 -3
  49. package/template/koa-rest-api/Dockerfile +1 -1
  50. package/template/koa-rest-api/Dockerfile.dev-deps +2 -2
  51. package/template/koa-rest-api/package.json +10 -10
  52. package/template/koa-rest-api/src/framework/bodyParser.ts +1 -1
  53. package/template/koa-rest-api/src/framework/server.test.ts +0 -1
  54. package/template/koa-rest-api/src/framework/server.ts +3 -5
  55. package/template/lambda-sqs-worker/.buildkite/pipeline.yml +4 -4
  56. package/template/lambda-sqs-worker/Dockerfile +2 -2
  57. package/template/lambda-sqs-worker/package.json +4 -4
  58. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +4 -4
  59. package/template/lambda-sqs-worker-cdk/Dockerfile +2 -2
  60. package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +447 -891
  61. package/template/lambda-sqs-worker-cdk/infra/appStack.test.ts +4 -1
  62. package/template/lambda-sqs-worker-cdk/infra/appStack.ts +5 -84
  63. package/template/lambda-sqs-worker-cdk/infra/config.ts +1 -1
  64. package/template/lambda-sqs-worker-cdk/infra/index.ts +20 -3
  65. package/template/lambda-sqs-worker-cdk/package.json +5 -4
  66. package/template/oss-npm-package/.github/workflows/release.yml +1 -1
  67. package/template/oss-npm-package/_package.json +1 -1
  68. package/template/private-npm-package/_package.json +1 -1
  69. package/template/lambda-sqs-worker-cdk/src/postHook.ts +0 -154
  70. package/template/lambda-sqs-worker-cdk/src/preHook.ts +0 -95
@@ -28,12 +28,12 @@ export declare const templateConfigSchema: z.ZodObject<{
28
28
  message: string;
29
29
  name: string;
30
30
  initial: string;
31
- validate?: ((args_0: string, ...args_1: unknown[]) => string | boolean) | undefined;
31
+ validate?: ((args_0: string, ...args: unknown[]) => string | boolean) | undefined;
32
32
  }, {
33
33
  message: string;
34
34
  name: string;
35
35
  initial: string;
36
- validate?: ((args_0: string, ...args_1: unknown[]) => string | boolean) | undefined;
36
+ validate?: ((args_0: string, ...args: unknown[]) => string | boolean) | undefined;
37
37
  }>, "many">;
38
38
  entryPoint: z.ZodOptional<z.ZodString>;
39
39
  noSkip: z.ZodOptional<z.ZodBoolean>;
@@ -44,7 +44,7 @@ export declare const templateConfigSchema: z.ZodObject<{
44
44
  message: string;
45
45
  name: string;
46
46
  initial: string;
47
- validate?: ((args_0: string, ...args_1: unknown[]) => string | boolean) | undefined;
47
+ validate?: ((args_0: string, ...args: unknown[]) => string | boolean) | undefined;
48
48
  }[];
49
49
  packageManager: "yarn" | "pnpm";
50
50
  type?: "package" | "application" | undefined;
@@ -55,7 +55,7 @@ export declare const templateConfigSchema: z.ZodObject<{
55
55
  message: string;
56
56
  name: string;
57
57
  initial: string;
58
- validate?: ((args_0: string, ...args_1: unknown[]) => string | boolean) | undefined;
58
+ validate?: ((args_0: string, ...args: unknown[]) => string | boolean) | undefined;
59
59
  }[];
60
60
  type?: "package" | "application" | undefined;
61
61
  entryPoint?: string | undefined;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/wrapper/requestListener.ts"],
4
- "sourcesContent": ["import http from 'http';\n\nimport { isFunction, isIpPort, isObject } from '../utils/validation';\n\nimport { serveRequestListener, startServer } from './http';\n\n// Express compatibility\ninterface FunctionConfig extends http.RequestListener {\n port?: number;\n}\n\ninterface ObjectConfig {\n // Koa compatibility\n callback?: () => http.RequestListener;\n\n requestListener?: http.RequestListener;\n\n // Fastify compatibility\n server?: http.Server;\n\n default?: Promise<unknown>;\n port?: unknown;\n}\n\nconst isConfig = (\n data: unknown,\n): data is Promise<FunctionConfig> | Promise<ObjectConfig> =>\n isFunction(data) || isObject(data);\n\ninterface Args {\n availablePort?: number;\n entryPoint: unknown;\n}\n\n/**\n * Create an HTTP server that calls into an exported `http.RequestListener`.\n *\n * This supports Express and Koa applications out of the box.\n */\nexport const runRequestListener = async ({\n availablePort,\n entryPoint,\n}: Args): Promise<void> => {\n if (!isConfig(entryPoint)) {\n // Assume an executable script with weird exports\n return;\n }\n\n let config: FunctionConfig | ObjectConfig = await entryPoint;\n\n if (typeof config === 'object' && isConfig(config.default)) {\n // Prefer `export default` over `export =`\n config = await config.default;\n }\n\n if (Object.keys(config).length === 0) {\n // Assume an executable script with no exports\n return;\n }\n\n const port = isIpPort(config.port) ? config.port : availablePort;\n\n // http.Server support\n if (typeof config !== 'function' && config instanceof http.Server) {\n return startServer(config, port);\n }\n\n // Fastify workaround\n if (\n typeof config !== 'function' &&\n config.server &&\n config.server instanceof http.Server\n ) {\n return startServer(config.server, port);\n }\n\n const requestListener =\n typeof config === 'function'\n ? config\n : config.requestListener ?? config.callback?.();\n\n if (typeof requestListener !== 'function') {\n // Assume an executable script with non-request listener exports\n return;\n }\n\n return serveRequestListener(requestListener, port);\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,wBAA+C;AAE/C,IAAAA,eAAkD;AAoBlD,MAAM,WAAW,CACf,aAEA,8BAAW,IAAI,SAAK,4BAAS,IAAI;AAY5B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA2B;AACzB,MAAI,CAAC,SAAS,UAAU,GAAG;AAEzB;AAAA,EACF;AAEA,MAAI,SAAwC,MAAM;AAElD,MAAI,OAAO,WAAW,YAAY,SAAS,OAAO,OAAO,GAAG;AAE1D,aAAS,MAAM,OAAO;AAAA,EACxB;AAEA,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC;AAAA,EACF;AAEA,QAAM,WAAO,4BAAS,OAAO,IAAI,IAAI,OAAO,OAAO;AAGnD,MAAI,OAAO,WAAW,cAAc,kBAAkB,YAAAC,QAAK,QAAQ;AACjE,eAAO,0BAAY,QAAQ,IAAI;AAAA,EACjC;AAGA,MACE,OAAO,WAAW,cAClB,OAAO,UACP,OAAO,kBAAkB,YAAAA,QAAK,QAC9B;AACA,eAAO,0BAAY,OAAO,QAAQ,IAAI;AAAA,EACxC;AAEA,QAAM,kBACJ,OAAO,WAAW,aACd,SACA,OAAO,mBAAmB,OAAO,WAAW;AAElD,MAAI,OAAO,oBAAoB,YAAY;AAEzC;AAAA,EACF;AAEA,aAAO,mCAAqB,iBAAiB,IAAI;AACnD;",
4
+ "sourcesContent": ["import http from 'http';\n\nimport { isFunction, isIpPort, isObject } from '../utils/validation';\n\nimport { serveRequestListener, startServer } from './http';\n\n// Express compatibility\ninterface FunctionConfig extends http.RequestListener {\n port?: number;\n}\n\ninterface ObjectConfig {\n // Koa compatibility\n callback?: () => http.RequestListener;\n\n requestListener?: http.RequestListener;\n\n // Fastify compatibility\n server?: http.Server;\n\n default?: Promise<unknown>;\n port?: unknown;\n}\n\nconst isConfig = (\n data: unknown,\n): data is Promise<FunctionConfig> | Promise<ObjectConfig> =>\n isFunction(data) || isObject(data);\n\ninterface Args {\n availablePort?: number;\n entryPoint: unknown;\n}\n\n/**\n * Create an HTTP server that calls into an exported `http.RequestListener`.\n *\n * This supports Express and Koa applications out of the box.\n */\nexport const runRequestListener = async ({\n availablePort,\n entryPoint,\n}: Args): Promise<void> => {\n if (!isConfig(entryPoint)) {\n // Assume an executable script with weird exports\n return;\n }\n\n let config: FunctionConfig | ObjectConfig = await entryPoint;\n\n if (typeof config === 'object' && isConfig(config.default)) {\n // Prefer `export default` over `export =`\n config = await config.default;\n }\n\n if (Object.keys(config).length === 0) {\n // Assume an executable script with no exports\n return;\n }\n\n const port = isIpPort(config.port) ? config.port : availablePort;\n\n // http.Server support\n if (typeof config !== 'function' && config instanceof http.Server) {\n return startServer(config, port);\n }\n\n // Fastify workaround\n if (\n typeof config !== 'function' &&\n config.server &&\n config.server instanceof http.Server\n ) {\n return startServer(config.server, port);\n }\n\n const requestListener =\n typeof config === 'function'\n ? config\n : (config.requestListener ?? config.callback?.());\n\n if (typeof requestListener !== 'function') {\n // Assume an executable script with non-request listener exports\n return;\n }\n\n return serveRequestListener(requestListener, port);\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,wBAA+C;AAE/C,IAAAA,eAAkD;AAoBlD,MAAM,WAAW,CACf,aAEA,8BAAW,IAAI,SAAK,4BAAS,IAAI;AAY5B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA2B;AACzB,MAAI,CAAC,SAAS,UAAU,GAAG;AAEzB;AAAA,EACF;AAEA,MAAI,SAAwC,MAAM;AAElD,MAAI,OAAO,WAAW,YAAY,SAAS,OAAO,OAAO,GAAG;AAE1D,aAAS,MAAM,OAAO;AAAA,EACxB;AAEA,MAAI,OAAO,KAAK,MAAM,EAAE,WAAW,GAAG;AAEpC;AAAA,EACF;AAEA,QAAM,WAAO,4BAAS,OAAO,IAAI,IAAI,OAAO,OAAO;AAGnD,MAAI,OAAO,WAAW,cAAc,kBAAkB,YAAAC,QAAK,QAAQ;AACjE,eAAO,0BAAY,QAAQ,IAAI;AAAA,EACjC;AAGA,MACE,OAAO,WAAW,cAClB,OAAO,UACP,OAAO,kBAAkB,YAAAA,QAAK,QAC9B;AACA,eAAO,0BAAY,OAAO,QAAQ,IAAI;AAAA,EACxC;AAEA,QAAM,kBACJ,OAAO,WAAW,aACd,SACC,OAAO,mBAAmB,OAAO,WAAW;AAEnD,MAAI,OAAO,oBAAoB,YAAY;AAEzC;AAAA,EACF;AAEA,aAAO,mCAAqB,iBAAiB,IAAI;AACnD;",
6
6
  "names": ["import_http", "http"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skuba",
3
- "version": "9.0.0-renovate-eslint-9.x-20240811060718",
3
+ "version": "9.0.0",
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",
@@ -58,14 +58,14 @@
58
58
  "@octokit/rest": "^21.0.0",
59
59
  "@octokit/types": "^13.0.0",
60
60
  "@types/jest": "^29.0.0",
61
- "@types/node": ">=18.12",
61
+ "@types/node": "^20.16.5",
62
62
  "chalk": "^4.1.0",
63
- "concurrently": "^8.0.0",
63
+ "concurrently": "^9.0.0",
64
64
  "dotenv": "^16.0.0",
65
65
  "ejs": "^3.1.6",
66
66
  "enquirer": "^2.3.6",
67
- "esbuild": "~0.23.0",
68
- "eslint": "^9.0.0",
67
+ "esbuild": "~0.24.0",
68
+ "eslint": "^9.11.1",
69
69
  "execa": "^5.0.0",
70
70
  "fast-glob": "^3.3.2",
71
71
  "find-up": "^5.0.0",
@@ -81,7 +81,7 @@
81
81
  "libnpmsearch": "^7.0.0",
82
82
  "lodash.mergewith": "^4.6.2",
83
83
  "minimist": "^1.2.6",
84
- "normalize-package-data": "^6.0.0",
84
+ "normalize-package-data": "^7.0.0",
85
85
  "npm-run-path": "^4.0.1",
86
86
  "npm-which": "^3.0.1",
87
87
  "picomatch": "^4.0.0",
@@ -95,16 +95,16 @@
95
95
  "ts-dedent": "^2.2.0",
96
96
  "ts-jest": "^29.1.0",
97
97
  "ts-node": "^10.9.2",
98
- "ts-node-dev": "^2.0.0",
99
98
  "tsconfig-paths": "^4.0.0",
100
99
  "tsconfig-seek": "2.0.0",
101
- "typescript": "~5.5.4",
102
- "validate-npm-package-name": "^5.0.0",
100
+ "tsx": "^4.16.2",
101
+ "typescript": "~5.6.0",
102
+ "validate-npm-package-name": "^6.0.0",
103
103
  "zod": "^3.22.4",
104
- "eslint-config-skuba": "5.0.0-renovate-eslint-9.x-20240811060718"
104
+ "eslint-config-skuba": "5.0.0"
105
105
  },
106
106
  "devDependencies": {
107
- "@changesets/cli": "2.27.7",
107
+ "@changesets/cli": "2.27.8",
108
108
  "@changesets/get-github-info": "0.6.0",
109
109
  "@jest/reporters": "29.7.0",
110
110
  "@jest/test-result": "29.7.0",
@@ -117,16 +117,16 @@
117
117
  "@types/minimist": "1.2.5",
118
118
  "@types/module-alias": "2.0.4",
119
119
  "@types/npm-which": "3.0.3",
120
- "@types/picomatch": "2.3.4",
120
+ "@types/picomatch": "3.0.1",
121
121
  "@types/supertest": "6.0.2",
122
122
  "@types/validate-npm-package-name": "4.0.2",
123
123
  "enhanced-resolve": "5.17.1",
124
- "express": "4.19.2",
125
- "fastify": "4.28.1",
124
+ "express": "4.21.0",
125
+ "fastify": "5.0.0",
126
126
  "jest-diff": "29.7.0",
127
127
  "jsonfile": "6.1.0",
128
128
  "koa": "2.15.3",
129
- "memfs": "4.11.1",
129
+ "memfs": "4.12.0",
130
130
  "remark-cli": "12.0.1",
131
131
  "remark-preset-lint-recommended": "7.0.0",
132
132
  "semver": "7.6.3",
@@ -152,7 +152,7 @@
152
152
  "entryPoint": "src/index.ts",
153
153
  "template": null,
154
154
  "type": "package",
155
- "version": "8.2.1"
155
+ "version": "9.0.0"
156
156
  },
157
157
  "scripts": {
158
158
  "build": "scripts/build.sh",
@@ -169,6 +169,7 @@
169
169
  "test:ci": "pnpm --silent skuba test --runInBand",
170
170
  "test:int": "pnpm --silent skuba test --selectProjects integration --runInBand",
171
171
  "test:template": "scripts/test-template.sh",
172
+ "test:template:updateSnapshot": "scripts/test-template.sh -u",
172
173
  "test:watch": "pnpm --silent skuba test --runInBand --watch"
173
174
  }
174
175
  }
@@ -15,12 +15,12 @@ configs:
15
15
  - package.json#.packageManager
16
16
  - pnpm-lock.yaml
17
17
  dockerfile: Dockerfile.dev-deps
18
- secrets: id=npm,src=tmp/.npmrc
18
+ secrets: id=npm,src=/tmp/.npmrc
19
19
 
20
20
  - &private-npm
21
21
  seek-oss/private-npm#v1.2.0:
22
22
  env: NPM_READ_TOKEN
23
- output-path: tmp/
23
+ output-path: /tmp/
24
24
 
25
25
  base-steps:
26
26
  - &deploy
@@ -57,7 +57,7 @@ steps:
57
57
  - *aws-sm
58
58
  - *private-npm
59
59
  - *docker-ecr-cache
60
- - docker-compose#v5.3.0:
60
+ - docker-compose#v5.4.0:
61
61
  run: app
62
62
  environment:
63
63
  - GITHUB_API_TOKEN
@@ -12,7 +12,7 @@ RUN pnpm install --offline --prod
12
12
 
13
13
  ###
14
14
 
15
- FROM --platform=<%- platformName %> gcr.io/distroless/nodejs20-debian12 AS runtime
15
+ FROM gcr.io/distroless/nodejs20-debian12 AS runtime
16
16
 
17
17
  WORKDIR /workdir
18
18
 
@@ -1,6 +1,6 @@
1
- # syntax=docker/dockerfile:1.9
1
+ # syntax=docker/dockerfile:1.10
2
2
 
3
- FROM --platform=<%- platformName %> node:20-alpine AS dev-deps
3
+ FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
4
4
 
5
5
  RUN --mount=type=bind,source=package.json,target=package.json \
6
6
  corepack enable pnpm && corepack install
@@ -13,7 +13,7 @@
13
13
  "test:watch": "skuba test --watch"
14
14
  },
15
15
  "dependencies": {
16
- "@seek/logger": "^6.0.0",
16
+ "@seek/logger": "^9.0.0",
17
17
  "express": "^4.17.1",
18
18
  "hot-shots": "^10.0.0",
19
19
  "seek-datadog-custom-metrics": "^4.6.3",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "devDependencies": {
23
23
  "@types/express": "^4.17.13",
24
- "@types/node": "^20.9.0",
24
+ "@types/node": "^20.16.5",
25
25
  "@types/supertest": "^6.0.0",
26
26
  "mime": "^4.0.1",
27
27
  "pino-pretty": "^11.0.0",
28
28
  "skuba": "*",
29
29
  "supertest": "^7.0.0"
30
30
  },
31
- "packageManager": "pnpm@9.6.0",
31
+ "packageManager": "pnpm@9.11.0",
32
32
  "engines": {
33
33
  "node": ">=20"
34
34
  }
@@ -16,12 +16,12 @@ configs:
16
16
  - .npmrc
17
17
  - package.json#.packageManager
18
18
  - pnpm-lock.yaml
19
- secrets: id=npm,src=tmp/.npmrc
19
+ secrets: id=npm,src=/tmp/.npmrc
20
20
 
21
21
  - &private-npm
22
22
  seek-oss/private-npm#v1.2.0:
23
23
  env: NPM_READ_TOKEN
24
- output-path: tmp/
24
+ output-path: /tmp/
25
25
 
26
26
  steps:
27
27
  - label: 🧪 Test & Lint
@@ -38,7 +38,7 @@ steps:
38
38
  - *aws-sm
39
39
  - *private-npm
40
40
  - *docker-ecr-cache
41
- - docker-compose#v5.3.0:
41
+ - docker-compose#v5.4.0:
42
42
  run: app
43
43
  environment:
44
44
  - GITHUB_API_TOKEN
@@ -1,6 +1,6 @@
1
- # syntax=docker/dockerfile:1.9
1
+ # syntax=docker/dockerfile:1.10
2
2
 
3
- FROM --platform=<%- platformName %> node:20-alpine AS dev-deps
3
+ FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
4
4
 
5
5
  RUN --mount=type=bind,source=package.json,target=package.json \
6
6
  corepack enable pnpm && corepack install
@@ -17,9 +17,9 @@
17
17
  },
18
18
  "devDependencies": {
19
19
  "@types/node": "^20.9.0",
20
- "skuba": "9.0.0-renovate-eslint-9.x-20240811060718"
20
+ "skuba": "*"
21
21
  },
22
- "packageManager": "pnpm@9.6.0",
22
+ "packageManager": "pnpm@9.11.0",
23
23
  "engines": {
24
24
  "node": ">=20"
25
25
  }
@@ -15,12 +15,12 @@ configs:
15
15
  - package.json#.packageManager
16
16
  - pnpm-lock.yaml
17
17
  dockerfile: Dockerfile.dev-deps
18
- secrets: id=npm,src=tmp/.npmrc
18
+ secrets: id=npm,src=/tmp/.npmrc
19
19
 
20
20
  - &private-npm
21
21
  seek-oss/private-npm#v1.2.0:
22
22
  env: NPM_READ_TOKEN
23
- output-path: tmp/
23
+ output-path: /tmp/
24
24
 
25
25
  base-steps:
26
26
  - &deploy
@@ -57,7 +57,7 @@ steps:
57
57
  - *aws-sm
58
58
  - *private-npm
59
59
  - *docker-ecr-cache
60
- - docker-compose#v5.3.0:
60
+ - docker-compose#v5.4.0:
61
61
  run: app
62
62
  environment:
63
63
  - GITHUB_API_TOKEN
@@ -12,7 +12,7 @@ RUN pnpm install --offline --prod
12
12
 
13
13
  ###
14
14
 
15
- FROM --platform=<%- platformName %> gcr.io/distroless/nodejs20-debian12 AS runtime
15
+ FROM gcr.io/distroless/nodejs20-debian12 AS runtime
16
16
 
17
17
  WORKDIR /workdir
18
18
 
@@ -1,6 +1,6 @@
1
- # syntax=docker/dockerfile:1.9
1
+ # syntax=docker/dockerfile:1.10
2
2
 
3
- FROM --platform=<%- platformName %> node:20-alpine AS dev-deps
3
+ FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
4
4
 
5
5
  RUN --mount=type=bind,source=package.json,target=package.json \
6
6
  corepack enable pnpm && corepack install
@@ -13,18 +13,18 @@
13
13
  "test:watch": "skuba test --watch"
14
14
  },
15
15
  "dependencies": {
16
- "@koa/router": "^12.0.0",
16
+ "@koa/bodyparser": "^5.1.1",
17
+ "@koa/router": "^13.0.0",
17
18
  "@opentelemetry/api": "^1.9.0",
18
19
  "@opentelemetry/core": "^1.25.0",
19
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.52.0",
20
- "@opentelemetry/instrumentation-aws-sdk": "^0.43.0",
21
- "@opentelemetry/instrumentation-http": "^0.52.0",
20
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.53.0",
21
+ "@opentelemetry/instrumentation-aws-sdk": "^0.44.0",
22
+ "@opentelemetry/instrumentation-http": "^0.53.0",
22
23
  "@opentelemetry/propagator-b3": "^1.25.0",
23
- "@opentelemetry/sdk-node": "^0.52.0",
24
- "@seek/logger": "^6.0.0",
24
+ "@opentelemetry/sdk-node": "^0.53.0",
25
+ "@seek/logger": "^9.0.0",
25
26
  "hot-shots": "^10.0.0",
26
27
  "koa": "^2.13.4",
27
- "koa-bodyparser": "^4.3.0",
28
28
  "koa-compose": "^4.1.0",
29
29
  "seek-datadog-custom-metrics": "^4.6.3",
30
30
  "seek-koala": "^7.0.0",
@@ -33,10 +33,10 @@
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/chance": "^1.1.3",
36
+ "@types/co-body": "^6.1.3",
36
37
  "@types/koa": "^2.13.4",
37
- "@types/koa-bodyparser": "^5.0.2",
38
38
  "@types/koa__router": "^12.0.0",
39
- "@types/node": "^20.9.0",
39
+ "@types/node": "^20.16.5",
40
40
  "@types/supertest": "^6.0.0",
41
41
  "chance": "^1.1.8",
42
42
  "mime": "^4.0.1",
@@ -44,7 +44,7 @@
44
44
  "skuba": "*",
45
45
  "supertest": "^7.0.0"
46
46
  },
47
- "packageManager": "pnpm@9.6.0",
47
+ "packageManager": "pnpm@9.11.0",
48
48
  "engines": {
49
49
  "node": ">=20"
50
50
  }
@@ -1,3 +1,3 @@
1
- import bodyParser from 'koa-bodyparser';
1
+ import { bodyParser } from '@koa/bodyparser';
2
2
 
3
3
  export const jsonBodyParser = bodyParser({ enableTypes: ['json'] });
@@ -203,7 +203,6 @@ describe('createApp', () => {
203
203
 
204
204
  it('handles null error', async () => {
205
205
  middleware.mockImplementation(() => {
206
- /* eslint-disable-next-line @typescript-eslint/only-throw-error */
207
206
  throw null;
208
207
  });
209
208
 
@@ -4,7 +4,7 @@ import {
4
4
  ErrorMiddleware,
5
5
  MetricsMiddleware,
6
6
  RequestLogging,
7
- // SecureHeaders,
7
+ SecureHeaders,
8
8
  VersionMiddleware,
9
9
  } from 'seek-koala';
10
10
 
@@ -39,10 +39,8 @@ export const createApp = <State, Context>(
39
39
  ...middleware: Array<Koa.Middleware<State, Context>>
40
40
  ) =>
41
41
  new Koa()
42
- // TODO: consider using a middleware that adds secure HTTP headers.
43
- // https://github.com/seek-oss/koala/tree/master/src/secureHeaders
44
- // https://github.com/venables/koa-helmet
45
- // .use(SecureHeaders.middleware)
42
+ // Read: https://github.com/seek-oss/koala/tree/master/src/secureHeaders
43
+ .use(SecureHeaders.middleware)
46
44
  .use(contextMiddleware)
47
45
  .use(requestLogging)
48
46
  .use(metrics)
@@ -14,12 +14,12 @@ configs:
14
14
  - .npmrc
15
15
  - package.json#.packageManager
16
16
  - pnpm-lock.yaml
17
- secrets: id=npm,src=tmp/.npmrc
17
+ secrets: id=npm,src=/tmp/.npmrc
18
18
 
19
19
  - &private-npm
20
20
  seek-oss/private-npm#v1.2.0:
21
21
  env: NPM_READ_TOKEN
22
- output-path: tmp/
22
+ output-path: /tmp/
23
23
 
24
24
  base-steps:
25
25
  - &deploy
@@ -36,7 +36,7 @@ configs:
36
36
  - *aws-sm
37
37
  - *private-npm
38
38
  - *docker-ecr-cache
39
- - docker-compose#v5.3.0:
39
+ - docker-compose#v5.4.0:
40
40
  dependencies: false
41
41
  run: app
42
42
  propagate-environment: true
@@ -67,7 +67,7 @@ steps:
67
67
  - *aws-sm
68
68
  - *private-npm
69
69
  - *docker-ecr-cache
70
- - docker-compose#v5.3.0:
70
+ - docker-compose#v5.4.0:
71
71
  run: app
72
72
  environment:
73
73
  - GITHUB_API_TOKEN
@@ -1,6 +1,6 @@
1
- # syntax=docker/dockerfile:1.9
1
+ # syntax=docker/dockerfile:1.10
2
2
 
3
- FROM --platform=<%- platformName %> node:20-alpine AS dev-deps
3
+ FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
4
4
 
5
5
  RUN --mount=type=bind,source=package.json,target=package.json \
6
6
  corepack enable pnpm && corepack install
@@ -18,8 +18,8 @@
18
18
  "@aws-sdk/client-codedeploy": "^3.363.0",
19
19
  "@aws-sdk/client-lambda": "^3.363.0",
20
20
  "@aws-sdk/client-sns": "^3.363.0",
21
- "@seek/logger": "^6.0.0",
22
- "datadog-lambda-js": "^8.0.0",
21
+ "@seek/logger": "^9.0.0",
22
+ "datadog-lambda-js": "^9.0.0",
23
23
  "dd-trace": "^5.0.0",
24
24
  "skuba-dive": "^2.0.0",
25
25
  "zod": "^3.19.1"
@@ -27,7 +27,7 @@
27
27
  "devDependencies": {
28
28
  "@types/aws-lambda": "^8.10.84",
29
29
  "@types/chance": "^1.1.3",
30
- "@types/node": "^20.9.0",
30
+ "@types/node": "^20.16.5",
31
31
  "aws-sdk-client-mock": "^4.0.0",
32
32
  "aws-sdk-client-mock-jest": "^4.0.0",
33
33
  "chance": "^1.1.8",
@@ -38,7 +38,7 @@
38
38
  "serverless-prune-plugin": "^2.0.0",
39
39
  "skuba": "*"
40
40
  },
41
- "packageManager": "pnpm@9.6.0",
41
+ "packageManager": "pnpm@9.11.0",
42
42
  "engines": {
43
43
  "node": ">=20"
44
44
  }
@@ -14,12 +14,12 @@ configs:
14
14
  - .npmrc
15
15
  - package.json#.packageManager
16
16
  - pnpm-lock.yaml
17
- secrets: id=npm,src=tmp/.npmrc
17
+ secrets: id=npm,src=/tmp/.npmrc
18
18
 
19
19
  - &private-npm
20
20
  seek-oss/private-npm#v1.2.0:
21
21
  env: NPM_READ_TOKEN
22
- output-path: tmp/
22
+ output-path: /tmp/
23
23
 
24
24
  base-steps:
25
25
  - &deploy
@@ -33,7 +33,7 @@ configs:
33
33
  - *aws-sm
34
34
  - *private-npm
35
35
  - *docker-ecr-cache
36
- - docker-compose#v5.3.0:
36
+ - docker-compose#v5.4.0:
37
37
  dependencies: false
38
38
  run: app
39
39
  environment:
@@ -63,7 +63,7 @@ steps:
63
63
  - *aws-sm
64
64
  - *private-npm
65
65
  - *docker-ecr-cache
66
- - docker-compose#v5.3.0:
66
+ - docker-compose#v5.4.0:
67
67
  run: app
68
68
  environment:
69
69
  - GITHUB_API_TOKEN
@@ -1,6 +1,6 @@
1
- # syntax=docker/dockerfile:1.9
1
+ # syntax=docker/dockerfile:1.10
2
2
 
3
- FROM --platform=<%- platformName %> node:20-alpine AS dev-deps
3
+ FROM public.ecr.aws/docker/library/node:20-alpine AS dev-deps
4
4
 
5
5
  # Needed for cdk
6
6
  RUN apk add --no-cache bash