Skip to content

Commit

Permalink
Force @jest/types resolution in templates (#468)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
72636c committed Jul 8, 2021
1 parent 1216a45 commit 2be05f5
Show file tree
Hide file tree
Showing 9 changed files with 50 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/clean-needles-remember.md
@@ -0,0 +1,5 @@
---
'skuba': patch
---

**template:** Force `@jest/types` resolution to fix clean installs
3 changes: 3 additions & 0 deletions template/express-rest-api/package.json
Expand Up @@ -17,6 +17,9 @@
},
"license": "UNLICENSED",
"private": true,
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build",
"format": "skuba format",
Expand Down
3 changes: 3 additions & 0 deletions template/greeter/package.json
Expand Up @@ -11,6 +11,9 @@
},
"license": "UNLICENSED",
"private": true,
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build",
"format": "skuba format",
Expand Down
3 changes: 3 additions & 0 deletions template/koa-rest-api/package.json
Expand Up @@ -31,6 +31,9 @@
},
"license": "UNLICENSED",
"private": true,
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build",
"format": "skuba format",
Expand Down
Expand Up @@ -133,6 +133,17 @@ Object {
},
"Resource": "*",
},
Object {
"Action": Array [
"kms:Decrypt",
"kms:GenerateDataKey",
],
"Effect": "Allow",
"Principal": Object {
"Service": "sns.amazonaws.com",
},
"Resource": "*",
},
],
"Version": "2012-10-17",
},
Expand Down Expand Up @@ -543,6 +554,17 @@ Object {
},
"Resource": "*",
},
Object {
"Action": Array [
"kms:Decrypt",
"kms:GenerateDataKey",
],
"Effect": "Allow",
"Principal": Object {
"Service": "sns.amazonaws.com",
},
"Resource": "*",
},
],
"Version": "2012-10-17",
},
Expand Down
3 changes: 3 additions & 0 deletions template/lambda-sqs-worker-cdk/package.json
Expand Up @@ -20,6 +20,9 @@
},
"license": "UNLICENSED",
"private": true,
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build",
"format": "skuba format",
Expand Down
3 changes: 3 additions & 0 deletions template/lambda-sqs-worker/package.json
Expand Up @@ -23,6 +23,9 @@
},
"license": "UNLICENSED",
"private": true,
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build",
"deploy": "yarn build && serverless deploy --force --verbose",
Expand Down
4 changes: 4 additions & 0 deletions template/oss-npm-package/_package.json
Expand Up @@ -2,6 +2,7 @@
"dependencies": {},
"description": "<%- description %>",
"devDependencies": {
"@types/node": "^15.0.0",
"commitizen": "^4.2.3",
"skuba": "*"
},
Expand All @@ -19,6 +20,9 @@
"type": "git",
"url": "git+https://github.com/<%- orgName %>/<%- repoName %>.git"
},
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build-package",
"commit": "cz",
Expand Down
4 changes: 4 additions & 0 deletions template/private-npm-package/_package.json
Expand Up @@ -2,6 +2,7 @@
"dependencies": {},
"description": "<%- description %>",
"devDependencies": {
"@types/node": "^15.0.0",
"commitizen": "^4.2.3",
"skuba": "*"
},
Expand All @@ -19,6 +20,9 @@
"type": "git",
"url": "git+https://github.com/<%- orgName %>/<%- repoName %>.git"
},
"resolutions": {
"**/@jest/types/@types/node": "^15.0.0"
},
"scripts": {
"build": "skuba build-package",
"commit": "cz",
Expand Down

0 comments on commit 2be05f5

Please sign in to comment.