Skip to content

Commit cc58698

Browse files
kakkokari-gtyihRuruke
authored andcommitted
deps: update pnpm to v10
* Revert "fix(build): corepackのバグの回避 (misskey-dev#15387)" This reverts commit 9c70a4e. * deps: update pnpm to v10 * fix broken lockfile * update changelog * fix * fix * Revert "fix" This reverts commit 4abc6c1. * fix * fix * attempt to fix docker build * lint fixes * fix: revertしすぎた * detect pnpm version and install it * fix: そもそもpnpmを2回入れる必要がないかも * fix * refactor * fix * refactor: remove unnecessary arg * Update Dockerfile * update pnpm to v10.6.1 * Update Changelog * chore: use node to avoid installing jq
1 parent de7fe6c commit cc58698

19 files changed

+68
-81
lines changed

.devcontainer/devcontainer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
"ghcr.io/devcontainers/features/node:1": {
88
"version": "22.11.0"
99
},
10-
"ghcr.io/devcontainers-extra/features/corepack:1": {
11-
"version": "0.31.0"
10+
"ghcr.io/devcontainers-extra/features/pnpm:2": {
11+
"version": "10.6.1"
1212
}
1313
},
1414
"forwardPorts": [3000,5990],

.devcontainer/init.sh

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ sudo apt-get update
66
sudo apt-get -y install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb
77
git config --global --add safe.directory /workspace
88
git submodule update --init
9-
corepack install
10-
corepack enable
119
pnpm config set store-dir /home/node/.local/share/pnpm/store
1210
pnpm install --frozen-lockfile
1311
cp .devcontainer/devcontainer.yml .config/default.yml

.github/workflows/api-misskey-js.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
paths:
1010
- packages/misskey-js/**
1111
- .github/workflows/api-misskey-js.yml
12-
13-
env:
14-
COREPACK_DEFAULT_TO_LATEST: 0
15-
1612
jobs:
1713
report:
1814

@@ -22,7 +18,8 @@ jobs:
2218
- name: Checkout
2319
uses: actions/[email protected]
2420

25-
- run: corepack enable
21+
- name: Setup pnpm
22+
uses: pnpm/[email protected]
2623

2724
- name: Setup Node.js
2825
uses: actions/[email protected]

.github/workflows/get-api-diff.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ on:
1010
paths:
1111
- packages/backend/**
1212
- .github/workflows/get-api-diff.yml
13-
14-
env:
15-
COREPACK_DEFAULT_TO_LATEST: 0
16-
1713
jobs:
1814
get-from-misskey:
1915
runs-on: ubuntu-latest
@@ -35,14 +31,13 @@ jobs:
3531
with:
3632
ref: ${{ matrix.ref }}
3733
submodules: true
38-
- name: Install pnpm
39-
uses: pnpm/action-setup@v4
34+
- name: Setup pnpm
35+
uses: pnpm/action-setup@v4.1.0
4036
- name: Use Node.js ${{ matrix.node-version }}
4137
uses: actions/[email protected]
4238
with:
4339
node-version: ${{ matrix.node-version }}
4440
cache: 'pnpm'
45-
- run: corepack enable
4641
- run: pnpm i --frozen-lockfile
4742
- name: Check pnpm-lock.yaml
4843
run: git diff --exit-code pnpm-lock.yaml

.github/workflows/locale.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
paths:
1010
- locales/**
1111
- .github/workflows/locale.yml
12-
13-
env:
14-
COREPACK_DEFAULT_TO_LATEST: 0
15-
1612
jobs:
1713
locale_verify:
1814
runs-on: ubuntu-latest
@@ -22,11 +18,11 @@ jobs:
2218
with:
2319
fetch-depth: 0
2420
submodules: true
25-
- uses: pnpm/action-setup@v4
21+
- name: Setup pnpm
22+
uses: pnpm/[email protected]
2623
- uses: actions/[email protected]
2724
with:
2825
node-version-file: '.node-version'
2926
cache: 'pnpm'
30-
- run: corepack enable
3127
- run: pnpm i --frozen-lockfile
3228
- run: cd locales && node verify.js

.github/workflows/on-release-created.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66

77
workflow_dispatch:
88

9-
env:
10-
COREPACK_DEFAULT_TO_LATEST: 0
11-
129
jobs:
1310
publish-misskey-js:
1411
name: Publish misskey-js
@@ -26,8 +23,8 @@ jobs:
2623
- uses: actions/[email protected]
2724
with:
2825
submodules: true
29-
- name: Install pnpm
30-
uses: pnpm/action-setup@v4
26+
- name: Setup pnpm
27+
uses: pnpm/action-setup@v4.1.0
3128
- name: Use Node.js ${{ matrix.node-version }}
3229
uses: actions/[email protected]
3330
with:
@@ -36,7 +33,6 @@ jobs:
3633
registry-url: 'https://registry.npmjs.org'
3734
- name: Publish package
3835
run: |
39-
corepack enable
4036
pnpm i --frozen-lockfile
4137
pnpm build
4238
pnpm --filter misskey-js publish --access public --no-git-checks --provenance

.github/workflows/test-federation.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ on:
1515
# - packages/misskey-js/**
1616
# - .github/workflows/test-federation.yml
1717

18-
env:
19-
COREPACK_DEFAULT_TO_LATEST: 0
20-
2118
jobs:
2219
test:
2320
name: Federation test
@@ -29,8 +26,8 @@ jobs:
2926
- uses: actions/checkout@v4
3027
with:
3128
submodules: true
32-
- name: Install pnpm
33-
uses: pnpm/action-setup@v4
29+
- name: Setup pnpm
30+
uses: pnpm/action-setup@v4.1.0
3431
- name: Install FFmpeg
3532
run: |
3633
for i in {1..3}; do
@@ -53,7 +50,6 @@ jobs:
5350
cache: 'pnpm'
5451
- name: Build Misskey
5552
run: |
56-
corepack enable && corepack prepare
5753
pnpm i --frozen-lockfile
5854
pnpm build
5955
- name: Setup

.github/workflows/test-misskey-js.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ on:
1414
paths:
1515
- packages/misskey-js/**
1616
- .github/workflows/test-misskey-js.yml
17-
18-
env:
19-
COREPACK_DEFAULT_TO_LATEST: 0
20-
2117
jobs:
2218
test:
2319
name: Unit tests (misskey.js)
@@ -33,7 +29,8 @@ jobs:
3329
- name: Checkout
3430
uses: actions/[email protected]
3531

36-
- run: corepack enable
32+
- name: Setup pnpm
33+
uses: pnpm/[email protected]
3734

3835
- name: Setup Node.js ${{ matrix.node-version }}
3936
uses: actions/[email protected]

.github/workflows/test-production.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ on:
1010

1111
env:
1212
NODE_ENV: production
13-
COREPACK_DEFAULT_TO_LATEST: 0
1413

1514
jobs:
1615
production:
@@ -25,14 +24,13 @@ jobs:
2524
- uses: actions/[email protected]
2625
with:
2726
submodules: true
28-
- name: Install pnpm
29-
uses: pnpm/action-setup@v4
27+
- name: Setup pnpm
28+
uses: pnpm/action-setup@v4.1.0
3029
- name: Use Node.js ${{ matrix.node-version }}
3130
uses: actions/[email protected]
3231
with:
3332
node-version: ${{ matrix.node-version }}
3433
cache: 'pnpm'
35-
- run: corepack enable
3634
- run: pnpm i --frozen-lockfile
3735
- name: Check pnpm-lock.yaml
3836
run: git diff --exit-code pnpm-lock.yaml

.github/workflows/validate-api-json.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ on:
1313
paths:
1414
- packages/backend/**
1515
- .github/workflows/validate-api-json.yml
16-
17-
env:
18-
COREPACK_DEFAULT_TO_LATEST: 0
19-
2016
jobs:
2117
validate-api-json:
2218
runs-on: ubuntu-latest
@@ -29,16 +25,15 @@ jobs:
2925
- uses: actions/[email protected]
3026
with:
3127
submodules: true
32-
- name: Install pnpm
33-
uses: pnpm/action-setup@v4
28+
- name: Setup pnpm
29+
uses: pnpm/action-setup@v4.1.0
3430
- name: Use Node.js ${{ matrix.node-version }}
3531
uses: actions/[email protected]
3632
with:
3733
node-version: ${{ matrix.node-version }}
3834
cache: 'pnpm'
3935
- name: Install Redocly CLI
4036
run: npm i -g @redocly/cli
41-
- run: corepack enable
4237
- run: pnpm i --frozen-lockfile
4338
- name: Check pnpm-lock.yaml
4439
run: git diff --exit-code pnpm-lock.yaml

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@transfem-org:registry=https://activitypub.software/api/v4/packages/npm/
22
engine-strict = true
3+
save-exact = true

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## 2025.3.1
22

3+
### General
4+
- pnpmをv10に更新
5+
- Corepackを削除
6+
37
### Client
48
- Feat: 設定の検索を追加(実験的)
59
- Enhance: 設定項目の再配置

Dockerfile

+4-11
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ ARG NODE_VERSION=22.11.0-bookworm
66

77
FROM --platform=$BUILDPLATFORM node:${NODE_VERSION} AS native-builder
88

9-
ENV COREPACK_DEFAULT_TO_LATEST=0
10-
119
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1210
--mount=type=cache,target=/var/lib/apt,sharing=locked \
1311
rm -f /etc/apt/apt.conf.d/docker-clean \
@@ -16,8 +14,6 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
1614
&& apt-get install -yqq --no-install-recommends \
1715
build-essential
1816

19-
RUN corepack enable
20-
2117
WORKDIR /misskey
2218

2319
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
@@ -33,6 +29,8 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
3329

3430
ARG NODE_ENV=production
3531

32+
RUN node -e "console.log(JSON.parse(require('node:fs').readFileSync('./package.json')).packageManager)" | xargs npm install -g
33+
3634
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
3735
pnpm i --frozen-lockfile --aggregate-output
3836

@@ -46,14 +44,10 @@ RUN rm -rf .git/
4644

4745
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION} AS target-builder
4846

49-
ENV COREPACK_DEFAULT_TO_LATEST=0
50-
5147
RUN apt-get update \
5248
&& apt-get install -yqq --no-install-recommends \
5349
build-essential
5450

55-
RUN corepack enable
56-
5751
WORKDIR /misskey
5852

5953
COPY --link ["pnpm-lock.yaml", "pnpm-workspace.yaml", "package.json", "./"]
@@ -65,20 +59,20 @@ COPY --link ["packages/misskey-bubble-game/package.json", "./packages/misskey-bu
6559

6660
ARG NODE_ENV=production
6761

62+
RUN node -e "console.log(JSON.parse(require('node:fs').readFileSync('./package.json')).packageManager)" | xargs npm install -g
63+
6864
RUN --mount=type=cache,target=/root/.local/share/pnpm/store,sharing=locked \
6965
pnpm i --frozen-lockfile --aggregate-output
7066

7167
FROM --platform=$TARGETPLATFORM node:${NODE_VERSION}-slim AS runner
7268

7369
ARG UID="991"
7470
ARG GID="991"
75-
ENV COREPACK_DEFAULT_TO_LATEST=0
7671

7772
RUN apt-get update \
7873
&& apt-get install -y --no-install-recommends \
7974
ffmpeg tini curl libjemalloc-dev libjemalloc2 \
8075
&& ln -s /usr/lib/$(uname -m)-linux-gnu/libjemalloc.so.2 /usr/local/lib/libjemalloc.so \
81-
&& corepack enable \
8276
&& groupadd -g "${GID}" misskey \
8377
&& useradd -l -u "${UID}" -g "${GID}" -m -d /misskey misskey \
8478
&& find / -type d -path /sys -prune -o -type d -path /proc -prune -o -type f -perm /u+s -ignore_readdir_race -exec chmod u-s {} \; \
@@ -91,7 +85,6 @@ WORKDIR /misskey
9185

9286
# add package.json to add pnpm
9387
COPY --chown=misskey:misskey ./package.json ./package.json
94-
RUN corepack install
9588

9689
COPY --chown=misskey:misskey --from=target-builder /misskey/node_modules ./node_modules
9790
COPY --chown=misskey:misskey --from=target-builder /misskey/packages/backend/node_modules ./packages/backend/node_modules

package.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "git",
77
"url": "https://github.com/misskey-dev/misskey.git"
88
},
9-
"packageManager": "pnpm@9.15.4",
9+
"packageManager": "pnpm@10.6.1",
1010
"workspaces": [
1111
"packages/frontend-shared",
1212
"packages/frontend",
@@ -73,9 +73,15 @@
7373
"eslint": "9.20.1",
7474
"globals": "15.15.0",
7575
"ncp": "2.0.0",
76+
"pnpm": "10.6.1",
7677
"start-server-and-test": "2.0.10"
7778
},
7879
"optionalDependencies": {
7980
"@tensorflow/tfjs-core": "4.22.0"
81+
},
82+
"pnpm": {
83+
"overrides": {
84+
"@aiscript-dev/aiscript-languageserver": "-"
85+
}
8086
}
8187
}

packages/backend/src/server/ActivityPubServerService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ export class ActivityPubServerService {
765765
});
766766

767767
// follow
768-
fastify.get<{ Params: { followRequestId: string ; } }>('/follows/:followRequestId', async (request, reply) => {
768+
fastify.get<{ Params: { followRequestId: string; } }>('/follows/:followRequestId', async (request, reply) => {
769769
// This may be used before the follow is completed, so we do not
770770
// check if the following exists and only check if the follow request exists.
771771

packages/backend/src/server/FileServerService.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ export class FileServerService {
497497

498498
@bindThis
499499
private async downloadAndDetectTypeFromUrl(url: string): Promise<
500-
{ state: 'remote' ; mime: string; ext: string | null; path: string; cleanup: () => void; filename: string; }
500+
{ state: 'remote'; mime: string; ext: string | null; path: string; cleanup: () => void; filename: string; }
501501
> {
502502
const [path, cleanup] = await createTemp();
503503
try {

packages/backend/test-federation/compose.tpl.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ services:
1717
- ./.config/docker.env
1818
environment:
1919
- NODE_ENV=production
20-
- COREPACK_DEFAULT_TO_LATEST=0
2120
volumes:
2221
- type: bind
2322
source: ../../../built
@@ -82,7 +81,7 @@ services:
8281
working_dir: /misskey
8382
command: >
8483
bash -c "
85-
corepack enable && corepack prepare
84+
npm install -g pnpm
8685
pnpm -F backend migrate
8786
pnpm -F backend start
8887
"

0 commit comments

Comments
 (0)