Skip to content

Commit 5708cbe

Browse files
committed
Removed NX dep & updated GH actions
1 parent e9f6de2 commit 5708cbe

7 files changed

Lines changed: 3088 additions & 4965 deletions

File tree

.github/workflows/build.yml

Lines changed: 19 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ on:
88

99
env:
1010
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
11-
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN }}
12-
NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_SERVER }}
13-
pnpm_config_store_dir: ./node_modules/.pnpm-store
1411

1512
jobs:
1613
build:
@@ -22,41 +19,25 @@ jobs:
2219
with:
2320
fetch-depth: 100
2421

25-
- name: Install pnpm
26-
uses: pnpm/action-setup@v5
27-
28-
- uses: nrwl/nx-set-shas@v5
29-
30-
- uses: actions/setup-node@v6
22+
- uses: voidzero-dev/setup-vp@v1
3123
with:
32-
cache: "pnpm"
33-
cache-dependency-path: "**/pnpm-lock.yaml"
3424
node-version-file: ".node-version"
35-
36-
- name: Cache NX
37-
uses: actions/cache@v5
38-
with:
39-
path: .nx/cache
40-
key: nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
41-
restore-keys: |
42-
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
43-
nx-${{ env.NX_BRANCH }}-
44-
nx-
25+
cache: true
4526

4627
- name: Install Dependencies
47-
run: pnpm install
28+
run: vp install
4829

4930
- name: Lint packages
50-
run: pnpm run lint
31+
run: vp lint
5132

5233
- name: Build packages
53-
run: pnpm run build
34+
run: vp run -r build
5435

5536
- name: Run unit tests
56-
run: pnpm run test
37+
run: vp run -r test
5738

5839
- name: Run Next.js integration test (production build)
59-
run: NEXTJS_TEST_MODE=build pnpm exec vp test run src/unit/nextjs/serverUtil.test.ts
40+
run: NEXTJS_TEST_MODE=build vp test run src/unit/nextjs/serverUtil.test.ts
6041
working-directory: tests
6142

6243
- name: Upload webpack stats artifact (editor)
@@ -78,32 +59,16 @@ jobs:
7859
with:
7960
fetch-depth: 100
8061

81-
- name: Install pnpm
82-
uses: pnpm/action-setup@v5
83-
84-
- uses: nrwl/nx-set-shas@v5
85-
86-
- uses: actions/setup-node@v6
62+
- uses: voidzero-dev/setup-vp@v1
8763
with:
88-
cache: "pnpm"
89-
cache-dependency-path: "**/pnpm-lock.yaml"
9064
node-version-file: ".node-version"
91-
92-
- name: Cache NX
93-
uses: actions/cache@v5
94-
with:
95-
path: .nx/cache
96-
key: nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
97-
restore-keys: |
98-
nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
99-
nx-playwright-${{ env.NX_BRANCH }}-
100-
nx-
65+
cache: true
10166

10267
- name: Install dependencies
103-
run: pnpm install
68+
run: vp install
10469

10570
- name: Build packages
106-
run: pnpm run build
71+
run: vp run -r build
10772

10873
- name: Upload build artifacts
10974
uses: actions/upload-artifact@v7
@@ -132,26 +97,22 @@ jobs:
13297
with:
13398
fetch-depth: 100
13499

135-
- name: Install pnpm
136-
uses: pnpm/action-setup@v5
137-
138-
- uses: actions/setup-node@v6
100+
- uses: voidzero-dev/setup-vp@v1
139101
with:
140-
cache: "pnpm"
141-
cache-dependency-path: "**/pnpm-lock.yaml"
142102
node-version-file: ".node-version"
103+
cache: true
143104

144105
- name: Download build artifacts
145106
uses: actions/download-artifact@v8
146107
with:
147108
name: playwright-build
148109

149110
- name: Install dependencies
150-
run: pnpm install
111+
run: vp install
151112

152113
- name: Run server and Playwright tests
153114
run: |
154-
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" pnpm run e2e
115+
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" vp run e2e
155116
156117
- name: Upload blob report
157118
uses: actions/upload-artifact@v7
@@ -177,17 +138,13 @@ jobs:
177138
steps:
178139
- uses: actions/checkout@v6
179140

180-
- name: Install pnpm
181-
uses: pnpm/action-setup@v5
182-
183-
- uses: actions/setup-node@v6
141+
- uses: voidzero-dev/setup-vp@v1
184142
with:
185-
cache: "pnpm"
186-
cache-dependency-path: "**/pnpm-lock.yaml"
187143
node-version-file: ".node-version"
144+
cache: true
188145

189146
- name: Install dependencies
190-
run: pnpm install
147+
run: vp install
191148

192149
- name: Download blob reports
193150
uses: actions/download-artifact@v8
@@ -197,7 +154,7 @@ jobs:
197154
merge-multiple: true
198155

199156
- name: Merge reports
200-
run: npx playwright merge-reports --reporter html ./all-blob-reports
157+
run: vp exec playwright merge-reports --reporter html ./all-blob-reports
201158
working-directory: tests
202159

203160
- name: Upload merged HTML report

.github/workflows/fresh-install-tests.yml

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ on:
1717

1818
env:
1919
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
20-
pnpm_config_store_dir: ./node_modules/.pnpm-store
2120

2221
jobs:
2322
fresh-install-unit-tests:
@@ -29,19 +28,16 @@ jobs:
2928
- id: checkout
3029
uses: actions/checkout@v6
3130

32-
- id: install_pnpm
33-
name: Install pnpm
34-
uses: pnpm/action-setup@v5
35-
36-
- id: setup_node
37-
uses: actions/setup-node@v6
31+
- id: setup_vp
32+
uses: voidzero-dev/setup-vp@v1
3833
with:
3934
node-version-file: ".node-version"
40-
# Intentionally no pnpm cache — we want fresh prod dep resolution
35+
# Intentionally no install cache — we want fresh prod dep resolution.
36+
cache: false
4137

4238
- id: install_dependencies
4339
name: Install dependencies
44-
run: pnpm install
40+
run: vp install
4541

4642
- id: update_prod_deps
4743
name: Update prod deps of published packages
@@ -50,6 +46,8 @@ jobs:
5046
# ranges. This simulates what a user gets when running
5147
# `npm install @blocknote/react` in a fresh project.
5248
# DevDependencies are left at their lockfile versions.
49+
# NB: this uses pnpm directly because vp doesn't expose a `--prod`-only
50+
# update flow; setup-vp installs pnpm on PATH so this still works.
5351
run: |
5452
FILTERS=$(node -e "
5553
const fs = require('fs');
@@ -79,15 +77,11 @@ jobs:
7977

8078
- id: build_packages
8179
name: Build packages
82-
run: pnpm run build
83-
env:
84-
NX_SKIP_NX_CACHE: "true"
80+
run: vp run -r build
8581

8682
- id: run_unit_tests
8783
name: Run unit tests
88-
run: pnpm run test
89-
env:
90-
NX_SKIP_NX_CACHE: "true"
84+
run: vp run -r test
9185

9286
- name: Notify Slack on workflow failure
9387
if: ${{ failure() }}
@@ -108,10 +102,8 @@ jobs:
108102
failed_step="Unknown step"
109103
if [ "${{ steps.checkout.outcome }}" = "failure" ]; then
110104
failed_step="Checkout repository"
111-
elif [ "${{ steps.install_pnpm.outcome }}" = "failure" ]; then
112-
failed_step="Install pnpm"
113-
elif [ "${{ steps.setup_node.outcome }}" = "failure" ]; then
114-
failed_step="Setup Node.js"
105+
elif [ "${{ steps.setup_vp.outcome }}" = "failure" ]; then
106+
failed_step="Setup Vite+"
115107
elif [ "${{ steps.install_dependencies.outcome }}" = "failure" ]; then
116108
failed_step="Install dependencies"
117109
elif [ "${{ steps.update_prod_deps.outcome }}" = "failure" ]; then

.github/workflows/publish.yaml

Lines changed: 10 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -13,62 +13,19 @@ on:
1313
required: true
1414
type: string
1515

16-
env:
17-
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
18-
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN }}
19-
NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_SERVER }}
20-
pnpm_config_store_dir: ./node_modules/.pnpm-store
21-
2216
jobs:
2317
publish:
2418
name: Publish
2519
runs-on: ubuntu-latest
26-
permissions:
27-
contents: write
28-
id-token: write # needed for provenance data generation
29-
attestations: write
30-
timeout-minutes: 10
20+
timeout-minutes: 5
3121
steps:
32-
- uses: actions/checkout@v6
33-
with:
34-
ref: ${{ inputs.version }}
35-
fetch-depth: 100
36-
- name: Display version being published
22+
- name: Publish disabled
23+
# NX has been removed (it was driving `nx release publish`) and the
24+
# replacement release tool is not yet in place. This workflow is
25+
# intentionally a no-op so a stray tag push doesn't silently succeed
26+
# without actually publishing anything. Once a release tool is wired
27+
# up, restore the publish steps and remove this guard.
3728
run: |
38-
echo "Publishing version: ${{ inputs.version }}"
39-
40-
- run: jq '.packageManager' package.json | tr -d '"pnpm@'
41-
id: package-manager-version
42-
43-
- name: Install pnpm
44-
uses: pnpm/action-setup@v5
45-
with:
46-
version: ${{ steps.package-manager-version.outputs.stdout }}
47-
48-
- uses: nrwl/nx-set-shas@v5
49-
50-
- uses: actions/setup-node@v6
51-
with:
52-
cache: "pnpm"
53-
cache-dependency-path: "**/pnpm-lock.yaml"
54-
node-version-file: ".node-version"
55-
56-
- name: Cache NX
57-
uses: actions/cache@v5
58-
with:
59-
path: .nx/cache
60-
key: nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
61-
restore-keys: |
62-
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
63-
nx-${{ env.NX_BRANCH }}-
64-
nx-
65-
66-
- name: Install Dependencies & Build
67-
run: pnpm install && pnpm build
68-
69-
- name: Print Environment Info
70-
run: pnpm exec nx report
71-
72-
- name: Publish packages
73-
# Ensure npm 11.5.1 or later for trusted publishing
74-
run: npm install -g npm@latest && pnpm exec nx release publish --access public
29+
echo "::error::Publish workflow is disabled — release tooling is being replaced."
30+
echo "::error::Re-enable this workflow once a release tool is wired up."
31+
exit 1

nx.json

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

package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
"name": "root",
33
"type": "module",
44
"devDependencies": {
5-
"@nx/js": "22.6.5",
65
"concurrently": "9.1.2",
76
"glob": "^10.5.0",
8-
"nx": "22.6.5",
97
"serve": "14.2.6",
108
"typescript": "^5.9.3",
119
"wait-on": "9.0.5",
@@ -20,7 +18,7 @@
2018
"build:clean": "vp run clean && vp run gen && vp run clean && vp run build",
2119
"build:site": "vp run -r build:site",
2220
"clean": "vp run -r clean && vp cache clean",
23-
"deploy": "nx release --skip-publish",
21+
"deploy": "echo not working:(",
2422
"gen": "vp run --filter @blocknote/dev-scripts gen",
2523
"install-playwright": "cd tests && vp exec playwright install --with-deps",
2624
"e2e": "concurrently --success=first -r --kill-others \"vp run start\" \"wait-on http://localhost:3000 && cd tests && vp exec playwright test $PLAYWRIGHT_CONFIG\"",

0 commit comments

Comments
 (0)