Skip to content

Commit

Permalink
chore: Use pnpm instead of npm
Browse files Browse the repository at this point in the history
  • Loading branch information
zusorio committed Dec 18, 2024
1 parent b0b20a2 commit bfe08a5
Show file tree
Hide file tree
Showing 13 changed files with 19,364 additions and 33,977 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
schedule:
interval: 'weekly'
# Frontend
- package-ecosystem: 'npm'
- package-ecosystem: 'pnpm'
directory: '/frontend'
schedule:
interval: 'weekly'
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: 'frontend/package.json'
- uses: actions/setup-node@v4
with:
node-version: 22
Expand All @@ -55,7 +58,7 @@ jobs:
- name: Install dependencies (frontend)
working-directory: frontend/
run: |-
npm ci
pnpm install
- name: Run pre-commit
run: |-
pre-commit run --all-files
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/storybook-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
package_json_file: 'frontend/package.json'
- uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install storycap puppeteer http-server
run: pnpm install storycap puppeteer http-server
working-directory: ./frontend
- name: Capture screenshots
run:
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/storybook-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: pnpm/action-setup@v4
with:
package_json_file: 'frontend/package.json'
- uses: actions/setup-node@v4
with:
node-version: 22
Expand All @@ -38,10 +41,10 @@ jobs:
comment-author: 'github-actions[bot]'
body-includes: Chromatic
- name: Install dependencies
run: npm ci
run: pnpm install
working-directory: ./frontend
- name: Build Storybook
run: npx -p @angular/cli ng run capellacollab:build-storybook
run: pnpx @angular/cli run capellacollab:build-storybook
working-directory: ./frontend
- name: Run Chromatic
id: chromatic
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ repos:
rev: v5.0.0
hooks:
- id: check-added-large-files
exclude: '^frontend/package-lock.json'
exclude: '^frontend/pnpm-lock.yaml'
- id: check-builtin-literals
- id: check-case-conflict
- id: check-executables-have-shebangs
Expand All @@ -43,7 +43,7 @@ repos:
rev: v2.3.0
hooks:
- id: codespell
exclude: 'frontend/package-lock.json'
exclude: 'frontend/pnpm-lock.yaml'
args: ['-L', 'AKS']
- repo: https://github.com/rhysd/actionlint
rev: v1.7.4
Expand Down Expand Up @@ -91,7 +91,7 @@ repos:
language: node
types_or: [ts]
additional_dependencies:
- 'typescript@^5.6.3'
- 'typescript@~5.6.3'
- repo: local
hooks:
- id: prettier
Expand All @@ -113,7 +113,7 @@ repos:
- id: insert-license
name: Insert license headers (shell-style comments)
files: '(?:^|/)(?:.*\.(?:py|sh|toml|ya?ml|cfg|ini)|Dockerfile|Makefile|nginx.conf)$'
exclude: '(?:^|/)\..+|^docs/Makefile$'
exclude: '(?:^|/)\..+|^docs/Makefile$|^frontend/pnpm-lock\.yaml$'
args:
- --detect-license-in-X-top-lines=15
- --license-filepath
Expand Down
1 change: 0 additions & 1 deletion ci-templates/gitlab/image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ frontend:
- IMAGE=${DOCKER_REGISTRY}/${FRONTEND_IMAGE_NAME:?}
- *docker
- mv ../favicon.ico frontend/src
- npm i undici
- python frontend/fetch-version.py
- >
docker build ${DOCKER_BUILD_ARGS} \
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/development/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ The k3d cluster is required for the development environment.
- [`Python`](https://www.python.org/) >= 3.12
- [`Docker`](https://www.docker.com/)
- [`GNU Make`](https://www.gnu.org/software/make/)
- [`Node.js`](https://nodejs.org/en) >= v20.8.0
- [`npm`](https://www.npmjs.com/) package manager
- [`Node.js`](https://nodejs.org/en) >= v22
- [`Angular CLI`](https://angular.dev/tools/cli/setup-local#install-the-angular-cli)

### Backend Configuration
Expand All @@ -58,8 +57,9 @@ To get started, run the following command in the root of the repository for the
initial setup (only required once):

```zsh
corepack enable
(cd backend && make install)
(cd frontend && npm i)
(cd frontend && pnpm i)
(cd docs && make install)
```

Expand Down
9 changes: 5 additions & 4 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@ FROM $BASE_IMAGE as build
USER root

ARG CONFIGURATION=production
RUN npm install -g npm@latest
RUN corepack enable

WORKDIR /work

COPY ./package*.json /work/
RUN npm i
COPY ./package.json /work/
COPY ./pnpm-lock.yaml /work/
RUN pnpm install

COPY . /work
RUN npm run build -- --configuration=${CONFIGURATION}
RUN pnpm run build -- --configuration=${CONFIGURATION}

FROM nginxinc/nginx-unprivileged:latest

Expand Down
6 changes: 3 additions & 3 deletions frontend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ test:
fi

storybook:
npm run storybook
pnpm run storybook

build-storybook:
npm run build-storybook
pnpm run build-storybook

snapshots:
rm -rf __screenshots__
npx storycap http://localhost:6006 --serverCmd "npm run storybook" --flat
pnpx storycap http://localhost:6006 --serverCmd "pnpm run storybook" --flat

openapi:
OPENAPI_DIR=$$(mktemp -d)
Expand Down
Loading

0 comments on commit bfe08a5

Please sign in to comment.