skuba 7.1.1 โ†’ 7.3.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 (65) hide show
  1. package/config/prettier.d.ts +1 -0
  2. package/config/prettier.js +1 -0
  3. package/lib/api/git/commitAllChanges.js +16 -2
  4. package/lib/api/git/commitAllChanges.js.map +3 -3
  5. package/lib/api/github/push.d.ts +1 -1
  6. package/lib/api/github/push.js +13 -4
  7. package/lib/api/github/push.js.map +3 -3
  8. package/lib/api/jest/index.d.ts +2 -2
  9. package/lib/api/jest/index.js +19 -1
  10. package/lib/api/jest/index.js.map +2 -2
  11. package/lib/api/net/compose.js +2 -1
  12. package/lib/api/net/compose.js.map +2 -2
  13. package/lib/cli/configure/getProjectType.d.ts +1 -1
  14. package/lib/cli/configure/getProjectType.js +5 -2
  15. package/lib/cli/configure/getProjectType.js.map +2 -2
  16. package/lib/cli/configure/index.js +0 -4
  17. package/lib/cli/configure/index.js.map +2 -2
  18. package/lib/cli/configure/patchRenovateConfig.js +13 -11
  19. package/lib/cli/configure/patchRenovateConfig.js.map +2 -2
  20. package/lib/cli/configure/processing/package.d.ts +2 -2
  21. package/lib/cli/configure/processing/package.js +9 -11
  22. package/lib/cli/configure/processing/package.js.map +3 -3
  23. package/lib/cli/init/getConfig.d.ts +3 -3
  24. package/lib/cli/init/getConfig.js +9 -11
  25. package/lib/cli/init/getConfig.js.map +2 -2
  26. package/lib/cli/init/index.js +0 -1
  27. package/lib/cli/init/index.js.map +2 -2
  28. package/lib/cli/init/types.d.ts +99 -27
  29. package/lib/cli/init/types.js +26 -35
  30. package/lib/cli/init/types.js.map +2 -2
  31. package/lib/cli/lint/autofix.js +1 -1
  32. package/lib/cli/lint/autofix.js.map +2 -2
  33. package/lib/skuba.js +1 -4
  34. package/lib/skuba.js.map +2 -2
  35. package/lib/utils/error.d.ts +30 -10
  36. package/lib/utils/error.js +10 -20
  37. package/lib/utils/error.js.map +2 -2
  38. package/lib/utils/exec.js +2 -2
  39. package/lib/utils/exec.js.map +2 -2
  40. package/lib/utils/manifest.d.ts +3 -3
  41. package/lib/utils/manifest.js +9 -9
  42. package/lib/utils/manifest.js.map +2 -2
  43. package/lib/utils/template.d.ts +43 -13
  44. package/lib/utils/template.js +15 -15
  45. package/lib/utils/template.js.map +2 -2
  46. package/package.json +29 -29
  47. package/template/express-rest-api/.buildkite/pipeline.yml +7 -4
  48. package/template/express-rest-api/Dockerfile.dev-deps +1 -1
  49. package/template/express-rest-api/README.md +6 -6
  50. package/template/greeter/.buildkite/pipeline.yml +4 -3
  51. package/template/greeter/Dockerfile +1 -1
  52. package/template/greeter/README.md +3 -3
  53. package/template/koa-rest-api/.buildkite/pipeline.yml +7 -4
  54. package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
  55. package/template/koa-rest-api/README.md +6 -6
  56. package/template/koa-rest-api/package.json +4 -4
  57. package/template/koa-rest-api/src/app.test.ts +8 -4
  58. package/template/lambda-sqs-worker/.buildkite/pipeline.yml +9 -6
  59. package/template/lambda-sqs-worker/Dockerfile +1 -1
  60. package/template/lambda-sqs-worker/README.md +6 -6
  61. package/template/lambda-sqs-worker/src/framework/validation.test.ts +1 -1
  62. package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +9 -6
  63. package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
  64. package/template/oss-npm-package/README.md +1 -1
  65. package/template/private-npm-package/README.md +2 -2
@@ -9,16 +9,17 @@ configs:
9
9
  NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
10
10
 
11
11
  - &docker-ecr-cache
12
- seek-oss/docker-ecr-cache#v2.0.0:
12
+ seek-oss/docker-ecr-cache#v2.1.0: &docker-ecr-cache-defaults
13
13
  cache-on:
14
14
  - package.json
15
15
  - yarn.lock
16
16
  dockerfile: Dockerfile.dev-deps
17
- secrets: id=npm,src=.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
23
 
23
24
  base-steps:
24
25
  - &deploy
@@ -36,7 +37,9 @@ steps:
36
37
  plugins:
37
38
  - *aws-sm
38
39
  - *private-npm
39
- - *docker-ecr-cache
40
+ - seek-oss/docker-ecr-cache#v2.1.0:
41
+ <<: *docker-ecr-cache-defaults
42
+ skip-pull-from-cache: true
40
43
 
41
44
  - label: ๐Ÿงช Test & Lint
42
45
  commands:
@@ -51,7 +54,7 @@ steps:
51
54
  - *aws-sm
52
55
  - *private-npm
53
56
  - *docker-ecr-cache
54
- - docker-compose#v4.14.0:
57
+ - docker-compose#v4.16.0:
55
58
  run: app
56
59
  timeout_in_minutes: 10
57
60
 
@@ -7,5 +7,5 @@ WORKDIR /workdir
7
7
  COPY package.json yarn.lock ./
8
8
 
9
9
  RUN \
10
- --mount=type=secret,id=npm,dst=/workdir/.npmrc \
10
+ --mount=type=secret,id=npm,dst=/root/.npmrc \
11
11
  yarn install --frozen-lockfile --ignore-optional --non-interactive
@@ -19,12 +19,12 @@ Next steps:
19
19
  6. [ ] Configure [GitHub repository settings].
20
20
  7. [ ] Delete this checklist ๐Ÿ˜Œ.
21
21
 
22
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
22
+ [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
23
23
  [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
24
24
 
25
25
  ## Design
26
26
 
27
- <%-repoName %> is a Node.js HTTP server built in line with our [technology strategy].
27
+ <%-repoName %> is a Node.js HTTP server built in line with our [Technical Guidelines].
28
28
  It uses the [Koa] middleware framework and common SEEK packages.
29
29
  Resource APIs enable synchronous interactions and serve as the backbone of SEEK's general service architecture.
30
30
 
@@ -105,7 +105,7 @@ TODO: add support links for the prod environment.
105
105
  - Splunk logs
106
106
  -->
107
107
 
108
- [codedeploy]: https://docs.aws.amazon.com/codedeploy
109
- [gantry]: https://backstage.myseek.xyz/docs/default/component/gantry/
110
- [koa]: https://koajs.com
111
- [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
108
+ [CodeDeploy]: https://docs.aws.amazon.com/codedeploy
109
+ [Gantry]: https://backstage.myseek.xyz/docs/default/component/gantry/
110
+ [Koa]: https://koajs.com
111
+ [Technical Guidelines]: https://myseek.atlassian.net/wiki/spaces/AA/pages/2358346017/
@@ -14,10 +14,10 @@
14
14
  "dependencies": {
15
15
  "@koa/router": "^12.0.0",
16
16
  "@opentelemetry/api": "^1.1.0",
17
- "@opentelemetry/exporter-trace-otlp-grpc": "^0.41.0",
17
+ "@opentelemetry/exporter-trace-otlp-grpc": "^0.44.0",
18
18
  "@opentelemetry/instrumentation-aws-sdk": "^0.36.0",
19
- "@opentelemetry/instrumentation-http": "^0.41.0",
20
- "@opentelemetry/sdk-node": "^0.41.0",
19
+ "@opentelemetry/instrumentation-http": "^0.44.0",
20
+ "@opentelemetry/sdk-node": "^0.44.0",
21
21
  "@seek/logger": "^6.0.0",
22
22
  "aws-sdk": "^2.1039.0",
23
23
  "hot-shots": "^10.0.0",
@@ -25,7 +25,7 @@
25
25
  "koa-bodyparser": "^4.3.0",
26
26
  "koa-compose": "^4.2.0",
27
27
  "seek-datadog-custom-metrics": "^4.2.1",
28
- "seek-koala": "^6.0.0",
28
+ "seek-koala": "^7.0.0",
29
29
  "skuba-dive": "^2.0.0",
30
30
  "zod": "^3.19.1"
31
31
  },
@@ -10,11 +10,15 @@ describe('app', () => {
10
10
 
11
11
  it('has a happy health check', () => agent.get('/health').expect(200, ''));
12
12
 
13
- it('has a reachable smoke test', () =>
14
- agent.get('/smoke').expect(({ status }) => status !== 404));
13
+ it('has a reachable smoke test', async () => {
14
+ const response = await agent.get('/smoke');
15
+ expect(response.status).not.toBe(404);
16
+ });
15
17
 
16
- it('has a reachable nested route', () =>
17
- agent.get('/jobs').expect(({ status }) => status !== 404));
18
+ it('has a reachable nested route', async () => {
19
+ const response = await agent.get('/jobs');
20
+ expect(response.status).not.toBe(404);
21
+ });
18
22
 
19
23
  it('has OPTIONS for a nested route', () =>
20
24
  agent.options('/jobs').expect(200).expect('allow', /HEAD/));
@@ -9,15 +9,16 @@ configs:
9
9
  NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
10
10
 
11
11
  - &docker-ecr-cache
12
- seek-oss/docker-ecr-cache#v2.0.0:
12
+ seek-oss/docker-ecr-cache#v2.1.0: &docker-ecr-cache-defaults
13
13
  cache-on:
14
14
  - package.json
15
15
  - yarn.lock
16
- secrets: id=npm,src=.npmrc
16
+ secrets: id=npm,src=tmp/.npmrc
17
17
 
18
18
  - &private-npm
19
19
  seek-oss/private-npm#v1.2.0:
20
20
  env: NPM_READ_TOKEN
21
+ output-path: tmp/
21
22
 
22
23
  base-steps:
23
24
  - &deploy
@@ -26,13 +27,13 @@ configs:
26
27
  - yarn deploy
27
28
  concurrency: 1
28
29
  plugins:
29
- - artifacts#v1.9.0:
30
+ - artifacts#v1.9.2:
30
31
  build: ${BUILDKITE_BUILD_ID}
31
32
  download: lib/*
32
33
  - *aws-sm
33
34
  - *private-npm
34
35
  - *docker-ecr-cache
35
- - docker-compose#v4.14.0:
36
+ - docker-compose#v4.16.0:
36
37
  dependencies: false
37
38
  run: app
38
39
  retry:
@@ -60,7 +61,7 @@ steps:
60
61
  - *aws-sm
61
62
  - *private-npm
62
63
  - *docker-ecr-cache
63
- - docker-compose#v4.14.0:
64
+ - docker-compose#v4.16.0:
64
65
  run: app
65
66
  timeout_in_minutes: 10
66
67
 
@@ -72,7 +73,9 @@ steps:
72
73
  plugins:
73
74
  - *aws-sm
74
75
  - *private-npm
75
- - *docker-ecr-cache
76
+ - seek-oss/docker-ecr-cache#v2.1.0:
77
+ <<: *docker-ecr-cache-defaults
78
+ skip-pull-from-cache: true
76
79
 
77
80
  - wait
78
81
  - block: ๐Ÿ™‹๐Ÿปโ€โ™€๏ธ Deploy Dev
@@ -7,6 +7,6 @@ WORKDIR /workdir
7
7
  COPY package.json yarn.lock ./
8
8
 
9
9
  RUN \
10
- --mount=type=secret,id=npm,dst=/workdir/.npmrc \
10
+ --mount=type=secret,id=npm,dst=/root/.npmrc \
11
11
  yarn install --frozen-lockfile --ignore-optional --non-interactive && \
12
12
  yarn cache clean
@@ -18,12 +18,12 @@ Next steps:
18
18
  6. [ ] Configure [GitHub repository settings].
19
19
  7. [ ] Delete this checklist ๐Ÿ˜Œ.
20
20
 
21
- [builds at seek]: https://builds-at-seek.ssod.skinfra.xyz
21
+ [builds at seek]: https://backstage.myseek.xyz/docs/default/component/builds-cicd-seek/
22
22
  [github repository settings]: https://github.com/<%-orgName%>/<%-repoName%>/settings
23
23
 
24
24
  ## Design
25
25
 
26
- <%-repoName %> is a Node.js [Lambda] application built in line with our [technology strategy].
26
+ <%-repoName %> is a Node.js [Lambda] application built in line with our [Technical Guidelines].
27
27
  It is backed by a typical SQS message + dead letter queue configuration and uses common SEEK packages.
28
28
  Workers enable fault-tolerant asynchronous processing of events.
29
29
 
@@ -126,7 +126,7 @@ TODO: add support links for the prod environment.
126
126
  - Splunk logs
127
127
  -->
128
128
 
129
- [codedeploy]: https://docs.aws.amazon.com/codedeploy
130
- [lambda]: https://docs.aws.amazon.com/lambda
131
- [serverless]: https://www.serverless.com/
132
- [technology strategy]: https://tech-strategy.ssod.skinfra.xyz
129
+ [CodeDeploy]: https://docs.aws.amazon.com/codedeploy
130
+ [Lambda]: https://docs.aws.amazon.com/lambda
131
+ [Serverless]: https://www.serverless.com/
132
+ [Technical Guidelines]: https://myseek.atlassian.net/wiki/spaces/AA/pages/2358346017/
@@ -78,7 +78,7 @@ describe('validateJson', () => {
78
78
  expect(() =>
79
79
  validateJson(input, IdDescriptionSchema),
80
80
  ).toThrowErrorMatchingInlineSnapshot(
81
- `"Unexpected token } in JSON at position 0"`,
81
+ `"Unexpected token '}', "}" is not valid JSON"`,
82
82
  );
83
83
  });
84
84
  });
@@ -9,15 +9,16 @@ configs:
9
9
  NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
10
10
 
11
11
  - &docker-ecr-cache
12
- seek-oss/docker-ecr-cache#v2.0.0:
12
+ seek-oss/docker-ecr-cache#v2.1.0: &docker-ecr-cache-defaults
13
13
  cache-on:
14
14
  - package.json
15
15
  - yarn.lock
16
- secrets: id=npm,src=.npmrc
16
+ secrets: id=npm,src=tmp/.npmrc
17
17
 
18
18
  - &private-npm
19
19
  seek-oss/private-npm#v1.2.0:
20
20
  env: NPM_READ_TOKEN
21
+ output-path: tmp/
21
22
 
22
23
  base-steps:
23
24
  - &deploy
@@ -26,13 +27,13 @@ configs:
26
27
  - yarn deploy
27
28
  concurrency: 1
28
29
  plugins:
29
- - artifacts#v1.9.0:
30
+ - artifacts#v1.9.2:
30
31
  build: ${BUILDKITE_BUILD_ID}
31
32
  download: lib/*
32
33
  - *aws-sm
33
34
  - *private-npm
34
35
  - *docker-ecr-cache
35
- - docker-compose#v4.14.0:
36
+ - docker-compose#v4.16.0:
36
37
  dependencies: false
37
38
  run: app
38
39
  retry:
@@ -57,7 +58,7 @@ steps:
57
58
  - *aws-sm
58
59
  - *private-npm
59
60
  - *docker-ecr-cache
60
- - docker-compose#v4.14.0:
61
+ - docker-compose#v4.16.0:
61
62
  run: app
62
63
  timeout_in_minutes: 10
63
64
 
@@ -69,7 +70,9 @@ steps:
69
70
  plugins:
70
71
  - *aws-sm
71
72
  - *private-npm
72
- - *docker-ecr-cache
73
+ - seek-oss/docker-ecr-cache#v2.1.0:
74
+ <<: *docker-ecr-cache-defaults
75
+ skip-pull-from-cache: true
73
76
 
74
77
  - wait
75
78
  - block: ๐Ÿ™‹๐Ÿปโ€โ™€๏ธ Deploy Dev
@@ -7,7 +7,7 @@ WORKDIR /workdir
7
7
  COPY package.json yarn.lock ./
8
8
 
9
9
  RUN \
10
- --mount=type=secret,id=npm,dst=/workdir/.npmrc \
10
+ --mount=type=secret,id=npm,dst=/root/.npmrc \
11
11
  yarn install --frozen-lockfile --ignore-optional --non-interactive && \
12
12
  yarn package && \
13
13
  yarn cache clean
@@ -121,7 +121,7 @@ Here are some branches that **semantic-release** supports by default:
121
121
  For more information, see the **semantic-release** docs on [triggering a release].
122
122
 
123
123
  [distribution tags]: https://docs.npmjs.com/adding-dist-tags-to-packages
124
- [oss npm package guidance]: https://github.com/SEEK-Jobs/seek-oss-ci/blob/master/NPM_PACKAGES.md#access-to-publish-to-npm
124
+ [OSS npm package guidance]: https://github.com/SEEK-Jobs/seek-oss-ci/blob/master/NPM_PACKAGES.md#access-to-publish-to-npm
125
125
  [release workflow]: .github/workflows/release.yml
126
126
  [seek-oss]: https://github.com/seek-oss
127
127
  [semantic-release]: https://github.com/semantic-release/semantic-release
@@ -103,7 +103,7 @@ Here are some branches that **semantic-release** supports by default:
103
103
  For more information, see the **semantic-release** docs on [triggering a release].
104
104
 
105
105
  [distribution tags]: https://docs.npmjs.com/adding-dist-tags-to-packages
106
- [gutenberg]: https://github.com/SEEK-Jobs/gutenberg
107
- [seek-jobs]: https://github.com/orgs/seek-jobs/sso
106
+ [Gutenberg]: https://github.com/SEEK-Jobs/gutenberg
107
+ [SEEK-Jobs]: https://github.com/orgs/seek-jobs/sso
108
108
  [semantic-release]: https://github.com/semantic-release/semantic-release
109
109
  [triggering a release]: https://github.com/semantic-release/semantic-release/#triggering-a-release