Skip to content

Commit 2be05f5

Browse files
authored
Force @jest/types resolution in templates (#468)
A clean install of `@jest/types` is currently failing because it specifies a `@types/node` range of `*`, and the latest v16 release removes some globals that Jest depends on. This is a hack to get CI healthy again, until `@jest/types` is properly patched.
1 parent 1216a45 commit 2be05f5

File tree

9 files changed

+50
-0
lines changed

9 files changed

+50
-0
lines changed

.changeset/clean-needles-remember.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'skuba': patch
3+
---
4+
5+
**template:** Force `@jest/types` resolution to fix clean installs

template/express-rest-api/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
},
1818
"license": "UNLICENSED",
1919
"private": true,
20+
"resolutions": {
21+
"**/@jest/types/@types/node": "^15.0.0"
22+
},
2023
"scripts": {
2124
"build": "skuba build",
2225
"format": "skuba format",

template/greeter/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
},
1212
"license": "UNLICENSED",
1313
"private": true,
14+
"resolutions": {
15+
"**/@jest/types/@types/node": "^15.0.0"
16+
},
1417
"scripts": {
1518
"build": "skuba build",
1619
"format": "skuba format",

template/koa-rest-api/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
},
3232
"license": "UNLICENSED",
3333
"private": true,
34+
"resolutions": {
35+
"**/@jest/types/@types/node": "^15.0.0"
36+
},
3437
"scripts": {
3538
"build": "skuba build",
3639
"format": "skuba format",

template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap

+22
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ Object {
133133
},
134134
"Resource": "*",
135135
},
136+
Object {
137+
"Action": Array [
138+
"kms:Decrypt",
139+
"kms:GenerateDataKey",
140+
],
141+
"Effect": "Allow",
142+
"Principal": Object {
143+
"Service": "sns.amazonaws.com",
144+
},
145+
"Resource": "*",
146+
},
136147
],
137148
"Version": "2012-10-17",
138149
},
@@ -543,6 +554,17 @@ Object {
543554
},
544555
"Resource": "*",
545556
},
557+
Object {
558+
"Action": Array [
559+
"kms:Decrypt",
560+
"kms:GenerateDataKey",
561+
],
562+
"Effect": "Allow",
563+
"Principal": Object {
564+
"Service": "sns.amazonaws.com",
565+
},
566+
"Resource": "*",
567+
},
546568
],
547569
"Version": "2012-10-17",
548570
},

template/lambda-sqs-worker-cdk/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020
},
2121
"license": "UNLICENSED",
2222
"private": true,
23+
"resolutions": {
24+
"**/@jest/types/@types/node": "^15.0.0"
25+
},
2326
"scripts": {
2427
"build": "skuba build",
2528
"format": "skuba format",

template/lambda-sqs-worker/package.json

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
},
2424
"license": "UNLICENSED",
2525
"private": true,
26+
"resolutions": {
27+
"**/@jest/types/@types/node": "^15.0.0"
28+
},
2629
"scripts": {
2730
"build": "skuba build",
2831
"deploy": "yarn build && serverless deploy --force --verbose",

template/oss-npm-package/_package.json

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"dependencies": {},
33
"description": "<%- description %>",
44
"devDependencies": {
5+
"@types/node": "^15.0.0",
56
"commitizen": "^4.2.3",
67
"skuba": "*"
78
},
@@ -19,6 +20,9 @@
1920
"type": "git",
2021
"url": "git+https://github.com/<%- orgName %>/<%- repoName %>.git"
2122
},
23+
"resolutions": {
24+
"**/@jest/types/@types/node": "^15.0.0"
25+
},
2226
"scripts": {
2327
"build": "skuba build-package",
2428
"commit": "cz",

template/private-npm-package/_package.json

+4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"dependencies": {},
33
"description": "<%- description %>",
44
"devDependencies": {
5+
"@types/node": "^15.0.0",
56
"commitizen": "^4.2.3",
67
"skuba": "*"
78
},
@@ -19,6 +20,9 @@
1920
"type": "git",
2021
"url": "git+https://github.com/<%- orgName %>/<%- repoName %>.git"
2122
},
23+
"resolutions": {
24+
"**/@jest/types/@types/node": "^15.0.0"
25+
},
2226
"scripts": {
2327
"build": "skuba build-package",
2428
"commit": "cz",

0 commit comments

Comments
 (0)