skuba 10.2.0-config-20250421023131 → 11.0.0-feat-npmrc-to-workspace-20250511013825
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.
- package/README.md +0 -3
- package/lib/api/github/issueComment.d.ts +4 -2
- package/lib/api/github/issueComment.js +13 -0
- package/lib/api/github/issueComment.js.map +2 -2
- package/lib/cli/build/assets.js +3 -9
- package/lib/cli/build/assets.js.map +2 -2
- package/lib/cli/configure/processing/configFile.d.ts +2 -2
- package/lib/cli/configure/processing/configFile.js +18 -21
- package/lib/cli/configure/processing/configFile.js.map +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +1 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +2 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +6 -2
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +26 -22
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +5 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +2 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +167 -0
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +7 -0
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +0 -9
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +2 -2
- package/lib/cli/test/index.js +1 -0
- package/lib/cli/test/index.js.map +2 -2
- package/lib/index.d.ts +0 -1
- package/lib/index.js +2 -5
- package/lib/index.js.map +2 -2
- package/lib/utils/copy.js +1 -1
- package/lib/utils/copy.js.map +2 -2
- package/lib/utils/dir.d.ts +10 -0
- package/lib/utils/dir.js +74 -2
- package/lib/utils/dir.js.map +3 -3
- package/lib/utils/npmrc.d.ts +0 -1
- package/lib/utils/npmrc.js +0 -3
- package/lib/utils/npmrc.js.map +2 -2
- package/package.json +12 -12
- package/template/base/_.gitignore +2 -0
- package/template/base/_pnpm-workspace.yaml +10 -0
- package/template/express-rest-api/.buildkite/pipeline.yml +9 -18
- package/template/express-rest-api/Dockerfile.dev-deps +4 -3
- package/template/express-rest-api/package.json +1 -1
- package/template/greeter/.buildkite/pipeline.yml +5 -14
- package/template/greeter/Dockerfile +4 -3
- package/template/greeter/package.json +2 -2
- package/template/koa-rest-api/.buildkite/pipeline.yml +9 -18
- package/template/koa-rest-api/Dockerfile.dev-deps +4 -3
- package/template/koa-rest-api/package.json +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +9 -18
- package/template/lambda-sqs-worker-cdk/Dockerfile +4 -3
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +7 -0
- package/template/lambda-sqs-worker-cdk/package.json +3 -2
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -3
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +5 -8
- package/template/oss-npm-package/_package.json +2 -2
- package/template/private-npm-package/_package.json +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.d.ts +0 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js +0 -95
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js.map +0 -7
- package/lib/config/load.d.ts +0 -2
- package/lib/config/load.js +0 -75
- package/lib/config/load.js.map +0 -7
- package/lib/config/types.d.ts +0 -51
- package/lib/config/types.js +0 -74
- package/lib/config/types.js.map +0 -7
- package/template/base/_.npmrc +0 -9
|
@@ -3,24 +3,16 @@ agents:
|
|
|
3
3
|
|
|
4
4
|
configs:
|
|
5
5
|
plugins:
|
|
6
|
-
- &aws-sm
|
|
7
|
-
seek-oss/aws-sm#v2.3.3:
|
|
8
|
-
env:
|
|
9
|
-
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
|
|
10
|
-
|
|
11
6
|
- &docker-ecr-cache
|
|
12
7
|
seek-oss/docker-ecr-cache#v2.2.1: &docker-ecr-cache-defaults
|
|
13
8
|
cache-on:
|
|
14
|
-
- .npmrc
|
|
15
9
|
- package.json#.packageManager
|
|
16
10
|
- pnpm-lock.yaml
|
|
11
|
+
- pnpm-workspace.yaml
|
|
17
12
|
dockerfile: Dockerfile.dev-deps
|
|
18
|
-
secrets:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
seek-oss/private-npm#v1.3.0:
|
|
22
|
-
env: NPM_READ_TOKEN
|
|
23
|
-
output-path: /tmp/
|
|
13
|
+
secrets:
|
|
14
|
+
- id=npm,src=/var/lib/buildkite-agent/.npmrc
|
|
15
|
+
- NPM_TOKEN
|
|
24
16
|
|
|
25
17
|
base-steps:
|
|
26
18
|
- &deploy
|
|
@@ -34,10 +26,10 @@ configs:
|
|
|
34
26
|
steps:
|
|
35
27
|
- label: 🧖♀️ Warm Prod
|
|
36
28
|
command: ':'
|
|
29
|
+
env:
|
|
30
|
+
GET_NPM_TOKEN: please
|
|
37
31
|
key: warm-prod
|
|
38
32
|
plugins:
|
|
39
|
-
- *aws-sm
|
|
40
|
-
- *private-npm
|
|
41
33
|
- seek-oss/docker-ecr-cache#v2.2.1:
|
|
42
34
|
<<: *docker-ecr-cache-defaults
|
|
43
35
|
skip-pull-from-cache: true
|
|
@@ -53,9 +45,8 @@ steps:
|
|
|
53
45
|
depends_on: warm-prod
|
|
54
46
|
env:
|
|
55
47
|
GET_GITHUB_TOKEN: please
|
|
48
|
+
GET_NPM_TOKEN: please
|
|
56
49
|
plugins:
|
|
57
|
-
- *aws-sm
|
|
58
|
-
- *private-npm
|
|
59
50
|
- *docker-ecr-cache
|
|
60
51
|
- docker-compose#v5.7.0:
|
|
61
52
|
run: app
|
|
@@ -66,9 +57,9 @@ steps:
|
|
|
66
57
|
|
|
67
58
|
- label: 📦 Build & Package
|
|
68
59
|
depends_on: warm-prod
|
|
60
|
+
env:
|
|
61
|
+
GET_NPM_TOKEN: please
|
|
69
62
|
plugins:
|
|
70
|
-
- *aws-sm
|
|
71
|
-
- *private-npm
|
|
72
63
|
- *docker-ecr-cache
|
|
73
64
|
- seek-jobs/gantry#v4.0.0:
|
|
74
65
|
command: build
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# syntax=docker/dockerfile:1.
|
|
1
|
+
# syntax=docker/dockerfile:1.15
|
|
2
2
|
|
|
3
3
|
FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
|
|
4
4
|
|
|
@@ -10,8 +10,9 @@ RUN --mount=type=bind,source=package.json,target=package.json \
|
|
|
10
10
|
|
|
11
11
|
WORKDIR /workdir
|
|
12
12
|
|
|
13
|
-
RUN --mount=type=bind,source
|
|
14
|
-
--mount=type=bind,source=package.json,target=package.json \
|
|
13
|
+
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
15
14
|
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
|
|
15
|
+
--mount=type=bind,source=pnpm-workspace.yaml,target=pnpm-workspace.yaml \
|
|
16
16
|
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
|
|
17
|
+
--mount=type=secret,id=NPM_TOKEN,env=NPM_TOKEN,required=true \
|
|
17
18
|
pnpm fetch
|
|
@@ -5,23 +5,15 @@ agents:
|
|
|
5
5
|
|
|
6
6
|
configs:
|
|
7
7
|
plugins:
|
|
8
|
-
- &aws-sm
|
|
9
|
-
seek-oss/aws-sm#v2.3.3:
|
|
10
|
-
env:
|
|
11
|
-
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
|
|
12
|
-
|
|
13
8
|
- &docker-ecr-cache
|
|
14
9
|
seek-oss/docker-ecr-cache#v2.2.1:
|
|
15
10
|
cache-on:
|
|
16
|
-
- .npmrc
|
|
17
11
|
- package.json#.packageManager
|
|
18
12
|
- pnpm-lock.yaml
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
env: NPM_READ_TOKEN
|
|
24
|
-
output-path: /tmp/
|
|
13
|
+
- pnpm-workspace.yaml
|
|
14
|
+
secrets:
|
|
15
|
+
- id=npm,src=/var/lib/buildkite-agent/.npmrc
|
|
16
|
+
- NPM_TOKEN
|
|
25
17
|
|
|
26
18
|
steps:
|
|
27
19
|
- label: 🧪 Test & Lint
|
|
@@ -34,9 +26,8 @@ steps:
|
|
|
34
26
|
- pnpm lint
|
|
35
27
|
env:
|
|
36
28
|
GET_GITHUB_TOKEN: please
|
|
29
|
+
GET_NPM_TOKEN: please
|
|
37
30
|
plugins:
|
|
38
|
-
- *aws-sm
|
|
39
|
-
- *private-npm
|
|
40
31
|
- *docker-ecr-cache
|
|
41
32
|
- docker-compose#v5.7.0:
|
|
42
33
|
run: app
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# syntax=docker/dockerfile:1.
|
|
1
|
+
# syntax=docker/dockerfile:1.15
|
|
2
2
|
|
|
3
3
|
FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
|
|
4
4
|
|
|
@@ -10,8 +10,9 @@ RUN --mount=type=bind,source=package.json,target=package.json \
|
|
|
10
10
|
|
|
11
11
|
WORKDIR /workdir
|
|
12
12
|
|
|
13
|
-
RUN --mount=type=bind,source
|
|
14
|
-
--mount=type=bind,source=package.json,target=package.json \
|
|
13
|
+
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
15
14
|
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
|
|
15
|
+
--mount=type=bind,source=pnpm-workspace.yaml,target=pnpm-workspace.yaml \
|
|
16
16
|
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
|
|
17
|
+
--mount=type=secret,id=NPM_TOKEN,env=NPM_TOKEN,required=true \
|
|
17
18
|
pnpm fetch
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "^22.13.10",
|
|
20
|
-
"skuba": "
|
|
20
|
+
"skuba": "11.0.0-feat-npmrc-to-workspace-20250511013825"
|
|
21
21
|
},
|
|
22
|
-
"packageManager": "pnpm@10.
|
|
22
|
+
"packageManager": "pnpm@10.10.0",
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22"
|
|
25
25
|
}
|
|
@@ -3,24 +3,16 @@ agents:
|
|
|
3
3
|
|
|
4
4
|
configs:
|
|
5
5
|
plugins:
|
|
6
|
-
- &aws-sm
|
|
7
|
-
seek-oss/aws-sm#v2.3.3:
|
|
8
|
-
env:
|
|
9
|
-
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
|
|
10
|
-
|
|
11
6
|
- &docker-ecr-cache
|
|
12
7
|
seek-oss/docker-ecr-cache#v2.2.1: &docker-ecr-cache-defaults
|
|
13
8
|
cache-on:
|
|
14
|
-
- .npmrc
|
|
15
9
|
- package.json#.packageManager
|
|
16
10
|
- pnpm-lock.yaml
|
|
11
|
+
- pnpm-workspace.yaml
|
|
17
12
|
dockerfile: Dockerfile.dev-deps
|
|
18
|
-
secrets:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
seek-oss/private-npm#v1.3.0:
|
|
22
|
-
env: NPM_READ_TOKEN
|
|
23
|
-
output-path: /tmp/
|
|
13
|
+
secrets:
|
|
14
|
+
- id=npm,src=/var/lib/buildkite-agent/.npmrc
|
|
15
|
+
- NPM_TOKEN
|
|
24
16
|
|
|
25
17
|
base-steps:
|
|
26
18
|
- &deploy
|
|
@@ -34,10 +26,10 @@ configs:
|
|
|
34
26
|
steps:
|
|
35
27
|
- label: 🧖♀️ Warm Prod
|
|
36
28
|
command: ':'
|
|
29
|
+
env:
|
|
30
|
+
GET_NPM_TOKEN: please
|
|
37
31
|
key: warm-prod
|
|
38
32
|
plugins:
|
|
39
|
-
- *aws-sm
|
|
40
|
-
- *private-npm
|
|
41
33
|
- seek-oss/docker-ecr-cache#v2.2.1:
|
|
42
34
|
<<: *docker-ecr-cache-defaults
|
|
43
35
|
skip-pull-from-cache: true
|
|
@@ -53,9 +45,8 @@ steps:
|
|
|
53
45
|
depends_on: warm-prod
|
|
54
46
|
env:
|
|
55
47
|
GET_GITHUB_TOKEN: please
|
|
48
|
+
GET_NPM_TOKEN: please
|
|
56
49
|
plugins:
|
|
57
|
-
- *aws-sm
|
|
58
|
-
- *private-npm
|
|
59
50
|
- *docker-ecr-cache
|
|
60
51
|
- docker-compose#v5.7.0:
|
|
61
52
|
run: app
|
|
@@ -66,9 +57,9 @@ steps:
|
|
|
66
57
|
|
|
67
58
|
- label: 📦 Build & Package
|
|
68
59
|
depends_on: warm-prod
|
|
60
|
+
env:
|
|
61
|
+
GET_NPM_TOKEN: please
|
|
69
62
|
plugins:
|
|
70
|
-
- *aws-sm
|
|
71
|
-
- *private-npm
|
|
72
63
|
- *docker-ecr-cache
|
|
73
64
|
- seek-jobs/gantry#v4.0.0:
|
|
74
65
|
command: build
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# syntax=docker/dockerfile:1.
|
|
1
|
+
# syntax=docker/dockerfile:1.15
|
|
2
2
|
|
|
3
3
|
FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
|
|
4
4
|
|
|
@@ -10,8 +10,9 @@ RUN --mount=type=bind,source=package.json,target=package.json \
|
|
|
10
10
|
|
|
11
11
|
WORKDIR /workdir
|
|
12
12
|
|
|
13
|
-
RUN --mount=type=bind,source
|
|
14
|
-
--mount=type=bind,source=package.json,target=package.json \
|
|
13
|
+
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
15
14
|
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
|
|
15
|
+
--mount=type=bind,source=pnpm-workspace.yaml,target=pnpm-workspace.yaml \
|
|
16
16
|
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
|
|
17
|
+
--mount=type=secret,id=NPM_TOKEN,env=NPM_TOKEN,required=true \
|
|
17
18
|
pnpm fetch
|
|
@@ -3,23 +3,15 @@ agents:
|
|
|
3
3
|
|
|
4
4
|
configs:
|
|
5
5
|
plugins:
|
|
6
|
-
- &aws-sm
|
|
7
|
-
seek-oss/aws-sm#v2.3.3:
|
|
8
|
-
env:
|
|
9
|
-
NPM_READ_TOKEN: arn:aws:secretsmanager:ap-southeast-2:987872074697:secret:npm/npm-read-token
|
|
10
|
-
|
|
11
6
|
- &docker-ecr-cache
|
|
12
7
|
seek-oss/docker-ecr-cache#v2.2.1: &docker-ecr-cache-defaults
|
|
13
8
|
cache-on:
|
|
14
|
-
- .npmrc
|
|
15
9
|
- package.json#.packageManager
|
|
16
10
|
- pnpm-lock.yaml
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
env: NPM_READ_TOKEN
|
|
22
|
-
output-path: /tmp/
|
|
11
|
+
- pnpm-workspace.yaml
|
|
12
|
+
secrets:
|
|
13
|
+
- id=npm,src=/var/lib/buildkite-agent/.npmrc
|
|
14
|
+
- NPM_TOKEN
|
|
23
15
|
|
|
24
16
|
base-steps:
|
|
25
17
|
- &deploy
|
|
@@ -30,8 +22,6 @@ configs:
|
|
|
30
22
|
- pnpm run deploy
|
|
31
23
|
concurrency: 1
|
|
32
24
|
plugins:
|
|
33
|
-
- *aws-sm
|
|
34
|
-
- *private-npm
|
|
35
25
|
- *docker-ecr-cache
|
|
36
26
|
- docker-compose#v5.7.0:
|
|
37
27
|
dependencies: false
|
|
@@ -59,9 +49,8 @@ steps:
|
|
|
59
49
|
- pnpm lint
|
|
60
50
|
env:
|
|
61
51
|
GET_GITHUB_TOKEN: please
|
|
52
|
+
GET_NPM_TOKEN: please
|
|
62
53
|
plugins:
|
|
63
|
-
- *aws-sm
|
|
64
|
-
- *private-npm
|
|
65
54
|
- *docker-ecr-cache
|
|
66
55
|
- docker-compose#v5.7.0:
|
|
67
56
|
run: app
|
|
@@ -73,11 +62,11 @@ steps:
|
|
|
73
62
|
- agents:
|
|
74
63
|
queue: <%- devBuildkiteQueueName %>
|
|
75
64
|
branches: '!renovate-*'
|
|
65
|
+
env:
|
|
66
|
+
GET_NPM_TOKEN: please
|
|
76
67
|
label: 🧖♀️ Warm Dev
|
|
77
68
|
command: ':'
|
|
78
69
|
plugins:
|
|
79
|
-
- *aws-sm
|
|
80
|
-
- *private-npm
|
|
81
70
|
- seek-oss/docker-ecr-cache#v2.2.1:
|
|
82
71
|
<<: *docker-ecr-cache-defaults
|
|
83
72
|
skip-pull-from-cache: true
|
|
@@ -92,6 +81,7 @@ steps:
|
|
|
92
81
|
queue: <%- devBuildkiteQueueName %>
|
|
93
82
|
env:
|
|
94
83
|
ENVIRONMENT: dev
|
|
84
|
+
GET_NPM_TOKEN: please
|
|
95
85
|
label: 🤞 Deploy Dev
|
|
96
86
|
concurrency_group: '<%- repoName %>/deploy/dev'
|
|
97
87
|
key: deploy-dev
|
|
@@ -99,6 +89,7 @@ steps:
|
|
|
99
89
|
- <<: *deploy
|
|
100
90
|
env:
|
|
101
91
|
ENVIRONMENT: prod
|
|
92
|
+
GET_NPM_TOKEN: please
|
|
102
93
|
label: 🚀 Deploy Prod
|
|
103
94
|
branches: ${BUILDKITE_PIPELINE_DEFAULT_BRANCH}
|
|
104
95
|
concurrency_group: '<%- repoName %>/deploy/prod'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# syntax=docker/dockerfile:1.
|
|
1
|
+
# syntax=docker/dockerfile:1.15
|
|
2
2
|
|
|
3
3
|
FROM public.ecr.aws/docker/library/node:22-alpine AS dev-deps
|
|
4
4
|
|
|
@@ -13,8 +13,9 @@ RUN --mount=type=bind,source=package.json,target=package.json \
|
|
|
13
13
|
|
|
14
14
|
WORKDIR /workdir
|
|
15
15
|
|
|
16
|
-
RUN --mount=type=bind,source
|
|
17
|
-
--mount=type=bind,source=package.json,target=package.json \
|
|
16
|
+
RUN --mount=type=bind,source=package.json,target=package.json \
|
|
18
17
|
--mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \
|
|
18
|
+
--mount=type=bind,source=pnpm-workspace.yaml,target=pnpm-workspace.yaml \
|
|
19
19
|
--mount=type=secret,id=npm,dst=/root/.npmrc,required=true \
|
|
20
|
+
--mount=type=secret,id=NPM_TOKEN,env=NPM_TOKEN,required=true \
|
|
20
21
|
pnpm fetch
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { containsSkipDirective } from '@seek/aws-codedeploy-hooks';
|
|
1
2
|
import { LambdaDeployment } from '@seek/aws-codedeploy-infra';
|
|
2
3
|
import {
|
|
3
4
|
Duration,
|
|
@@ -103,6 +104,12 @@ export class AppStack extends Stack {
|
|
|
103
104
|
// https://nodejs.org/api/cli.html#cli_node_options_options
|
|
104
105
|
NODE_OPTIONS: '--enable-source-maps',
|
|
105
106
|
DESTINATION_SNS_TOPIC_ARN: destinationTopic.topicArn,
|
|
107
|
+
|
|
108
|
+
...(containsSkipDirective(process.env.BUILDKITE_MESSAGE, 'smoke')
|
|
109
|
+
? {
|
|
110
|
+
SKIP_SMOKE: 'true',
|
|
111
|
+
}
|
|
112
|
+
: {}),
|
|
106
113
|
},
|
|
107
114
|
// https://github.com/aws/aws-cdk/issues/28237
|
|
108
115
|
// This forces the lambda to be updated on every deployment
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"@aws-sdk/client-codedeploy": "^3.363.0",
|
|
18
18
|
"@aws-sdk/client-lambda": "^3.363.0",
|
|
19
19
|
"@aws-sdk/client-sns": "^3.363.0",
|
|
20
|
+
"@seek/aws-codedeploy-hooks": "^1.2.0",
|
|
20
21
|
"@seek/logger": "^9.0.0",
|
|
21
22
|
"datadog-lambda-js": "^10.0.0",
|
|
22
23
|
"dd-trace": "^5.0.0",
|
|
@@ -36,9 +37,9 @@
|
|
|
36
37
|
"constructs": "^10.0.17",
|
|
37
38
|
"datadog-cdk-constructs-v2": "^2.0.0",
|
|
38
39
|
"pino-pretty": "^13.0.0",
|
|
39
|
-
"skuba": "
|
|
40
|
+
"skuba": "11.0.0-feat-npmrc-to-workspace-20250511013825"
|
|
40
41
|
},
|
|
41
|
-
"packageManager": "pnpm@10.
|
|
42
|
+
"packageManager": "pnpm@10.10.0",
|
|
42
43
|
"engines": {
|
|
43
44
|
"node": ">=22"
|
|
44
45
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import 'skuba-dive/register';
|
|
2
2
|
|
|
3
|
+
import { isLambdaHook } from '@seek/aws-codedeploy-hooks';
|
|
3
4
|
import type { SQSEvent } from 'aws-lambda';
|
|
4
5
|
|
|
5
6
|
import { createHandler } from 'src/framework/handler';
|
|
@@ -17,10 +18,16 @@ const smokeTest = async () => {
|
|
|
17
18
|
await Promise.all([scoringService.smokeTest(), sendPipelineEvent({}, true)]);
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
export const handler = createHandler<SQSEvent>(async (event) => {
|
|
21
|
+
export const handler = createHandler<SQSEvent>(async (event, ctx) => {
|
|
21
22
|
// Treat an empty object as our smoke test event.
|
|
22
|
-
if (!Object.
|
|
23
|
-
|
|
23
|
+
if (!Object.entries(event).length) {
|
|
24
|
+
if (process.env.SKIP_SMOKE && isLambdaHook(event, ctx)) {
|
|
25
|
+
// Expedite deployment even if dependencies are unhealthy.
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// Run dependency checks otherwise.
|
|
30
|
+
logger.debug('Smoke test event received');
|
|
24
31
|
return smokeTest();
|
|
25
32
|
}
|
|
26
33
|
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
+
import type { Context as LambdaContext } from 'aws-lambda';
|
|
1
2
|
import { datadog } from 'datadog-lambda-js';
|
|
2
3
|
|
|
3
4
|
import { config } from 'src/config';
|
|
4
5
|
import { logger, loggerContext } from 'src/framework/logging';
|
|
5
6
|
|
|
6
|
-
interface LambdaContext {
|
|
7
|
-
awsRequestId: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
7
|
type Handler<Event, Output> = (
|
|
11
8
|
event: Event,
|
|
12
9
|
ctx: LambdaContext,
|
|
@@ -24,12 +21,12 @@ const withDatadog = <Event, Output = unknown>(
|
|
|
24
21
|
config.metrics ? (datadog(fn) as Handler<Event, Output>) : fn;
|
|
25
22
|
|
|
26
23
|
export const createHandler = <Event, Output = unknown>(
|
|
27
|
-
fn: (event: Event) => Promise<Output>,
|
|
24
|
+
fn: (event: Event, ctx: LambdaContext) => Promise<Output>,
|
|
28
25
|
) =>
|
|
29
|
-
withDatadog<Event>((event,
|
|
30
|
-
loggerContext.run({ awsRequestId }, async () => {
|
|
26
|
+
withDatadog<Event>((event, ctx) =>
|
|
27
|
+
loggerContext.run({ awsRequestId: ctx.awsRequestId }, async () => {
|
|
31
28
|
try {
|
|
32
|
-
const output = await fn(event);
|
|
29
|
+
const output = await fn(event, ctx);
|
|
33
30
|
|
|
34
31
|
logger.debug('Function succeeded');
|
|
35
32
|
|
package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
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 moveNpmrcOutOfIgnoreManagedSection_exports = {};
|
|
30
|
-
__export(moveNpmrcOutOfIgnoreManagedSection_exports, {
|
|
31
|
-
tryMoveNpmrcOutOfIgnoreManagedSection: () => tryMoveNpmrcOutOfIgnoreManagedSection
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(moveNpmrcOutOfIgnoreManagedSection_exports);
|
|
34
|
-
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_util = require("util");
|
|
36
|
-
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
38
|
-
var import_npmrc = require("../../../../../../utils/npmrc");
|
|
39
|
-
var import_project = require("../../../../../configure/analysis/project");
|
|
40
|
-
const NPMRC_IGNORE_SECTION = `
|
|
41
|
-
|
|
42
|
-
# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.
|
|
43
|
-
# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.
|
|
44
|
-
# You can use \`skuba format\` to generate the file or otherwise commit an empty file.
|
|
45
|
-
# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.
|
|
46
|
-
.npmrc
|
|
47
|
-
`;
|
|
48
|
-
const moveNpmrcOutOfIgnoreManagedSection = async (mode, dir, fileName) => {
|
|
49
|
-
const readFile = (0, import_project.createDestinationFileReader)(dir);
|
|
50
|
-
const ignoreFile = await readFile(fileName);
|
|
51
|
-
if (!ignoreFile) {
|
|
52
|
-
return { result: "skip", reason: `no ${fileName} file found` };
|
|
53
|
-
}
|
|
54
|
-
let isIgnored;
|
|
55
|
-
let currentlyInManagedSection = false;
|
|
56
|
-
for (const line of ignoreFile.split("\n")) {
|
|
57
|
-
if (line.trim() === "# managed by skuba") {
|
|
58
|
-
currentlyInManagedSection = true;
|
|
59
|
-
} else if (line.trim() === "# end managed by skuba") {
|
|
60
|
-
currentlyInManagedSection = false;
|
|
61
|
-
}
|
|
62
|
-
if (line.trim() === ".npmrc" || line.trim() === "/.npmrc") {
|
|
63
|
-
isIgnored = { inManaged: currentlyInManagedSection };
|
|
64
|
-
}
|
|
65
|
-
if (line.trim() === "!.npmrc" || line.trim() === "!/.npmrc") {
|
|
66
|
-
isIgnored = void 0;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
if (isIgnored && !isIgnored.inManaged) {
|
|
70
|
-
return { result: "skip", reason: "already ignored in unmanaged section" };
|
|
71
|
-
}
|
|
72
|
-
if (!isIgnored) {
|
|
73
|
-
return { result: "skip", reason: "not ignored" };
|
|
74
|
-
}
|
|
75
|
-
if (mode === "lint") {
|
|
76
|
-
return { result: "apply" };
|
|
77
|
-
}
|
|
78
|
-
const newIgnoreFile = ignoreFile.split("\n").filter((line) => !import_npmrc.NPMRC_LINES.includes(line.trim())).join("\n").trim() + NPMRC_IGNORE_SECTION;
|
|
79
|
-
await import_fs_extra.default.promises.writeFile(import_path.default.join(dir, fileName), newIgnoreFile);
|
|
80
|
-
return { result: "apply" };
|
|
81
|
-
};
|
|
82
|
-
const tryMoveNpmrcOutOfIgnoreManagedSection = (type) => async ({ mode, dir = process.cwd() }) => {
|
|
83
|
-
try {
|
|
84
|
-
return await moveNpmrcOutOfIgnoreManagedSection(mode, dir, type);
|
|
85
|
-
} catch (err) {
|
|
86
|
-
import_logging.log.warn(`Failed to move .npmrc out of ${type} managed sections.`);
|
|
87
|
-
import_logging.log.subtle((0, import_util.inspect)(err));
|
|
88
|
-
return { result: "skip", reason: "due to an error" };
|
|
89
|
-
}
|
|
90
|
-
};
|
|
91
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
92
|
-
0 && (module.exports = {
|
|
93
|
-
tryMoveNpmrcOutOfIgnoreManagedSection
|
|
94
|
-
});
|
|
95
|
-
//# sourceMappingURL=moveNpmrcOutOfIgnoreManagedSection.js.map
|
package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.js.map
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/7.3.1/moveNpmrcOutOfIgnoreManagedSection.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\nimport { inspect } from 'util';\n\nimport fs from 'fs-extra';\n\nimport type { PatchFunction, PatchReturnType } from '../..';\nimport { log } from '../../../../../../utils/logging';\nimport { NPMRC_LINES } from '../../../../../../utils/npmrc';\nimport { createDestinationFileReader } from '../../../../../configure/analysis/project';\n\nconst NPMRC_IGNORE_SECTION = `\n\n# Ignore .npmrc. This is no longer managed by skuba as pnpm projects use a managed .npmrc.\n# IMPORTANT: if migrating to pnpm, remove this line and add an .npmrc IN THE SAME COMMIT.\n# You can use \\`skuba format\\` to generate the file or otherwise commit an empty file.\n# Doing so will conflict with a local .npmrc and make it more difficult to unintentionally commit auth secrets.\n.npmrc\n`;\n\nconst moveNpmrcOutOfIgnoreManagedSection = async (\n mode: 'format' | 'lint',\n dir: string,\n fileName: '.gitignore' | '.dockerignore',\n): Promise<PatchReturnType> => {\n const readFile = createDestinationFileReader(dir);\n\n const ignoreFile = await readFile(fileName);\n\n if (!ignoreFile) {\n return { result: 'skip', reason: `no ${fileName} file found` };\n }\n\n let isIgnored: { inManaged: boolean } | undefined;\n let currentlyInManagedSection = false;\n\n for (const line of ignoreFile.split('\\n')) {\n if (line.trim() === '# managed by skuba') {\n currentlyInManagedSection = true;\n } else if (line.trim() === '# end managed by skuba') {\n currentlyInManagedSection = false;\n }\n\n if (line.trim() === '.npmrc' || line.trim() === '/.npmrc') {\n isIgnored = { inManaged: currentlyInManagedSection };\n }\n\n if (line.trim() === '!.npmrc' || line.trim() === '!/.npmrc') {\n isIgnored = undefined;\n }\n }\n\n if (isIgnored && !isIgnored.inManaged) {\n return { result: 'skip', reason: 'already ignored in unmanaged section' };\n }\n\n if (!isIgnored) {\n return { result: 'skip', reason: 'not ignored' };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n const newIgnoreFile =\n ignoreFile\n .split('\\n')\n .filter((line) => !NPMRC_LINES.includes(line.trim()))\n .join('\\n')\n .trim() + NPMRC_IGNORE_SECTION;\n\n await fs.promises.writeFile(path.join(dir, fileName), newIgnoreFile);\n\n return { result: 'apply' };\n};\n\nexport const tryMoveNpmrcOutOfIgnoreManagedSection = (\n type: '.gitignore' | '.dockerignore',\n) =>\n (async ({ mode, dir = process.cwd() }) => {\n try {\n return await moveNpmrcOutOfIgnoreManagedSection(mode, dir, type);\n } catch (err) {\n log.warn(`Failed to move .npmrc out of ${type} managed sections.`);\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n }) satisfies PatchFunction;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,kBAAwB;AAExB,sBAAe;AAGf,qBAAoB;AACpB,mBAA4B;AAC5B,qBAA4C;AAE5C,MAAM,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS7B,MAAM,qCAAqC,OACzC,MACA,KACA,aAC6B;AAC7B,QAAM,eAAW,4CAA4B,GAAG;AAEhD,QAAM,aAAa,MAAM,SAAS,QAAQ;AAE1C,MAAI,CAAC,YAAY;AACf,WAAO,EAAE,QAAQ,QAAQ,QAAQ,MAAM,QAAQ,cAAc;AAAA,EAC/D;AAEA,MAAI;AACJ,MAAI,4BAA4B;AAEhC,aAAW,QAAQ,WAAW,MAAM,IAAI,GAAG;AACzC,QAAI,KAAK,KAAK,MAAM,sBAAsB;AACxC,kCAA4B;AAAA,IAC9B,WAAW,KAAK,KAAK,MAAM,0BAA0B;AACnD,kCAA4B;AAAA,IAC9B;AAEA,QAAI,KAAK,KAAK,MAAM,YAAY,KAAK,KAAK,MAAM,WAAW;AACzD,kBAAY,EAAE,WAAW,0BAA0B;AAAA,IACrD;AAEA,QAAI,KAAK,KAAK,MAAM,aAAa,KAAK,KAAK,MAAM,YAAY;AAC3D,kBAAY;AAAA,IACd;AAAA,EACF;AAEA,MAAI,aAAa,CAAC,UAAU,WAAW;AACrC,WAAO,EAAE,QAAQ,QAAQ,QAAQ,uCAAuC;AAAA,EAC1E;AAEA,MAAI,CAAC,WAAW;AACd,WAAO,EAAE,QAAQ,QAAQ,QAAQ,cAAc;AAAA,EACjD;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,QAAM,gBACJ,WACG,MAAM,IAAI,EACV,OAAO,CAAC,SAAS,CAAC,yBAAY,SAAS,KAAK,KAAK,CAAC,CAAC,EACnD,KAAK,IAAI,EACT,KAAK,IAAI;AAEd,QAAM,gBAAAA,QAAG,SAAS,UAAU,YAAAC,QAAK,KAAK,KAAK,QAAQ,GAAG,aAAa;AAEnE,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,wCAAwC,CACnD,SAEC,OAAO,EAAE,MAAM,MAAM,QAAQ,IAAI,EAAE,MAAM;AACxC,MAAI;AACF,WAAO,MAAM,mCAAmC,MAAM,KAAK,IAAI;AAAA,EACjE,SAAS,KAAK;AACZ,uBAAI,KAAK,gCAAgC,IAAI,oBAAoB;AACjE,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
|
-
"names": ["fs", "path"]
|
|
7
|
-
}
|
package/lib/config/load.d.ts
DELETED