Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update node.js to v20 (master) #1199

Merged
merged 6 commits into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ jobs:
secrets:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
with:
CACHE_PATH: nuxt/pnpm-lock.yaml
CACHE_PATH: pnpm-lock.yaml
File renamed without changes.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
20
36 changes: 18 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

# Should be the specific version of `node:slim`.
# `sqitch` requires at least `buster`.
FROM node:18.16.0-slim AS development
FROM node:20.0.0-slim AS development

COPY ./docker/entrypoint.sh /usr/local/bin/
COPY ./docker/entrypoint.sh /usr/local/bin/docker-entrypoint.sh

# Update and install dependencies.
# - `libdbd-pg-perl postgresql-client sqitch` is required by the entrypoint
Expand All @@ -22,7 +22,7 @@ VOLUME /srv/.pnpm-store
VOLUME /srv/app
VOLUME /srv/sqitch

ENTRYPOINT ["entrypoint.sh"]
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["pnpm", "run", "dev"]

# Waiting for https://github.com/nuxt/framework/issues/6915
Expand All @@ -33,16 +33,16 @@ CMD ["pnpm", "run", "dev"]
# Prepare Nuxt.

# Should be the specific version of `node:slim`.
FROM node:18.16.0-slim AS prepare
FROM node:20.0.0-slim AS prepare

WORKDIR /srv/app/

COPY ./nuxt/pnpm-lock.yaml ./
COPY ./pnpm-lock.yaml ./

RUN corepack enable && \
pnpm fetch

COPY ./nuxt/ ./
COPY ./ ./

RUN pnpm install --offline

Expand All @@ -52,7 +52,7 @@ RUN pnpm install --offline

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:18.16.0-slim AS build
FROM node:20.0.0-slim AS build

ARG CI=false
ENV CI ${CI}
Expand All @@ -65,37 +65,37 @@ COPY --from=prepare /srv/app/ ./

ENV NODE_ENV=production
RUN corepack enable && \
pnpm run build
pnpm --dir nuxt run build


########################
# Nuxt: lint

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:18.16.0-slim AS lint
FROM node:20.0.0-slim AS lint

WORKDIR /srv/app/

COPY --from=prepare /srv/app/ ./

RUN corepack enable && \
pnpm run lint
pnpm --dir nuxt run lint


########################
# Nuxt: test (unit)

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:18.16.0-slim AS test-unit
FROM node:20.0.0-slim AS test-unit

WORKDIR /srv/app/

COPY --from=prepare /srv/app/ ./

RUN npm install -g pnpm && \
pnpm run test --run
RUN corepack enable && \
pnpm --dir nuxt run test --run


########################
Expand Down Expand Up @@ -148,7 +148,7 @@ WORKDIR /srv/app/
COPY --from=prepare /root/.cache/Cypress /root/.cache/Cypress
COPY --from=prepare /srv/app/ ./

RUN pnpm test:integration:dev
RUN pnpm --dir nuxt run test:integration:dev


########################
Expand All @@ -169,19 +169,19 @@ COPY --from=prepare /root/.cache/Cypress /root/.cache/Cypress
COPY --from=build /srv/app/ /srv/app/
COPY --from=test-integration-dev /srv/app/package.json /tmp/test/package.json

RUN pnpm test:integration:prod
RUN pnpm --dir nuxt run test:integration:prod


#######################
# Collect build, lint and test results.

# Should be the specific version of `node:slim`.
# Could be the specific version of `node:alpine`, but the `prepare` stage uses slim too.
FROM node:18.16.0-slim AS collect
FROM node:20.0.0-slim AS collect

WORKDIR /srv/app/

COPY --from=build /srv/app/.output ./.output
COPY --from=build /srv/app/nuxt/.output ./.output
COPY --from=lint /srv/app/package.json /tmp/package.json
COPY --from=test-unit /srv/app/package.json /tmp/package.json
COPY --from=test-integration-dev /srv/app/package.json /tmp/package.json
Expand All @@ -194,7 +194,7 @@ COPY --from=test-integration-prod /srv/app/package.json /tmp/package.json

# Should be the specific version of `node:slim`.
# `sqitch` requires at least `buster`.
FROM node:18.16.0-slim AS production
FROM node:20.0.0-slim AS production

ENV NODE_ENV=production

Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,13 +96,10 @@ The setup for backend development is more complex as it consists of numerous ser
```sh
corepack enable
pnpm install

cd nuxt
pnpm install
```
1. configure maevsi's [DargStack](https://github.com/dargstack/dargstack) then:
```sh
cd ../../maevsi_stack/src/development
cd ../maevsi_stack/src/development
cp stack.env.template stack.env
pnpm store path
$EDITOR stack.env # fill PNPM_STORE_DIR with what's printed by the previous command
Expand Down
3 changes: 1 addition & 2 deletions nuxt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
"description": "Find events, guests and friends.",
"type": "module",
"engines": {
"node": "18"
"node": "20"
},
"packageManager": "pnpm@8.3.1",
"scripts": {
"dev": "nuxt dev",
"build": "nuxt build",
Expand Down