Skip to content

Commit 6c218f0

Browse files
It's alive (#965)
Refactor project configuration and workflows for pnpm migration: - Switch from npm to pnpm as package manager - Update Node.js version to 22 LTS - Migrate to flat ESLint configuration - Remove shared prettier configuration - Update various dependencies to latest versions - Update dependency management in Dependabot configuration - Update Node.js version file from .nvmrc to .node-version - Update documentation with pnpm installation and usage instructions - Change formatting settings to max_line_length 80
1 parent 88010c2 commit 6c218f0

File tree

165 files changed

+16014
-22197
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

165 files changed

+16014
-22197
lines changed

Diff for: .changeset/config.json

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
{
2-
"$schema": "../node_modules/@changesets/config/schema.json",
3-
"changelog": "@changesets/cli/changelog",
4-
"commit": false,
5-
"fixed": [],
6-
"linked": [],
7-
"access": "public",
8-
"baseBranch": "canary",
9-
"updateInternalDependencies": "patch",
10-
"ignore": [
11-
"@neshca/server",
12-
"@repo/backend",
13-
"@repo/cache-handler-docs",
14-
"@repo/cache-testing",
15-
"@repo/eslint-config",
16-
"@repo/prettier-config"
17-
]
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "canary",
9+
"updateInternalDependencies": "patch",
10+
"ignore": [
11+
"@neshca/server",
12+
"@repo/backend",
13+
"@repo/cache-handler-docs",
14+
"@repo/cache-testing",
15+
"@repo/eslint-config"
16+
]
1817
}

Diff for: .editorconfig

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[*]
2+
charset = utf-8
3+
insert_final_newline = true
4+
end_of_line = lf
5+
indent_style = space
6+
indent_size = 2
7+
max_line_length = 80

Diff for: .github/actions/add-dist-tags/action.yml

-12
This file was deleted.

Diff for: .github/actions/add-dist-tags/add-dist-tags.js

-67
This file was deleted.

Diff for: .github/dependabot.yml

+8-15
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,6 @@ updates:
99
versioning-strategy: increase
1010
open-pull-requests-limit: 20
1111
ignore:
12-
- dependency-name: 'eslint'
13-
versions: ['9.x.x']
14-
- dependency-name: '@types/eslint'
15-
versions: ['9.x.x']
16-
- dependency-name: '@typescript-eslint/eslint-plugin'
17-
versions: ['8.x.x']
18-
- dependency-name: '@typescript-eslint/parser'
19-
versions: ['8.x.x']
2012
- dependency-name: 'lru-cache'
2113
versions: ['11.x.x']
2214
groups:
@@ -27,10 +19,7 @@ updates:
2719
turbo:
2820
patterns:
2921
- 'turbo'
30-
- 'eslint-config-turbo'
31-
definitely-typed:
32-
patterns:
33-
- '@types/*'
22+
- 'eslint-plugin-turbo'
3423
react:
3524
patterns:
3625
- 'react'
@@ -48,6 +37,10 @@ updates:
4837
eslint:
4938
patterns:
5039
- 'eslint'
51-
- '@types/eslint'
52-
- '@typescript-eslint/eslint-plugin'
53-
- '@typescript-eslint/parser'
40+
- '@eslint/js'
41+
- 'eslint-config-prettier'
42+
- 'eslint-plugin-react'
43+
- 'eslint-plugin-react-hooks'
44+
- 'eslint-plugin-turbo'
45+
- 'globals'
46+
- 'typescript-eslint'

Diff for: .github/workflows/deploy-docs.yml

+12-5
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,25 @@ jobs:
2525
steps:
2626
- name: Checkout
2727
uses: actions/checkout@v4
28+
29+
- uses: pnpm/action-setup@v4
30+
2831
- name: Setup Node
2932
uses: actions/setup-node@v4
3033
with:
31-
node-version-file: '.nvmrc'
34+
node-version-file: '.node-version'
3235
check-latest: true
33-
cache: 'npm'
36+
cache: 'pnpm'
37+
3438
- name: Setup Pages
3539
uses: actions/configure-pages@v5
40+
3641
- name: Install dependencies
37-
run: npm ci
38-
- name: Build with Next.js
39-
run: npm run build:docs
42+
run: pnpm i --frozen-lockfile
43+
44+
- name: Build docs
45+
run: pnpm build:docs
46+
4047
- name: Upload artifact
4148
uses: actions/upload-pages-artifact@v3
4249
with:

Diff for: .github/workflows/release.yml

+19-20
Original file line numberDiff line numberDiff line change
@@ -18,42 +18,41 @@ jobs:
1818
name: Release
1919
runs-on: ubuntu-latest
2020
steps:
21-
- name: Checkout Repo
21+
- name: Checkout
2222
uses: actions/checkout@v4
23-
- name: Setup Node.js
23+
24+
- uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node
2427
uses: actions/setup-node@v4
2528
with:
26-
node-version-file: '.nvmrc'
29+
node-version-file: '.node-version'
2730
check-latest: true
28-
cache: 'npm'
29-
- name: Install Dependencies
30-
run: npm ci
31+
cache: 'pnpm'
32+
33+
- name: Install dependencies
34+
run: pnpm i --frozen-lockfile
35+
3136
- name: Build packages
32-
run: npm run build:packages
37+
run: pnpm build:packages
38+
3339
- name: Check code style
34-
run: npm run codestyle:check
40+
run: pnpm codestyle:check
41+
3542
- name: Creating .npmrc
3643
run: |
3744
cat << EOF > "$HOME/.npmrc"
3845
//registry.npmjs.org/:_authToken=$NPM_TOKEN
3946
EOF
4047
env:
4148
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
4250
- name: Create Release Pull Request or Publish to npm
4351
id: changesets
4452
uses: changesets/action@v1
4553
with:
46-
publish: npm run ci:publish
47-
version: npm run ci:version
48-
env:
49-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
50-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51-
- name: Add dist-tags
52-
if: steps.changesets.outputs.published == 'true'
53-
id: dist-tags
54-
uses: ./.github/actions/add-dist-tags
55-
with:
56-
publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}
57-
published: ${{ steps.changesets.outputs.published }}
54+
publish: pnpm ci:publish
55+
version: pnpm ci:version
5856
env:
5957
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
58+
GITHUB_TOKEN: ${{ github.token }}

Diff for: .github/workflows/test-docs.yml

+15-10
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,35 @@ env:
33
CI: true
44
on:
55
pull_request:
6+
types: [opened, synchronize]
67
branches: [canary]
78
paths:
89
- '.github/workflows/test-docs.yml'
910
- 'docs/cache-handler-docs/**'
1011
- 'internal/eslint-config/**'
11-
- 'internal/prettier-config/**'
1212
- 'package.json'
1313
- 'biome.json'
14-
- '.prettierrc.json'
14+
- 'prettier.config.js'
1515
jobs:
1616
test:
1717
name: 'check-docs-build'
1818
timeout-minutes: 5
1919
runs-on: ubuntu-latest
2020
steps:
21-
- uses: actions/checkout@v4
22-
- uses: actions/setup-node@v4
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- uses: pnpm/action-setup@v4
25+
26+
- name: Setup Node
27+
uses: actions/setup-node@v4
2328
with:
24-
node-version-file: '.nvmrc'
29+
node-version-file: '.node-version'
2530
check-latest: true
26-
cache: 'npm'
31+
cache: 'pnpm'
32+
2733
- name: Install dependencies
28-
run: npm ci
29-
- name: Check code style
30-
run: npm run codestyle:check
34+
run: pnpm i --frozen-lockfile
35+
3136
- name: Build docs
32-
run: npm run build:docs
37+
run: pnpm build:docs

Diff for: .github/workflows/tests.yml

+28-16
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ on:
1212
- 'server/**'
1313
- '.github/workflows/tests.yml'
1414
- 'internal/eslint-config/**'
15-
- 'internal/prettier-config/**'
1615
- 'package.json'
1716
- 'biome.json'
1817
- 'turbo.json'
19-
- '.prettierrc.json'
18+
- 'prettier.config.js'
2019
pull_request:
2120
branches: [canary]
21+
types: [opened, synchronize]
2222
paths:
2323
- 'apps/cache-testing/**'
2424
- 'packages/cache-handler/**'
@@ -27,11 +27,10 @@ on:
2727
- 'server/**'
2828
- '.github/workflows/tests.yml'
2929
- 'internal/eslint-config/**'
30-
- 'internal/prettier-config/**'
3130
- 'package.json'
3231
- 'biome.json'
3332
- 'turbo.json'
34-
- '.prettierrc.json'
33+
- 'prettier.config.js'
3534
jobs:
3635
test:
3736
strategy:
@@ -54,33 +53,46 @@ jobs:
5453
ports:
5554
- 6379:6379
5655
steps:
57-
- uses: actions/checkout@v4
58-
- uses: actions/setup-node@v4
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
59+
- uses: pnpm/action-setup@v4
60+
61+
- name: Setup Node
62+
uses: actions/setup-node@v4
5963
with:
60-
node-version-file: '.nvmrc'
64+
node-version-file: '.node-version'
6165
check-latest: true
62-
cache: 'npm'
66+
cache: 'pnpm'
67+
6368
- name: Replace Path with Sed
6469
run: |
6570
if [ "${{ matrix.handler }}" == "redis-strings" ]; then
6671
sed -i 's/cache-handler-redis-stack/cache-handler-redis-strings/g' apps/cache-testing/next.config.mjs
6772
sed -i 's/cache-handler-redis-stack/cache-handler-redis-strings/g' apps/cache-testing/src/instrumentation.ts
6873
fi
74+
6975
- name: Install dependencies
70-
run: npm ci
76+
run: pnpm i --frozen-lockfile
77+
7178
- name: Install Playwright Browsers
72-
run: npm run playwright:install -w @repo/cache-testing
79+
run: pnpm -F @repo/cache-testing playwright:install
80+
7381
- name: Build packages
74-
run: npm run build:packages
82+
run: pnpm build:packages
83+
7584
- name: Check code style
76-
run: npm run codestyle:check
85+
run: pnpm codestyle:check
86+
7787
- name: Run unit tests
78-
run: npm test
88+
run: pnpm test
89+
7990
- name: Run e2e tests
8091
run: |
81-
npm run start:backend &
82-
npm run build:test-app
83-
npm run e2e
92+
pnpm start:backend &
93+
pnpm build:test-app
94+
pnpm e2e
95+
8496
- uses: actions/upload-artifact@v4
8597
if: always()
8698
with:

0 commit comments

Comments
 (0)