Skip to content

Commit 3a10765

Browse files
committed
Switch from Yarn to pnpm for package management
1 parent 8bd0443 commit 3a10765

File tree

10 files changed

+18127
-12944
lines changed

10 files changed

+18127
-12944
lines changed

.github/workflows/algolia-index.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,26 @@ jobs:
2727
with:
2828
bun-version: '1.1.34'
2929

30+
- uses: pnpm/action-setup@v4
31+
with:
32+
version: 10
33+
3034
- uses: actions/cache@v4
3135
id: cache
3236
with:
33-
path: ${{ github.workspace }}/node_modules
34-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37+
path: ~/.pnpm-store
38+
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
39+
restore-keys: |
40+
pnpm-${{ runner.os }}-
3541
36-
- run: yarn install --frozen-lockfile
42+
- run: pnpm install --frozen-lockfile
3743
if: steps.cache.outputs.cache-hit != 'true'
3844

3945
# bun seems to be the most straightforward way to run a TypeScript script
4046
# without introducing another dependency like ts-node or tsx for everyone else
4147

4248
- name: Build index for user docs
43-
run: yarn build && bun ./scripts/algolia.ts
49+
run: pnpm build && bun ./scripts/algolia.ts
4450
if: steps.filter.outputs.docs == 'true'
4551
env:
4652
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
@@ -52,7 +58,7 @@ jobs:
5258
NEXT_PUBLIC_SENTRY_DSN: https://[email protected]/0
5359

5460
- name: Build index for developer docs
55-
run: yarn build:developer-docs && bun ./scripts/algolia.ts
61+
run: pnpm build:developer-docs && bun ./scripts/algolia.ts
5662
if: steps.filter.outputs.dev-docs == 'true'
5763
env:
5864
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}

.github/workflows/lint-404s.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,29 +29,35 @@ jobs:
2929
with:
3030
bun-version: latest
3131

32+
- uses: pnpm/action-setup@v4
33+
with:
34+
version: 10
35+
3236
- uses: actions/cache@v4
3337
id: cache
3438
with:
35-
path: ${{ github.workspace }}/node_modules
36-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
39+
path: ~/.pnpm-store
40+
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
41+
restore-keys: |
42+
pnpm-${{ runner.os }}-
3743
38-
- run: yarn install --frozen-lockfile
44+
- run: pnpm install --frozen-lockfile
3945
if: steps.cache.outputs.cache-hit != 'true'
4046

41-
- run: yarn build
47+
- run: pnpm build
4248
if: steps.filter.outputs.docs == 'true'
4349
env:
4450
SENTRY_DSN: https://[email protected]/0
4551
NEXT_PUBLIC_SENTRY_DSN: https://[email protected]/0
4652

47-
- run: yarn build:developer-docs
53+
- run: pnpm build:developer-docs
4854
if: steps.filter.outputs.dev-docs == 'true'
4955
env:
5056
SENTRY_DSN: https://[email protected]/0
5157
NEXT_PUBLIC_SENTRY_DSN: https://[email protected]/0
5258

5359
- name: Start Http Server
54-
run: yarn start &
60+
run: pnpm start &
5561
if: steps.filter.outputs.docs == 'true' || steps.filter.outputs.dev-docs == 'true'
5662
env:
5763
SENTRY_DSN: https://[email protected]/0

.github/workflows/sync-labels.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,12 @@ jobs:
2828
with:
2929
node-version-file: 'package.json'
3030

31+
- uses: pnpm/action-setup@v4
32+
with:
33+
version: 10
34+
3135
- name: Install github-label-sync
32-
run: yarn global add [email protected]
36+
run: pnpm add -g [email protected]
3337

3438
- name: Run github-label-sync
3539
run: |

.github/workflows/test.yml

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,21 +26,28 @@ jobs:
2626
with:
2727
node-version-file: 'package.json'
2828

29+
- uses: pnpm/action-setup@v4
30+
with:
31+
version: 10
32+
2933
- uses: actions/cache@v4
3034
id: cache
3135
with:
32-
path: ${{ github.workspace }}/node_modules
33-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
34-
- run: yarn install --frozen-lockfile
36+
path: ~/.pnpm-store
37+
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
38+
restore-keys: |
39+
pnpm-${{ runner.os }}-
40+
41+
- run: pnpm install --frozen-lockfile
3542
if: steps.cache.outputs.cache-hit != 'true'
3643

3744
# Additional checks
38-
- run: yarn lint:ts
39-
- run: yarn lint:docs
45+
- run: pnpm lint:ts
46+
- run: pnpm lint:docs
4047

4148
# Run automatic fixes (run prettier apart from eslint to also fix mdx files)
42-
- run: yarn lint:prettier:fix
43-
- run: yarn lint:eslint:fix
49+
- run: pnpm lint:prettier:fix
50+
- run: pnpm lint:eslint:fix
4451

4552
# Check (and error) for dirty working tree for forks
4653
# Reason being we need a different token to auto commit changes and
@@ -66,12 +73,20 @@ jobs:
6673
uses: actions/setup-node@v4
6774
with:
6875
node-version-file: 'package.json'
76+
77+
- uses: pnpm/action-setup@v4
78+
with:
79+
version: 10
80+
6981
- uses: actions/cache@v4
7082
id: cache
7183
with:
72-
path: ${{ github.workspace }}/node_modules
73-
key: node-${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
74-
- run: yarn install --frozen-lockfile
84+
path: ~/.pnpm-store
85+
key: pnpm-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
86+
restore-keys: |
87+
pnpm-${{ runner.os }}-
88+
89+
- run: pnpm install --frozen-lockfile
7590
if: steps.cache.outputs.cache-hit != 'true'
7691
- name: Run Tests
77-
run: yarn test
92+
run: pnpm test

.npmrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Enable strict peer dependencies for better dependency management
2+
strict-peer-dependencies=false
3+
# Use public npm registry
4+
registry=https://registry.npmjs.org/
5+
# Enable shared lockfile (default behavior)
6+
shared-workspace-lockfile=true
7+
# Save exact versions
8+
save-exact=true
9+
# Auto install peers
10+
auto-install-peers=true

.yarnrc.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

package.json

Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@
1111
"url": "https://github.com/getsentry/sentry-docs/issues"
1212
},
1313
"private": true,
14-
"workspaces": [
15-
"./apps/*"
16-
],
14+
"packageManager": "[email protected]",
1715
"scripts": {
18-
"dev": "yarn enforce-redirects && concurrently \"yarn sidecar\" \"node ./src/hotReloadWatcher.mjs\" \"next dev\"",
19-
"dev:developer-docs": "yarn enforce-redirects && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn dev",
20-
"build:developer-docs": "yarn enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn build",
21-
"build": "yarn enforce-redirects && next build",
22-
"vercel:build:developer-docs": "yarn enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 yarn build",
16+
"dev": "pnpm enforce-redirects && concurrently \"pnpm sidecar\" \"node ./src/hotReloadWatcher.mjs\" \"next dev\"",
17+
"dev:developer-docs": "pnpm enforce-redirects && NEXT_PUBLIC_DEVELOPER_DOCS=1 pnpm dev",
18+
"build:developer-docs": "pnpm enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 pnpm build",
19+
"build": "pnpm enforce-redirects && next build",
20+
"vercel:build:developer-docs": "pnpm enforce-redirects && git submodule init && git submodule update && NEXT_PUBLIC_DEVELOPER_DOCS=1 pnpm build",
2321
"start": "next start",
2422
"lint": "next lint",
2523
"lint:ts": "tsc --skipLibCheck",
@@ -28,8 +26,8 @@
2826
"lint:eslint:fix": "eslint --fix \"{src,app,scripts}/**/*.{ts,tsx,js,jsx}\"",
2927
"lint:prettier": "prettier --check \"./{src,app,scripts}/**/*.{md,mdx,ts,tsx,js,jsx,mjs}\"",
3028
"lint:prettier:fix": "prettier --write \"./{src,app,scripts}/**/*.{md,mdx,ts,tsx,js,jsx,mjs}\"",
31-
"lint:fix": "yarn run lint:prettier:fix && yarn run lint:eslint:fix",
32-
"sidecar": "yarn spotlight-sidecar",
29+
"lint:fix": "pnpm run lint:prettier:fix && pnpm run lint:eslint:fix",
30+
"sidecar": "pnpm spotlight-sidecar",
3331
"test": "vitest",
3432
"test:ci": "vitest run",
3533
"enforce-redirects": "node ./scripts/no-vercel-json-redirects.mjs"
@@ -48,14 +46,20 @@
4846
"@radix-ui/react-collapsible": "^1.1.1",
4947
"@radix-ui/react-dropdown-menu": "^2.1.2",
5048
"@radix-ui/react-icons": "^1.3.2",
49+
"@radix-ui/react-popover": "1.1.14",
50+
"@radix-ui/react-select": "2.2.5",
5151
"@radix-ui/react-tabs": "^1.1.1",
5252
"@radix-ui/react-toolbar": "^1.1.0",
5353
"@radix-ui/react-tooltip": "^1.1.4",
5454
"@radix-ui/themes": "^3.1.3",
5555
"@sentry-internal/global-search": "^1.3.0",
56+
"@sentry/browser": "9.28.0",
5657
"@sentry/nextjs": "9.27.0",
58+
"@types/mdast": "4.0.4",
5759
"@types/mdx": "^2.0.9",
60+
"@types/unist": "3.0.3",
5861
"algoliasearch": "^4.23.3",
62+
"classnames": "2.5.1",
5963
"dompurify": "3.2.4",
6064
"esbuild": "^0.25.0",
6165
"framer-motion": "^10.12.16",
@@ -67,6 +71,10 @@
6771
"js-cookie": "^3.0.5",
6872
"js-yaml": "^4.1.0",
6973
"match-sorter": "^6.3.4",
74+
"mdast": "3.0.0",
75+
"mdast-util-from-markdown": "2.0.2",
76+
"mdast-util-to-markdown": "2.1.2",
77+
"mdast-util-to-string": "4.0.0",
7078
"mdx-bundler": "^10.0.1",
7179
"mermaid": "^11.4.0",
7280
"micromark": "^4.0.0",
@@ -84,6 +92,7 @@
8492
"react-popper": "^2.3.0",
8593
"react-select": "^5.7.3",
8694
"react-textarea-autosize": "^8.5.3",
95+
"refractor": "5.0.0",
8796
"rehype-autolink-headings": "^7.1.0",
8897
"rehype-preset-minify": "^7.0.0",
8998
"rehype-prism-diff": "^1.1.2",
@@ -93,13 +102,17 @@
93102
"remark-mdx-images": "^3.0.0",
94103
"remark-parse": "^11.0.0",
95104
"remark-prism": "^1.3.6",
105+
"remark-rehype": "11.1.2",
96106
"rss": "^1.2.2",
97107
"sass": "^1.69.5",
98108
"search-insights": "^2.17.2",
99109
"server-only": "^0.0.1",
100110
"sharp": "^0.33.4",
101111
"tailwindcss-scoped-preflight": "^3.0.4",
102-
"textarea-markdown-editor": "^1.0.4"
112+
"textarea-markdown-editor": "^1.0.4",
113+
"unified": "11.0.5",
114+
"unist": "0.0.1",
115+
"unist-util-visit": "5.0.0"
103116
},
104117
"devDependencies": {
105118
"@babel/preset-typescript": "^7.15.0",
@@ -130,12 +143,13 @@
130143
"vitest": "^3.0.7",
131144
"ws": "^8.17.1"
132145
},
133-
"resolutions": {
134-
"dompurify": "3.2.4",
135-
"@types/dompurify": "3.0.5"
146+
"pnpm": {
147+
"overrides": {
148+
"dompurify": "3.2.4",
149+
"@types/dompurify": "3.0.5"
150+
}
136151
},
137152
"volta": {
138-
"node": "20.11.0",
139-
"yarn": "1.22.22"
153+
"node": "20.11.0"
140154
}
141155
}

0 commit comments

Comments
 (0)