Skip to content

Commit 2e16ba4

Browse files
authored
Merge pull request #34 from alienfast/update-tooling
Migrate tooling to pnpm, Biome, and tsdown
2 parents 69eb6a5 + 5a899e8 commit 2e16ba4

33 files changed

Lines changed: 5586 additions & 10241 deletions

‎.github/actions/build-cache/action.yml‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ runs:
55
using: 'composite'
66
steps:
77
- name: build cache
8-
uses: actions/cache@v4
8+
uses: actions/cache@v5
99
with:
1010
path: |
1111
node_modules
1212
dist
13-
packages/*/node_modules
14-
packages/*/dist
1513
key: ${{ github.run_id }}
1614
restore-keys: ${{ github.run_id }}

‎.github/actions/setup/action.yml‎

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,15 @@ description: setup to run any scripts
44
runs:
55
using: 'composite'
66
steps:
7-
- name: Use nodejs
8-
uses: actions/setup-node@v4
9-
with:
10-
node-version: 20
7+
- name: Install pnpm
8+
uses: pnpm/action-setup@v6
119

12-
- name: restore node modules cache
13-
uses: actions/cache@v4
14-
id: node_modules
10+
- name: Use nodejs
11+
uses: actions/setup-node@v6
1512
with:
16-
path: |
17-
node_modules
18-
packages/*/node_modules
19-
key: node-modules-${{ runner.os }}-${{ hashFiles('yarn.lock', 'patches/*.patch') }}
20-
restore-keys: |
21-
node-modules-${{ runner.os }}-
13+
node-version: 24
14+
cache: 'pnpm'
2215

23-
# - run: yarn install --frozen-lockfile --network-timeout 9000000
24-
# allow the lock file to change (updating our own workspace versions in monorepo)
25-
- run: yarn install --no-immutable
26-
if: steps.node_modules.outputs.cache-hit != 'true'
16+
- name: Install dependencies
17+
run: pnpm install --frozen-lockfile
2718
shell: bash
28-
# commit back the lock file change if it works
29-
- uses: stefanzweifel/git-auto-commit-action@v5
30-
if: steps.node_modules.outputs.cache-hit != 'true'
31-
with:
32-
commit_message: Apply yarn.lock changes

‎.github/workflows/build.yml‎

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ on:
66
pull_request:
77
types: [opened, synchronize, reopened]
88

9+
# Supersede in-progress runs for the same ref, but never cancel release
10+
# runs on main/next - only collapse redundant PR runs.
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
14+
915
# Enabled permissions on GITHUB_TOKEN
1016
permissions:
1117
# To be able to push to the repo
@@ -18,6 +24,8 @@ permissions:
1824
checks: write
1925
# To post comments on PRs
2026
issues: write
27+
# OIDC token for npm Trusted Publishing (token-less publish + provenance)
28+
id-token: write
2129

2230
env:
2331
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -30,46 +38,47 @@ jobs:
3038
install:
3139
runs-on: ubuntu-latest
3240
steps:
33-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
3442
- uses: ./.github/actions/setup
3543

3644
build:
3745
runs-on: ubuntu-latest
3846
needs: install
3947
steps:
40-
- uses: actions/checkout@v4
41-
- name: Prepare repository
42-
run: git fetch --unshallow --tags
48+
- uses: actions/checkout@v6
49+
with:
50+
# full history + tags for auto's versioning
51+
fetch-depth: 0
4352
- uses: ./.github/actions/setup
4453
- uses: ./.github/actions/build-cache
45-
- run: yarn build
46-
# - run: yarn build && yarn lerna run bundle --scope=auto
54+
- run: pnpm build
4755

4856
# pr-check:
4957
# runs-on: ubuntu-latest
5058
# needs: build
5159
# if: ${{ env.GITHUB_TOKEN != '' }}
5260
# steps:
53-
# - uses: actions/checkout@v4
61+
# - uses: actions/checkout@v6
5462
# - uses: ./.github/actions/setup
5563
# - uses: ./.github/actions/build-cache
56-
# - uses: 8BitJonny/gh-get-current-pr@3.0.0
64+
# - uses: 8BitJonny/gh-get-current-pr@4.0.0
5765
# id: PR
58-
# - run: yarn auto pr-check --pr $PR --url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
66+
# - run: pnpm auto pr-check --pr $PR --url "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
5967
# env:
6068
# PR: ${{ steps.PR.outputs.number }}
6169

6270
test:
6371
runs-on: ubuntu-latest
6472
needs: build
6573
steps:
66-
- uses: actions/checkout@v4
74+
- uses: actions/checkout@v6
75+
with:
76+
# full history + tags for auto's versioning
77+
fetch-depth: 0
6778
- uses: ./.github/actions/setup
6879
- uses: ./.github/actions/build-cache
69-
- name: Prepare repository
70-
run: git fetch --unshallow --tags
71-
- run: yarn test
72-
# - run: yarn test:coverage
80+
- run: pnpm test
81+
# - run: pnpm test:coverage
7382
# env:
7483
# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
7584
# - name: Send CodeCov Results
@@ -81,16 +90,17 @@ jobs:
8190
# if: ${{ env.GITHUB_TOKEN != '' && !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci') }}
8291
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
8392
steps:
84-
- uses: actions/checkout@v4
85-
# - uses: 8BitJonny/gh-get-current-pr@3.0.0
93+
- uses: actions/checkout@v6
94+
with:
95+
# full history + tags for auto's versioning
96+
fetch-depth: 0
97+
# - uses: 8BitJonny/gh-get-current-pr@4.0.0
8698
# id: PR
8799
# with:
88100
# filterOutClosed: true
89101
# sha: ${{ github.event.pull_request.head.sha }}
90102
- uses: ./.github/actions/setup
91103
- uses: ./.github/actions/build-cache
92-
- name: Prepare repository
93-
run: git fetch --unshallow --tags
94104
- name: Create Release
95-
run: yarn auto shipit -vv
105+
run: pnpm auto shipit
96106
if: ${{ env.GITHUB_TOKEN != '' }}

‎.gitignore‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,8 @@
22
tmp
33
dist
44
node_modules
5-
packages/*/dist
6-
packages/*/.rpt2_cache
75
test-report.xml
86
test-results
9-
tsconfig.tsbuildinfo
10-
11-
.eslintcache
12-
.pnp.*
13-
.storybook-out
14-
.yarn/*
15-
!.yarn/patches
16-
!.yarn/releases
7+
*.tsbuildinfo
178

189
**/__generated__/*.json
19-
20-
# releaseFinalize
21-
packages/*/LICENSE
22-
packages/*/.npmignore

‎.npmignore‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
tsconfig.json
33
tsconfig.tsbuildinfo
44
/.*
5-
yarn.lock
5+
pnpm-lock.yaml
6+
biome.jsonc
67
/node_modules
7-
tsup.config.ts
8+
tsdown.config.ts
89
tsconfig.json
910

1011
./dist/__tests__
1112

12-
src
13+
# ship src (not tests) so the published .d.ts.map resolves to source
14+
src/__tests__
1315
CHANGELOG.md
1416
*.tgz

‎.prettierignore‎

Lines changed: 0 additions & 6 deletions
This file was deleted.

‎.vscode/extensions.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["arcanis.vscode-zipfs", "dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
2+
"recommendations": ["DavidAnson.vscode-markdownlint", "yoavbls.pretty-ts-errors", "biomejs.biome"]
33
}

‎.vscode/settings.json‎

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,41 @@
11
{
2-
"search.exclude": {
3-
"**/.yarn": true,
4-
"**/.pnp.*": true
2+
"[javascript][javascriptreact][typescript][typescriptreact][json][jsonc]": {
3+
"editor.codeActionsOnSave": {
4+
"source.organizeImports.biome": "explicit"
5+
},
6+
"editor.defaultFormatter": "biomejs.biome",
7+
"editor.formatOnSave": true
58
},
6-
"typescript.tsdk": "node_modules/typescript/lib",
7-
"typescript.enablePromptUseWorkspaceTsdk": true,
8-
"testing.automaticallyOpenPeekView": "never"
9+
"[markdown]": {
10+
"editor.codeActionsOnSave": {
11+
"source.fixAll.markdownlint": "explicit"
12+
},
13+
"editor.defaultFormatter": "DavidAnson.vscode-markdownlint",
14+
"editor.formatOnSave": true,
15+
"files.trimTrailingWhitespace": false
16+
},
17+
"[typescriptreact]": {
18+
"editor.defaultFormatter": "biomejs.biome"
19+
},
20+
"biome.lsp.bin": "./node_modules/@biomejs/biome/bin/biome",
21+
"editor.codeActionsOnSave": {
22+
"source.action.useSortedKeys.biome": "explicit",
23+
"source.fixAll.biome": "explicit",
24+
"source.organizeImports.biome": "explicit"
25+
},
26+
"editor.formatOnPaste": true,
27+
"editor.formatOnSave": true,
28+
"editor.insertSpaces": true,
29+
"editor.tabSize": 2,
30+
"files.encoding": "utf8",
31+
"files.eol": "\n",
32+
"files.insertFinalNewline": true,
33+
"files.trimTrailingWhitespace": true,
34+
"js/ts.preferences.autoImportSpecifierExcludeRegexes": ["^@mui/[^/]+$"],
35+
"js/ts.tsdk.path": "node_modules/typescript/lib",
36+
"js/ts.tsdk.promptToUseWorkspaceVersion": true,
37+
"js/ts.validate.enabled": true,
38+
"search.followSymlinks": false,
39+
"vitest.rootConfig": "./vitest.config.ts",
40+
"vitest.workspaceConfig": "./vitest.config.ts"
941
}

‎.vscode/tasks.json‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
// See https://go.microsoft.com/fwlink/?LinkId=733558
3-
// for the documentation about the tasks.json format
4-
"version": "2.0.0",
52
"tasks": [
63
{
7-
"type": "npm",
8-
"script": "typecheck",
9-
"problemMatcher": ["$tsc"],
104
"group": {
11-
"kind": "build",
12-
"isDefault": true
13-
}
5+
"isDefault": true,
6+
"kind": "build"
7+
},
8+
"problemMatcher": ["$tsc"],
9+
"script": "check-types",
10+
"type": "npm"
1411
}
15-
]
12+
],
13+
// See https://go.microsoft.com/fwlink/?LinkId=733558
14+
// for the documentation about the tasks.json format
15+
"version": "2.0.0"
1616
}

0 commit comments

Comments
 (0)