From da15e1f13e952a886618c38ff7227f3da5a2e227 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Thu, 9 Jun 2022 18:22:06 +0200 Subject: [PATCH] chore: drop Node.js 12 and modernize the toolchain (#13705) - Stop testing on Node.js 12, start testing on Node.js 18 (i.e., test on Node.js 14, 16, and 18). *Before the changes:* | Workflow | Node.js Version | | ---------------------------- | ------------------ | | Buildkite (Tests): | 14 | | Buildkite (Release): | 12 | | GitHub Actions (Tests): | 12, 16 | | GitHub Actions (Other Jobs): | 12 | *After the changes:* | Workflow | Node.js Version | | ---------------------------- | ------------------ | | Buildkite (Tests): | 14 | | Buildkite (Release): | 14 | | GitHub Actions (Tests): | 16, 18 | | GitHub Actions (Other Jobs): | 16 | - Update the example commands in CONTRIBUTING.md: - Update the nvm installation command. - Update the Node.js installation command to install Node.js 16 since the text recommends using Active LTS and Node.js 14 is not Active LTS Anymore (it's already Maintenance LTS and on track to becoming EOL in 2023). - Update the VSCode Dev Container to use the current Active LTS, update the comments there. - Prepare to un-pin ts-node in a follow-up PR. Update ts-node in `packages/{client,debug}` from 28.0.3 to 28.0.4 because `ts-node@28.0.3` has a peer dependency on `@types/jest@27` and new pnpm now errors on incorrect peer dependency instead of just printing a warning. --- .buildkite/publish/docker-compose.yml | 2 +- .devcontainer/Dockerfile | 6 +- .devcontainer/devcontainer.json | 4 +- .github/workflows/test.yml | 16 +-- CONTRIBUTING.md | 6 +- package.json | 4 +- packages/cli/package.json | 2 +- packages/cli/scripts/preinstall.js | 5 +- .../cli/src/__tests__/commands/Studio.test.ts | 2 +- packages/client/package.json | 4 +- packages/debug/package.json | 2 +- pnpm-lock.yaml | 134 ++++++++---------- scripts/setup.ts | 2 +- 13 files changed, 86 insertions(+), 103 deletions(-) diff --git a/.buildkite/publish/docker-compose.yml b/.buildkite/publish/docker-compose.yml index bdf48729a09b..74a4d35086f5 100644 --- a/.buildkite/publish/docker-compose.yml +++ b/.buildkite/publish/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.7' services: app: - image: node:12-buster + image: node:14-buster volumes: - ../../:/app working_dir: /app diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 0ddf34018610..db7ad232ab76 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,7 +1,7 @@ # See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.187.0/containers/typescript-node/.devcontainer/base.Dockerfile -# [Choice] Node.js version: 16, 14, 12 -ARG VARIANT="14-buster" +# [Choice] Node.js version: 14, 16, 18 +ARG VARIANT="16-buster" FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} # [Optional] Uncomment this section to install additional OS packages. @@ -13,4 +13,4 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT} # RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}" # To install more global node packages -RUN su node -c "npm install -g pnpm ts-node" +RUN su node -c "npm install -g pnpm@6 ts-node" diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index edcaca0a0b78..b827321ca24e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -4,9 +4,9 @@ "name": "Node.js & TypeScript", "build": { "dockerfile": "Dockerfile", - // Update 'VARIANT' to pick a Node version: 12, 14, 16 + // Update 'VARIANT' to pick a Node version: 14, 16, 18 "args": { - "VARIANT": "14" + "VARIANT": "16" } }, diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cfde4bd449f7..5cd7f73f9ecd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -91,7 +91,7 @@ jobs: - uses: actions/setup-node@v3 with: cache: 'pnpm' - node-version: '12' + node-version: '16' # https://github.com/actions/toolkit/blob/master/docs/commands.md#problem-matchers # Matchers are added in setup-node @@ -125,7 +125,7 @@ jobs: matrix: queryEngine: ['library', 'binary'] os: [ubuntu-latest] - node: [12, 16] + node: [16, 18] steps: - uses: actions/checkout@v3 @@ -192,7 +192,7 @@ jobs: strategy: fail-fast: false matrix: - node: [12] + node: [16] steps: - uses: actions/checkout@v3 @@ -239,7 +239,7 @@ jobs: fail-fast: false matrix: queryEngine: ['library', 'binary'] - node: [12] + node: [16] steps: - uses: actions/checkout@v3 @@ -304,7 +304,7 @@ jobs: matrix: queryEngine: ['library', 'binary'] os: [ubuntu-latest] - node: [12, 16] + node: [16, 18] steps: - uses: actions/checkout@v3 @@ -366,7 +366,7 @@ jobs: matrix: queryEngine: ['library', 'binary'] os: [ubuntu-latest] - node: [12, 16] + node: [16, 18] steps: - uses: actions/checkout@v3 @@ -437,7 +437,7 @@ jobs: matrix: queryEngine: ['library', 'binary'] os: [ubuntu-latest] - node: [12, 16] + node: [16, 18] steps: - uses: actions/checkout@v3 @@ -492,7 +492,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - node: [12, 16] + node: [16, 18] steps: - uses: actions/checkout@v3 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e3edf245ad2f..ed1f7e3d29a3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,7 +12,7 @@ Welcome to the monorepo for our TypeScript code for the Prisma ORM. (for the Eng ## General Prerequisites -1. Install Node.js `>=12.6` minimum, [latest LTS is recommended](https://nodejs.org/en/about/releases/) +1. Install Node.js `>=14` minimum, [latest LTS is recommended](https://nodejs.org/en/about/releases/) - Recommended: use [`nvm`](https://github.com/nvm-sh/nvm) for managing Node.js versions @@ -26,8 +26,8 @@ https://github.com/direnv/direnv/blob/master/docs/installation.md Copy paste these commands to install the global dependencies: ```bash -curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash -nvm install 14 +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash +nvm install 16 npm install --global pnpm@6 ts-node # For direnv see https://github.com/direnv/direnv/blob/master/docs/installation.md ``` diff --git a/package.json b/package.json index 936ba893b8fd..01621dd69bb9 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "Alexey Orlenko " ], "engines": { - "node": ">=12.6", - "pnpm": ">=6.14.1" + "node": ">=14", + "pnpm": ">=6.14.1 <7" }, "scripts": { "setup": "ts-node scripts/setup.ts", diff --git a/packages/cli/package.json b/packages/cli/package.json index 2a3e703df7b0..7d3db0e1c7b7 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -33,7 +33,7 @@ "bugs": "https://github.com/prisma/prisma/issues", "license": "Apache-2.0", "engines": { - "node": ">=12.6" + "node": ">=14" }, "prisma": { "prismaCommit": "placeholder-for-commit-hash-replaced-during-publishing-in-publish-ts" diff --git a/packages/cli/scripts/preinstall.js b/packages/cli/scripts/preinstall.js index 4b5545d14f9f..a717124c4128 100644 --- a/packages/cli/scripts/preinstall.js +++ b/packages/cli/scripts/preinstall.js @@ -41,11 +41,10 @@ const white = (str) => WHITE_BRIGHT + str + RESET export function main() { const nodeVersions = process.version.split('.') const nodeMajorVersion = parseInt(nodeVersions[0].slice(1)) - const nodeMinorVersion = parseInt(nodeVersions[1]) - if (nodeMajorVersion < 12 || (nodeMajorVersion === 12 && nodeMinorVersion < 6)) { + if (nodeMajorVersion < 14) { console.error( drawBox({ - str: `Prisma only supports Node.js >= 12.6`, + str: `Prisma only supports Node.js >= 14`, verticalPadding: 1, horizontalPadding: 3, }), diff --git a/packages/cli/src/__tests__/commands/Studio.test.ts b/packages/cli/src/__tests__/commands/Studio.test.ts index 65bde62e1cc7..bfb8244d2e86 100644 --- a/packages/cli/src/__tests__/commands/Studio.test.ts +++ b/packages/cli/src/__tests__/commands/Studio.test.ts @@ -7,7 +7,7 @@ import { Studio } from '../../Studio' const STUDIO_TEST_PORT = 5678 -async function sendRequest(message: any): Promise { +function sendRequest(message: any): Promise { return fetch(`http://localhost:${STUDIO_TEST_PORT}/api`, { method: 'POST', headers: { diff --git a/packages/client/package.json b/packages/client/package.json index fb08fce01ecc..bd5a01e6c1d1 100644 --- a/packages/client/package.json +++ b/packages/client/package.json @@ -24,7 +24,7 @@ "types": "index.d.ts", "license": "Apache-2.0", "engines": { - "node": ">=12.6" + "node": ">=14" }, "homepage": "https://www.prisma.io", "repository": { @@ -120,7 +120,7 @@ "stacktrace-parser": "0.1.10", "strip-ansi": "6.0.1", "strip-indent": "3.0.0", - "ts-jest": "28.0.3", + "ts-jest": "28.0.4", "ts-node": "10.8.0", "tsd": "0.20.0", "typescript": "4.7.2", diff --git a/packages/debug/package.json b/packages/debug/package.json index a510411c1cd2..d00e26ae6421 100644 --- a/packages/debug/package.json +++ b/packages/debug/package.json @@ -23,7 +23,7 @@ "esbuild": "0.14.39", "jest": "28.1.0", "jest-junit": "13.2.0", - "ts-jest": "28.0.3", + "ts-jest": "28.0.4", "typescript": "4.7.2" }, "scripts": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f22da478d505..e7132ddefcce 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -266,7 +266,7 @@ importers: stacktrace-parser: 0.1.10 strip-ansi: 6.0.1 strip-indent: 3.0.0 - ts-jest: 28.0.3 + ts-jest: 28.0.4 ts-node: 10.8.0 tsd: 0.20.0 typescript: 4.7.2 @@ -331,7 +331,7 @@ importers: stacktrace-parser: 0.1.10 strip-ansi: 6.0.1 strip-indent: 3.0.0 - ts-jest: 28.0.3_8dc6099ce4070a1ba7137284c0a7dca3 + ts-jest: 28.0.4_7927fc59d018bb2c1d95dddfa44a97c9 ts-node: 10.8.0_d9b3f5f6916211fece13aa731dd620e6 tsd: 0.20.0 typescript: 4.7.2 @@ -348,7 +348,7 @@ importers: jest: 28.1.0 jest-junit: 13.2.0 strip-ansi: 6.0.1 - ts-jest: 28.0.3 + ts-jest: 28.0.4 typescript: 4.7.2 dependencies: '@types/debug': 4.1.7 @@ -360,7 +360,7 @@ importers: esbuild: 0.14.39 jest: 28.1.0_893ff05bb10e5576c30843552612bf45 jest-junit: 13.2.0 - ts-jest: 28.0.3_8dc6099ce4070a1ba7137284c0a7dca3 + ts-jest: 28.0.4_7927fc59d018bb2c1d95dddfa44a97c9 typescript: 4.7.2 packages/engine-core: @@ -1291,11 +1291,11 @@ packages: resolution: {integrity: sha512-tscn3dlJFGay47kb4qVruQg/XWlmvU0xp3EJOjzzY+sBaI+YgwKcvAmTcyYU7xEiLLIY5HCdWRooAL8dqkFlDA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 chalk: 4.1.2 jest-message-util: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 slash: 3.0.0 dev: true @@ -1341,7 +1341,7 @@ packages: jest-runner: 28.1.0 jest-runtime: 28.1.0 jest-snapshot: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 jest-watcher: 28.1.0 micromatch: 4.0.5 @@ -1409,7 +1409,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/fake-timers': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 jest-mock: 28.1.0 dev: true @@ -1462,12 +1462,12 @@ packages: resolution: {integrity: sha512-Xqsf/6VLeAAq78+GNPzI7FZQRf5cCHj1qgQxCjws9n8rKw8r1UYoeaALwBvyuzOkpU3c1I6emeMySPa96rxtIg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@sinonjs/fake-timers': 9.1.2 '@types/node': 17.0.35 jest-message-util: 28.1.0 jest-mock: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 dev: true /@jest/fake-timers/28.1.1: @@ -1488,7 +1488,7 @@ packages: dependencies: '@jest/environment': 28.1.0 '@jest/expect': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 transitivePeerDependencies: - supports-color dev: true @@ -1517,7 +1517,7 @@ packages: '@jest/console': 28.1.0 '@jest/test-result': 28.1.0 '@jest/transform': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@jridgewell/trace-mapping': 0.3.13 '@types/node': 17.0.35 chalk: 4.1.2 @@ -1530,7 +1530,7 @@ packages: istanbul-lib-report: 3.0.0 istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.4 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-worker: 28.1.0 slash: 3.0.0 string-length: 4.0.2 @@ -1600,7 +1600,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/console': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/istanbul-lib-coverage': 2.0.4 collect-v8-coverage: 1.0.1 dev: true @@ -1640,7 +1640,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@babel/core': 7.18.2 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@jridgewell/trace-mapping': 0.3.13 babel-plugin-istanbul: 6.1.1 chalk: 4.1.2 @@ -1649,7 +1649,7 @@ packages: graceful-fs: 4.2.10 jest-haste-map: 28.1.0 jest-regex-util: 28.0.2 - jest-util: 28.1.0 + jest-util: 28.1.1 micromatch: 4.0.5 pirates: 4.0.5 slash: 3.0.0 @@ -5444,7 +5444,7 @@ packages: jest-get-type: 28.0.2 jest-matcher-utils: 28.1.0 jest-message-util: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 dev: true /expect/28.1.1: @@ -6980,7 +6980,7 @@ packages: '@jest/environment': 28.1.0 '@jest/expect': 28.1.0 '@jest/test-result': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 chalk: 4.1.2 co: 4.6.0 @@ -6991,7 +6991,7 @@ packages: jest-message-util: 28.1.0 jest-runtime: 28.1.0 jest-snapshot: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 pretty-format: 28.1.0 slash: 3.0.0 stack-utils: 2.0.5 @@ -7045,7 +7045,7 @@ packages: graceful-fs: 4.2.10 import-local: 3.1.0 jest-config: 28.1.0_893ff05bb10e5576c30843552612bf45 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 prompts: 2.4.2 yargs: 17.5.1 @@ -7073,7 +7073,7 @@ packages: graceful-fs: 4.2.10 import-local: 3.1.0 jest-config: 28.1.0_9fb45ad40ae1c04d53d04dd627991036 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 prompts: 2.4.2 yargs: 17.5.1 @@ -7101,7 +7101,7 @@ packages: graceful-fs: 4.2.10 import-local: 3.1.0 jest-config: 28.1.0_bfd3149cb19a2cf1b097f861b9c1e8d3 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 prompts: 2.4.2 yargs: 17.5.1 @@ -7153,7 +7153,7 @@ packages: dependencies: '@babel/core': 7.18.2 '@jest/test-sequencer': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 12.20.55 babel-jest: 28.1.0_@babel+core@7.18.2 chalk: 4.1.2 @@ -7167,7 +7167,7 @@ packages: jest-regex-util: 28.0.2 jest-resolve: 28.1.0 jest-runner: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 micromatch: 4.0.5 parse-json: 5.2.0 @@ -7193,7 +7193,7 @@ packages: dependencies: '@babel/core': 7.18.2 '@jest/test-sequencer': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 16.11.39 babel-jest: 28.1.0_@babel+core@7.18.2 chalk: 4.1.2 @@ -7207,7 +7207,7 @@ packages: jest-regex-util: 28.0.2 jest-resolve: 28.1.0 jest-runner: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 micromatch: 4.0.5 parse-json: 5.2.0 @@ -7233,7 +7233,7 @@ packages: dependencies: '@babel/core': 7.18.2 '@jest/test-sequencer': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 babel-jest: 28.1.0_@babel+core@7.18.2 chalk: 4.1.2 @@ -7247,7 +7247,7 @@ packages: jest-regex-util: 28.0.2 jest-resolve: 28.1.0 jest-runner: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 micromatch: 4.0.5 parse-json: 5.2.0 @@ -7273,7 +7273,7 @@ packages: dependencies: '@babel/core': 7.18.2 '@jest/test-sequencer': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 14.18.21 babel-jest: 28.1.0_@babel+core@7.18.2 chalk: 4.1.2 @@ -7287,7 +7287,7 @@ packages: jest-regex-util: 28.0.2 jest-resolve: 28.1.0 jest-runner: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 micromatch: 4.0.5 parse-json: 5.2.0 @@ -7427,10 +7427,10 @@ packages: resolution: {integrity: sha512-a/XX02xF5NTspceMpHujmOexvJ4GftpYXqr6HhhmKmExtMXsyIN/fvanQlt/BcgFoRKN4OCXxLQKth9/n6OPFg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 chalk: 4.1.2 jest-get-type: 28.0.2 - jest-util: 28.1.0 + jest-util: 28.1.1 pretty-format: 28.1.0 dev: true @@ -7451,10 +7451,10 @@ packages: dependencies: '@jest/environment': 28.1.0 '@jest/fake-timers': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 jest-mock: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 dev: true /jest-environment-node/28.1.1: @@ -7483,14 +7483,14 @@ packages: resolution: {integrity: sha512-xyZ9sXV8PtKi6NCrJlmq53PyNVHzxmcfXNVvIRHpHmh1j/HChC4pwKgyjj7Z9us19JMw8PpQTJsFWOsIfT93Dw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/graceful-fs': 4.1.5 '@types/node': 17.0.35 anymatch: 3.1.2 fb-watchman: 2.0.1 graceful-fs: 4.2.10 jest-regex-util: 28.0.2 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-worker: 28.1.0 micromatch: 4.0.5 walker: 1.0.8 @@ -7578,7 +7578,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@babel/code-frame': 7.16.7 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/stack-utils': 2.0.1 chalk: 4.1.2 graceful-fs: 4.2.10 @@ -7607,7 +7607,7 @@ packages: resolution: {integrity: sha512-H7BrhggNn77WhdL7O1apG0Q/iwl0Bdd5E1ydhCJzL3oBLh/UYxAwR3EJLsBZ9XA3ZU4PA3UNw4tQjduBTCTmLw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 dev: true @@ -7676,7 +7676,7 @@ packages: graceful-fs: 4.2.10 jest-haste-map: 28.1.0 jest-pnp-resolver: 1.2.2_jest-resolve@28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-validate: 28.1.0 resolve: 1.22.0 resolve.exports: 1.1.0 @@ -7706,7 +7706,7 @@ packages: '@jest/environment': 28.1.0 '@jest/test-result': 28.1.0 '@jest/transform': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 chalk: 4.1.2 emittery: 0.10.2 @@ -7718,7 +7718,7 @@ packages: jest-message-util: 28.1.0 jest-resolve: 28.1.0 jest-runtime: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 jest-watcher: 28.1.0 jest-worker: 28.1.0 source-map-support: 0.5.13 @@ -7766,7 +7766,7 @@ packages: '@jest/source-map': 28.0.2 '@jest/test-result': 28.1.0 '@jest/transform': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -7779,7 +7779,7 @@ packages: jest-regex-util: 28.0.2 jest-resolve: 28.1.0 jest-snapshot: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 slash: 3.0.0 strip-bom: 4.0.0 transitivePeerDependencies: @@ -7827,7 +7827,7 @@ packages: '@babel/types': 7.18.2 '@jest/expect-utils': 28.1.0 '@jest/transform': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/babel__traverse': 7.17.1 '@types/prettier': 2.6.1 babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.2 @@ -7839,7 +7839,7 @@ packages: jest-haste-map: 28.1.0 jest-matcher-utils: 28.1.0 jest-message-util: 28.1.0 - jest-util: 28.1.0 + jest-util: 28.1.1 natural-compare: 1.4.0 pretty-format: 28.1.0 semver: 7.3.7 @@ -7878,18 +7878,6 @@ packages: - supports-color dev: true - /jest-util/28.1.0: - resolution: {integrity: sha512-qYdCKD77k4Hwkose2YBEqQk7PzUf/NSE+rutzceduFveQREeH6b+89Dc9+wjX9dAwHcgdx4yedGA3FQlU/qCTA==} - engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} - dependencies: - '@jest/types': 28.1.1 - '@types/node': 17.0.35 - chalk: 4.1.2 - ci-info: 3.3.1 - graceful-fs: 4.2.10 - picomatch: 2.3.1 - dev: true - /jest-util/28.1.1: resolution: {integrity: sha512-FktOu7ca1DZSyhPAxgxB6hfh2+9zMoJ7aEQA759Z6p45NuO8mWcqujH+UdHlCm/V6JTWwDztM2ITCzU1ijJAfw==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} @@ -7906,7 +7894,7 @@ packages: resolution: {integrity: sha512-Lly7CJYih3vQBfjLeANGgBSBJ7pEa18cxpQfQEq2go2xyEzehnHfQTjoUia8xUv4x4J80XKFIDwJJThXtRFQXQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 camelcase: 6.3.0 chalk: 4.1.2 jest-get-type: 28.0.2 @@ -7931,12 +7919,12 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/test-result': 28.1.0 - '@jest/types': 28.1.0 + '@jest/types': 28.1.1 '@types/node': 17.0.35 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 - jest-util: 28.1.0 + jest-util: 28.1.1 string-length: 4.0.2 dev: true @@ -11342,13 +11330,12 @@ packages: engines: {node: '>=8'} dev: true - /ts-jest/28.0.3_8dc6099ce4070a1ba7137284c0a7dca3: - resolution: {integrity: sha512-HzgbEDQ2KgVtDmpXToqAcKTyGHdHsG23i/iUjfxji92G5eT09S1m9UHZd7csF0Bfgh9txM4JzwHnv7r1waFPlw==} + /ts-jest/28.0.4_39d28abc242f9a15cc88f7055fcff9cf: + resolution: {integrity: sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true peerDependencies: '@babel/core': '>=7.0.0-beta.0 <8' - '@types/jest': ^27.0.0 babel-jest: ^28.0.0 esbuild: '*' jest: ^28.0.0 @@ -11356,28 +11343,25 @@ packages: peerDependenciesMeta: '@babel/core': optional: true - '@types/jest': - optional: true babel-jest: optional: true esbuild: optional: true dependencies: - '@types/jest': 28.1.0 bs-logger: 0.2.6 - esbuild: 0.14.39 + esbuild: 0.14.43 fast-json-stable-stringify: 2.1.0 - jest: 28.1.0_893ff05bb10e5576c30843552612bf45 - jest-util: 28.1.0 + jest: 28.1.1_9fb45ad40ae1c04d53d04dd627991036 + jest-util: 28.1.1 json5: 2.2.1 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.7 - typescript: 4.7.2 + typescript: 4.7.3 yargs-parser: 20.2.9 dev: true - /ts-jest/28.0.4_39d28abc242f9a15cc88f7055fcff9cf: + /ts-jest/28.0.4_7927fc59d018bb2c1d95dddfa44a97c9: resolution: {integrity: sha512-S6uRDDdCJBvnZqyGjB4VCnwbQrbgdL8WPeP4jevVSpYsBaeGRQAIS08o3Svav2Ex+oXwLgJ/m7F24TNq62kA1A==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true @@ -11396,15 +11380,15 @@ packages: optional: true dependencies: bs-logger: 0.2.6 - esbuild: 0.14.43 + esbuild: 0.14.39 fast-json-stable-stringify: 2.1.0 - jest: 28.1.1_9fb45ad40ae1c04d53d04dd627991036 - jest-util: 28.1.0 + jest: 28.1.0_893ff05bb10e5576c30843552612bf45 + jest-util: 28.1.1 json5: 2.2.1 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.7 - typescript: 4.7.3 + typescript: 4.7.2 yargs-parser: 20.2.9 dev: true diff --git a/scripts/setup.ts b/scripts/setup.ts index 6bb62f199d21..dde5276d98df 100644 --- a/scripts/setup.ts +++ b/scripts/setup.ts @@ -147,7 +147,7 @@ async function branchExists(dir: string, branch: string): Promise { return exists } -async function getPrismaCommitFromPackageJsonViaNpmRegistry(npmVersion: string): Promise<{ prisma: string }> { +function getPrismaCommitFromPackageJsonViaNpmRegistry(npmVersion: string): Promise<{ prisma: string }> { return fetch(`https://registry.npmjs.org/prisma/${npmVersion}`, { headers: { accept: 'application/json',