Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
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.
102 changes: 31 additions & 71 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,56 +11,38 @@ permissions:

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:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 100
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

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

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

- name: Cache NX
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # 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@a2b5741b4f7e6a989c84ec1a3059696b23c152e5 # v2
Expand All @@ -70,44 +52,28 @@ jobs:

- name: Soft release
id: soft-release
run: pnpx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact
run: vp dlx pkg-pr-new publish './packages/*' # TODO disabled only for AI branch--compact

playwright-build:
name: "Playwright Build"
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 100
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

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

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

- name: Cache NX
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
Expand All @@ -132,31 +98,29 @@ jobs:
shardIndex: [1, 2]
shardTotal: [2]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
fetch-depth: 100
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # 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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # 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 vp exec concurrently --success=first -r --kill-others \
"vp run --filter @blocknote/example-editor preview" \
"wait-on http://localhost:3000 && cd tests && vp exec playwright test --project ${{ matrix.browser }} --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}"

- name: Upload blob report
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
Expand All @@ -180,21 +144,17 @@ jobs:
needs: playwright
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # 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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
Expand All @@ -204,7 +164,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
37 changes: 14 additions & 23 deletions .github/workflows/fresh-install-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ permissions:

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

jobs:
fresh-install-unit-tests:
Expand All @@ -30,23 +29,20 @@ jobs:

steps:
- id: checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false

- id: install_pnpm
name: Install pnpm
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8

- id: setup_node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
- id: setup_vp
uses: voidzero-dev/setup-vp@2dec1e33f4ab2c6d5bce1b0c4607961bb1a3f7a1 # 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 @@ -55,6 +51,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 @@ -84,15 +82,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 @@ -105,8 +99,7 @@ jobs:
RUN_ATTEMPT: ${{ github.run_attempt }}
BRANCH: ${{ github.ref_name }}
STEPS_CHECKOUT_OUTCOME: ${{ steps.checkout.outcome }}
STEPS_INSTALL_PNPM_OUTCOME: ${{ steps.install_pnpm.outcome }}
STEPS_SETUP_NODE_OUTCOME: ${{ steps.setup_node.outcome }}
STEPS_SETUP_VP_OUTCOME: ${{ steps.setup_vp.outcome }}
STEPS_INSTALL_DEPENDENCIES_OUTCOME: ${{ steps.install_dependencies.outcome }}
STEPS_UPDATE_PROD_DEPS_OUTCOME: ${{ steps.update_prod_deps.outcome }}
STEPS_DEDUPE_DEPS_OUTCOME: ${{ steps.dedupe_deps.outcome }}
Expand All @@ -121,10 +114,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
Loading
Loading