Skip to content

Commit

Permalink
build: use [email protected] in dev setup (#4475)
Browse files Browse the repository at this point in the history
Refs #4033
  • Loading branch information
char0n authored Nov 11, 2024
1 parent 947446d commit 3896e74
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 31 deletions.
12 changes: 6 additions & 6 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
ARG VARIANT="20-bookworm"
ARG VARIANT="22-bookworm"
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:1-${VARIANT}

# Install 20.18.0 version of Node.js using nvm
ARG EXTRA_NODE_VERSION="20.18.0"
# Install 22.11.0 version of Node.js using nvm
ARG EXTRA_NODE_VERSION="22.11.0"
RUN su node -c "source /usr/local/share/nvm/nvm.sh && nvm install ${EXTRA_NODE_VERSION}"

## install emscripten
WORKDIR /home/node
RUN su node -c "git clone --depth 1 --branch 2.0.24 https://github.com/emscripten-core/emsdk.git"
RUN su node -c "git clone --depth 1 --branch 3.1.64 https://github.com/emscripten-core/emsdk.git"
WORKDIR emsdk
RUN su node -c "./emsdk install 2.0.24"
RUN su node -c "./emsdk activate 2.0.24"
RUN su node -c "./emsdk install 3.1.64"
RUN su node -c "./emsdk activate 3.1.64"
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
with:
fetch-depth: 0 # necessary for linting commit messages
ref: ${{ github.event.pull_request.head.sha }} # necessary to check out pull request HEAD commit instead of merge commit
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand All @@ -39,10 +39,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand All @@ -58,10 +58,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand All @@ -76,10 +76,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand All @@ -96,10 +96,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nightly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
cache: 'npm'
cache-dependency-path: 'package-lock.json'
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-to-GPR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: https://npm.pkg.github.com/
scope: "@swagger-api"
cache: 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: https://registry.npmjs.org
cache: 'npm'
cache-dependency-path: 'package-lock.json'
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.18.0
22.11.0
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM node:20.18.0-bookworm
FROM node:22.11.0-bookworm

# use bash as default shell
SHELL ["/bin/bash", "-c"]

# install emscripten
WORKDIR /tmp
RUN git clone --depth 1 --branch 2.0.24 https://github.com/emscripten-core/emsdk.git
RUN git clone --depth 1 --branch 3.1.64 https://github.com/emscripten-core/emsdk.git
WORKDIR emsdk
RUN ./emsdk install 2.0.24
RUN ./emsdk activate 2.0.24
RUN ./emsdk install 3.1.64
RUN ./emsdk activate 3.1.64
ENV PATH="/tmp/emsdk:/tmp/emsdk/upstream/emscripten:${PATH}"
ENV EMSDK="/tmp/emsdk"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ ApiDOM Playground is available at [https://swagger-api.github.io/apidom/](https:
This is a monorepo for all ApiDOM packages. All the code is written in [TypeScript](https://www.typescriptlang.org/).
All the information necessary for working with monorepo can be found in this [article](https://vladimirgorej.com/blog/things-i-have-learned-maintaining-javascript-monorepo-with-lerna/).

Assuming [prerequisites](#prerequisites) are already installed, [Node.js](https://nodejs.org/) `>=20.18.0 <21` and `npm >=10.8.2`
are the minimum required versions that this repo runs on, but we recommend using the latest version of Node.js@20.
Assuming [prerequisites](#prerequisites) are already installed, [Node.js](https://nodejs.org/) `>=22.11.0` and `npm >=10.8.2`
are the minimum required versions that this repo runs on, but we recommend using the latest version of Node.js@22.

### Setting up

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"private": true,
"type": "module",
"engines": {
"node": "=20.18.0",
"npm": ">=10.8.2"
"node": "=22.11.0",
"npm": ">=10.9.0"
},
"comments": {
"scripts": {
Expand Down

0 comments on commit 3896e74

Please sign in to comment.