Skip to content

Commit 8e2453c

Browse files
committed
build: update pnpm and simplify skipping linting in docker builds
1 parent f7b0641 commit 8e2453c

File tree

8 files changed

+16
-27
lines changed

8 files changed

+16
-27
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18",
77
"features": {
88
"ghcr.io/devcontainers-contrib/features/pnpm:2": {
9-
"version": "9.12.3"
9+
"version": "10.9.0"
1010
}
1111
},
1212
// Features to add to the dev container. More info: https://containers.dev/features.

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"dependencies"
1616
],
1717
"constraints": {
18-
"pnpm": "9"
18+
"pnpm": "10"
1919
},
2020
"packageRules": [
2121
{

.github/workflows/lint.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
uses: actions/checkout@v4
3030
- uses: pnpm/[email protected]
3131
with:
32-
version: 9.12.3
32+
version: 10.9.0
3333
run_install: false
3434
- name: Setup Node
3535
uses: actions/setup-node@v4
@@ -48,15 +48,15 @@ jobs:
4848
uses: actions/checkout@v4
4949
- uses: pnpm/[email protected]
5050
with:
51-
version: 9.12.3
51+
version: 10.9.0
5252
run_install: false
5353
- name: Setup Node
5454
uses: actions/setup-node@v4
5555
with:
5656
node-version: 20
5757
cache: 'pnpm'
5858
- name: Install dependencies
59-
run: pnpm install
59+
run: pnpm install --frozen-lockfile
6060
- run: node -v
6161
- name: Type Check
6262
run: pnpm tsc

.github/workflows/nextjs_bundle_analysis.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
- uses: pnpm/[email protected]
2222
with:
23-
version: 9.12.3
23+
version: 10.9.0
2424
run_install: false
2525
- name: Setup Node
2626
uses: actions/setup-node@v4

.github/workflows/test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
uses: actions/checkout@v4
5050
- uses: pnpm/[email protected]
5151
with:
52-
version: 9.12.3
52+
version: 10.9.0
5353
run_install: false
5454
- name: Setup Node
5555
uses: actions/setup-node@v4
@@ -123,7 +123,7 @@ jobs:
123123
uses: actions/checkout@v4
124124
- uses: pnpm/[email protected]
125125
with:
126-
version: 9.12.3
126+
version: 10.9.0
127127
run_install: false
128128
- name: Setup Node
129129
uses: actions/setup-node@v4

Dockerfile

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,11 @@ WORKDIR /app
88
COPY package.json pnpm-lock.yaml ./
99
COPY patches ./patches/
1010

11-
# Whether to skip TSC and Eslint Checks
12-
ARG SKIP_CHECKS
13-
ENV SKIP_CHECKS=${SKIP_CHECKS:-0}
14-
RUN echo "SKIP_CHECKS=${SKIP_CHECKS}"
15-
16-
RUN npm i -g [email protected]
17-
RUN if [ "$SKIP_CHECKS" = "1" ]; then pnpm fetch --prod; else pnpm fetch; fi
18-
RUN if [ "$SKIP_CHECKS" = "1" ]; \
19-
then pnpm i -P --ignore-scripts; \
20-
else pnpm i --ignore-scripts; fi
21-
22-
# If using npm with a `package-lock.json` comment out above and use below instead
23-
# COPY package.json package-lock.json ./
24-
# RUN npm ci
11+
RUN npm i -g [email protected]
12+
RUN pnpm fetch --prod
13+
# RUN pnpm fetch
14+
RUN pnpm i -P --ignore-scripts
15+
# RUN pnpm i --ignore-scripts
2516

2617
# Rebuild the source code only when needed
2718
FROM base AS builder
@@ -41,7 +32,7 @@ ENV GIT_SHA=${GIT_SHA:-""}
4132
ARG BASE_PATH
4233
ENV BASE_PATH=${BASE_PATH}
4334

44-
# RUN npm i -g pnpm@9.12.3
35+
# RUN npm i -g pnpm@10.9.0
4536
RUN echo "GIT_SHA=${GIT_SHA}" && npm run build
4637

4738
# If using npm comment out above and use below instead

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ build commands, which can be run from the project clone to produce an
9090

9191
$ docker build . \
9292
--build-arg GIT_SHA=$(git rev-parse HEAD) \
93-
--build-arg SKIP_CHECKS=1 \
9493
--tag informaticsmatters/squonk-data-manager-ui:latest
9594

9695
Deployment to Kubernetes is handled by our AWX-compliant [Ansible playbook repo].
@@ -107,7 +106,6 @@ Build the image using
107106
$ docker build . \
108107
--build-arg FLAVOUR=local.example \
109108
--build-arg GIT_SHA=$(git rev-parse HEAD) \
110-
--build-arg SKIP_CHECKS=1 \
111109
--build-arg BASE_PATH="" \
112110
--tag informaticsmatters/squonk-data-manager-ui:latest
113111

next.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ const resolvePackage = (packageName: string) =>
3030
let nextConfig: NextConfig = {
3131
output: process.env.OUTPUT_TYPE as NextConfig["output"],
3232
generateBuildId: process.env.GIT_SHA ? () => process.env.GIT_SHA ?? null : undefined,
33-
typescript: { ignoreBuildErrors: !!process.env.SKIP_CHECKS },
34-
eslint: { ignoreDuringBuilds: !!process.env.SKIP_CHECKS },
33+
typescript: { ignoreBuildErrors: true },
34+
eslint: { ignoreDuringBuilds: true },
3535
// reactStrictMode: true, // TODO: Blocked by @rjsf Form using UNSAFE_componentWillReceiveProps
3636
pageExtensions: ["js", "ts", "jsx", "tsx", "mdx"],
3737
// replace empty string with undefined

0 commit comments

Comments
 (0)