Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
42 changes: 0 additions & 42 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ blank_issues_enabled: false
contact_links:
- name: Share an idea or suggest an enhancement
url: https://github.com/TypeCellOS/BlockNote/discussions/categories/ideas-enhancements
about: Share feature ideas, enhancement suggestions, or other ideas for the BlockNote project.
about: Share feature ideas, enhancement suggestions, or other ideas for the BlockNote project.
90 changes: 24 additions & 66 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN }}
NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_SERVER }}
pnpm_config_store_dir: ./node_modules/.pnpm-store

jobs:
build:
Expand All @@ -22,41 +19,26 @@ jobs:
with:
fetch-depth: 100

- name: Install pnpm
uses: pnpm/action-setup@v5

- uses: nrwl/nx-set-shas@v5

- uses: actions/setup-node@v6
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"

- name: Cache NX
uses: actions/cache@v5
- uses: voidzero-dev/setup-vp@v1
with:
path: .nx/cache
key: nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
restore-keys: |
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
nx-${{ env.NX_BRANCH }}-
nx-
node-version-file: ".node-version"
cache: true

- name: Install Dependencies
run: pnpm install
run: vp install

- name: Lint packages
run: pnpm run lint
run: vp lint

- name: Build packages
run: pnpm run build
run: vp run -r build

- name: Run unit tests
run: pnpm run test
run: vp run -r test

- name: Run Next.js integration test (production build)
run: NEXTJS_TEST_MODE=build npx vitest run tests/src/unit/nextjs/serverUtil.test.ts
run: NEXTJS_TEST_MODE=build vp test run src/unit/nextjs/serverUtil.test.ts
working-directory: tests

- name: Upload webpack stats artifact (editor)
uses: relative-ci/agent-upload-artifact-action@v2
Expand All @@ -77,32 +59,16 @@ jobs:
with:
fetch-depth: 100

- name: Install pnpm
uses: pnpm/action-setup@v5

- uses: nrwl/nx-set-shas@v5

- uses: actions/setup-node@v6
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"

- name: Cache NX
uses: actions/cache@v5
- uses: voidzero-dev/setup-vp@v1
with:
path: .nx/cache
key: nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
restore-keys: |
nx-playwright-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
nx-playwright-${{ env.NX_BRANCH }}-
nx-
node-version-file: ".node-version"
cache: true

- name: Install dependencies
run: pnpm install
run: vp install

- name: Build packages
run: pnpm run build
run: vp run -r build

- name: Upload build artifacts
uses: actions/upload-artifact@v7
Expand Down Expand Up @@ -131,26 +97,22 @@ jobs:
with:
fetch-depth: 100

- name: Install pnpm
uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
- uses: voidzero-dev/setup-vp@v1
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"
node-version-file: ".node-version"
cache: true

- name: Download build artifacts
uses: actions/download-artifact@v8
with:
name: playwright-build

- name: Install dependencies
run: pnpm install
run: vp install

- name: Run server and Playwright tests
run: |
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" pnpm run e2e
HOME=/root PLAYWRIGHT_CONFIG="--project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}" vp run e2e

- name: Upload blob report
uses: actions/upload-artifact@v7
Expand All @@ -176,17 +138,13 @@ jobs:
steps:
- uses: actions/checkout@v6

- name: Install pnpm
uses: pnpm/action-setup@v5

- uses: actions/setup-node@v6
- uses: voidzero-dev/setup-vp@v1
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"
node-version-file: ".node-version"
cache: true

- name: Install dependencies
run: pnpm install
run: vp install

- name: Download blob reports
uses: actions/download-artifact@v8
Expand All @@ -196,7 +154,7 @@ jobs:
merge-multiple: true

- name: Merge reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
run: vp exec playwright merge-reports --reporter html ./all-blob-reports
working-directory: tests

- name: Upload merged HTML report
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/fresh-install-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ on:

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
pnpm_config_store_dir: ./node_modules/.pnpm-store

jobs:
fresh-install-unit-tests:
Expand All @@ -29,19 +28,16 @@ jobs:
- id: checkout
uses: actions/checkout@v6

- id: install_pnpm
name: Install pnpm
uses: pnpm/action-setup@v5

- id: setup_node
uses: actions/setup-node@v6
- id: setup_vp
uses: voidzero-dev/setup-vp@v1
with:
node-version-file: ".nvmrc"
# Intentionally no pnpm cache — we want fresh prod dep resolution
node-version-file: ".node-version"
# Intentionally no install cache — we want fresh prod dep resolution.
cache: false

- id: install_dependencies
name: Install dependencies
run: pnpm install
run: vp install

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

- id: build_packages
name: Build packages
run: pnpm run build
env:
NX_SKIP_NX_CACHE: "true"
run: vp run -r build

- id: run_unit_tests
name: Run unit tests
run: pnpm run test
env:
NX_SKIP_NX_CACHE: "true"
run: vp run -r test

- name: Notify Slack on workflow failure
if: ${{ failure() }}
Expand All @@ -108,10 +102,8 @@ jobs:
failed_step="Unknown step"
if [ "${{ steps.checkout.outcome }}" = "failure" ]; then
failed_step="Checkout repository"
elif [ "${{ steps.install_pnpm.outcome }}" = "failure" ]; then
failed_step="Install pnpm"
elif [ "${{ steps.setup_node.outcome }}" = "failure" ]; then
failed_step="Setup Node.js"
elif [ "${{ steps.setup_vp.outcome }}" = "failure" ]; then
failed_step="Setup Vite+"
elif [ "${{ steps.install_dependencies.outcome }}" = "failure" ]; then
failed_step="Install dependencies"
elif [ "${{ steps.update_prod_deps.outcome }}" = "failure" ]; then
Expand Down
63 changes: 10 additions & 53 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,19 @@ on:
required: true
type: string

env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_ACCESS_TOKEN }}
NX_SELF_HOSTED_REMOTE_CACHE_SERVER: ${{ secrets.NX_SELF_HOSTED_REMOTE_CACHE_SERVER }}
pnpm_config_store_dir: ./node_modules/.pnpm-store

jobs:
publish:
name: Publish
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # needed for provenance data generation
attestations: write
timeout-minutes: 10
timeout-minutes: 5
steps:
- uses: actions/checkout@v6
with:
ref: ${{ inputs.version }}
fetch-depth: 100
- name: Display version being published
- name: Publish disabled
# NX has been removed (it was driving `nx release publish`) and the
# replacement release tool is not yet in place. This workflow is
# intentionally a no-op so a stray tag push doesn't silently succeed
# without actually publishing anything. Once a release tool is wired
# up, restore the publish steps and remove this guard.
run: |
echo "Publishing version: ${{ inputs.version }}"

- run: jq '.packageManager' package.json | tr -d '"pnpm@'
id: package-manager-version

- name: Install pnpm
uses: pnpm/action-setup@v5
with:
version: ${{ steps.package-manager-version.outputs.stdout }}

- uses: nrwl/nx-set-shas@v5

- uses: actions/setup-node@v6
with:
cache: "pnpm"
cache-dependency-path: "**/pnpm-lock.yaml"
node-version-file: ".nvmrc"

- name: Cache NX
uses: actions/cache@v5
with:
path: .nx/cache
key: nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-${{ github.sha }}
restore-keys: |
nx-${{ env.NX_BRANCH }}-${{ env.NX_RUN_GROUP }}-
nx-${{ env.NX_BRANCH }}-
nx-

- name: Install Dependencies & Build
run: pnpm install && pnpm build

- name: Print Environment Info
run: pnpm exec nx report

- name: Publish packages
# Ensure npm 11.5.1 or later for trusted publishing
run: npm install -g npm@latest && pnpm exec nx release publish --access public
echo "::error::Publish workflow is disabled — release tooling is being replaced."
echo "::error::Re-enable this workflow once a release tool is wired up."
exit 1
1 change: 1 addition & 0 deletions .node-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.15.0
1 change: 0 additions & 1 deletion .nvmrc

This file was deleted.

12 changes: 0 additions & 12 deletions .prettierrc

This file was deleted.

1 change: 1 addition & 0 deletions .vite-hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vp staged
15 changes: 15 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--VITE PLUS START-->

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.

## Review Checklist

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.

<!--VITE PLUS END-->
Loading
Loading