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

build: switch package manager from npm to pnpm #78

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,18 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
- name: Setup Node.js
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 20
cache: npm
cache: "pnpm"
node-version-file: ".node-version"
- name: Install dependencies
run: npm install
run: pnpm install --frozen-lockfile
- name: Check types
run: npm run tsc:check
run: pnpm run tsc:check
- name: Check lint rules
run: npm run lint:check
run: pnpm run lint:check
- name: Check format
run: npm run format:check
run: pnpm run format:check
10 changes: 10 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
save-exact=true
auto-install-peers=true
strict-peer-dependencies=true

shell-emulator=true

update-notifier=false

; npm の使用を防ぐ
engine-strict=true
package-lock-only=true
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@
FROM node:20.10.0-bookworm AS deps
ARG NODE_ENV=production
WORKDIR /app
COPY ./package*.json ./
RUN npm ci
COPY ./package.json ./pnpm-lock.yaml ./
RUN corepack pnpm install --frozen-lockfile

FROM --platform=$BUILDPLATFORM node:20.10.0-bookworm AS builder
ARG NODE_ENV=development
WORKDIR /app
RUN corepack enable pnpm
COPY ./build.js ./
COPY ./package*.json ./
RUN npm ci
COPY ./package*.json ./pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY ./src/ ./src/
RUN npm run build
RUN pnpm run build

FROM --platform=$BUILDPLATFORM node:20.10.0-bookworm AS model-fetch

Expand Down
Loading