Skip to content

Commit

Permalink
Merge branch 'main' into feat/remove-error-messages-for-valid-nixos-s…
Browse files Browse the repository at this point in the history
…etup
  • Loading branch information
Jolg42 committed Jul 17, 2023
2 parents 99776c9 + 70831c3 commit 6999af5
Show file tree
Hide file tree
Showing 116 changed files with 97,196 additions and 7,675 deletions.
5 changes: 4 additions & 1 deletion .buildkite/publish/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
app:
image: node:14-buster
image: node:16-buster
volumes:
- ../../:/app
working_dir: /app
Expand Down Expand Up @@ -68,6 +68,9 @@ services:
- PRISMA_HIDE_UPDATE_MESSAGE="true"
- SKIP_ECOSYSTEMTESTS_CHECK
- SLACK_RELEASE_FEED_WEBHOOK
# TODO find why we need NODE_OPTIONS for Buildkite (we need it since Node v16)
# This is to avoid OOM errors like "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory"
- NODE_OPTIONS="--max-old-space-size=8096"
depends_on:
- postgres
- postgres_isolated
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/publish/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ expand_headers_on_error() {
trap expand_headers_on_error ERR

echo "~~~ Install pnpm"
npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm
# --usafe-perm to allow install scripts

echo "~~~ pnpm i"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: '3.7'
services:
app:
image: node:14-buster
image: node:16-buster
volumes:
- ../../:/app
working_dir: /app
Expand Down Expand Up @@ -57,6 +57,9 @@ services:
# To hide "Update available 0.0.0 -> x.x.x"
- PRISMA_HIDE_UPDATE_MESSAGE="true"
- SKIP_ECOSYSTEMTESTS_CHECK
# TODO find why we need NODE_OPTIONS for Buildkite (we need it since Node v16)
# This is to avoid OOM errors like "FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory"
- NODE_OPTIONS="--max-old-space-size=8096"
depends_on:
- postgres
- postgres_isolated
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ if [ "$BUILDKITE_PARALLEL_JOB" = "1" ]; then
fi

echo "~~~ Install pnpm"
npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm
# --usafe-perm to allow install scripts

echo "~~~ pnpm i"
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/test/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
steps:
- label: ':coverage: Test %n - Node 14 (Search for `BUILDKITE_PARALLEL_JOB` in test output for definition what is being tested)'
- label: ':coverage: Test %n - Node 16 (Search for `BUILDKITE_PARALLEL_JOB` in test output for definition what is being tested)'
parallelism: 2
timeout_in_minutes: 35
plugins:
- docker-compose#v3.9.0:
config: .buildkite/test/docker-compose.14.yml
config: .buildkite/test/docker-compose.yml
run: app

- wait
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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: 14, 16, 18
# [Choice] Node.js version: 16, 18, 20
ARG VARIANT="16-buster"
FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0-${VARIANT}

Expand Down
9 changes: 1 addition & 8 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,21 @@
"name": "Node.js & TypeScript",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick a Node version: 14, 16, 18
// Update 'VARIANT' to pick a Node version: 16, 18, 20
"args": {
"VARIANT": "16"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"telemetry.enableTelemetry": false,
"redhat.telemetry.enabled": false,
"vulnCost.sendStatistics": false,

"editor.renderWhitespace": "all",
"editor.renderControlCharacters": true,
"editor.formatOnSave": true,

"files.insertFinalNewline": true
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
// "dbaeumer.vscode-eslint",
Expand All @@ -31,13 +27,10 @@
"Orta.vscode-jest",
"GitHub.vscode-pull-request-github"
],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "pnpm install",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node"
}
2 changes: 1 addition & 1 deletion .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"rangeStrategy": "pin",
"ignoreDeps": ["sqlite3", "@prisma/engines-version", "@prisma/prisma-schema-wasm", "redis", "@types/redis"],
"constraints": {
"pnpm": "7"
"pnpm": "8"
},
"packageRules": [
{
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -ex

npm i --silent -g pnpm@7 --unsafe-perm
npm i --silent -g pnpm@8 --unsafe-perm

pnpm i

Expand Down
46 changes: 25 additions & 21 deletions .github/workflows/test-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
description: List of query engines to run tests on as JSON array
type: string
default: '["library", "binary"]'
pnpmVersion:
description: pnpm package manager version
type: string
default: '8'
secrets:
BUILDPULSE_ACCESS_KEY_ID:
required: false
Expand Down Expand Up @@ -68,7 +72,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -106,7 +110,7 @@ jobs:
matrix:
shard: ['1/5', '2/5', '3/5', '4/5', '5/5']
queryEngine: ${{ fromJson(inputs.queryEngine) }}
node: [16, 18]
node: [18, 20]

env:
CI: true
Expand Down Expand Up @@ -159,7 +163,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -214,7 +218,7 @@ jobs:
fail-fast: false
matrix:
shard: ['1/6', '2/6', '3/6', '4/6', '5/6', '6/6']
node: [14, 16, 18]
node: [16, 18, 20]

steps:
- uses: actions/checkout@v3
Expand All @@ -233,7 +237,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand All @@ -246,7 +250,7 @@ jobs:
SKIP_GIT: true
GITHUB_CONTEXT: ${{ toJson(github) }}

- run: pnpm run test:functional --silent --data-proxy --shard ${{ matrix.shard }}
- run: pnpm run test:functional --data-proxy --shard ${{ matrix.shard }}
working-directory: packages/client
env:
CI: true
Expand All @@ -262,7 +266,7 @@ jobs:
JEST_JUNIT_SUITE_NAME: '${{ github.job }}/client/functional/${{ matrix.os }}/node-${{ matrix.node }}/dataproxy'
JEST_JUNIT_UNIQUE_OUTPUT_NAME: true

- run: pnpm run test:functional --silent --data-proxy --edge-client --shard ${{ matrix.shard }}
- run: pnpm run test:functional --data-proxy --edge-client --shard ${{ matrix.shard }}
working-directory: packages/client
env:
CI: true
Expand Down Expand Up @@ -315,7 +319,7 @@ jobs:
fail-fast: false
matrix:
queryEngine: ['library'] # TODO: binary engine is leaking at the moment
node: [14, 16, 18]
node: [16, 18, 20]
steps:
- uses: actions/checkout@v3

Expand All @@ -333,7 +337,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -439,7 +443,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -511,7 +515,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -580,7 +584,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -646,7 +650,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -720,7 +724,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -791,7 +795,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -864,7 +868,7 @@ jobs:
- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -910,7 +914,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -1026,7 +1030,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
node: [14]
node: [16]
queryEngine: ${{ fromJson(inputs.queryEngine) }}
shard: ['1/2', '2/2']

Expand Down Expand Up @@ -1057,7 +1061,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down Expand Up @@ -1124,7 +1128,7 @@ jobs:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
node: [14]
node: [16]
queryEngine: ${{ fromJson(inputs.queryEngine) }}

steps:
Expand All @@ -1148,7 +1152,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: ${{ inputs.pnpmVersion }}

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-engines-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-studio-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

- uses: pnpm/action-setup@v2.2.4
with:
version: 7
version: 8

- uses: actions/setup-node@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
shell-emulator=true
auto-install-peers=false
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `>=14` minimum, [latest LTS is recommended](https://nodejs.org/en/about/releases/)
1. Install Node.js `>=16.13` 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

Expand All @@ -26,9 +26,9 @@ 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.39.1/install.sh | bash
nvm install 16
npm install --global pnpm@7 ts-node
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
nvm install 18
npm install --global pnpm@8 ts-node
# For direnv see https://github.com/direnv/direnv/blob/master/docs/installation.md
```

Expand Down

0 comments on commit 6999af5

Please sign in to comment.