From 767a82f71ad1390b67cdd344bcabb5b690eeb60a Mon Sep 17 00:00:00 2001 From: Matthew Lipski <50169049+matthewlipski@users.noreply.github.com> Date: Wed, 3 Jun 2026 13:25:59 +0200 Subject: [PATCH 1/2] feat: migrate to Vite+ (#2745) --- .eslintrc.json | 42 - .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/build.yml | 102 +- .github/workflows/fresh-install-tests.yml | 37 +- .github/workflows/publish.yaml | 66 +- .github/workflows/zizmor.yml | 2 +- .node-version | 1 + .nvmrc | 1 - .prettierrc | 12 - .vite-hooks/pre-commit | 1 + AGENTS.md | 16 + CONTRIBUTING.md | 10 +- docs/app/(home)/_components/BlockCatalog.tsx | 6 +- .../app/(home)/_components/DigitalCommons.tsx | 4 +- docs/app/(home)/_components/FAQ.tsx | 2 +- .../app/(home)/_components/FeatureSection.tsx | 2 +- docs/app/(home)/_components/FrameworkPill.tsx | 2 +- docs/app/(home)/_components/Hero.tsx | 8 +- docs/app/(home)/_components/Letter.tsx | 8 +- docs/app/(home)/_components/Marquee.tsx | 4 +- docs/app/(home)/_components/Pricing.tsx | 2 +- docs/app/(home)/_components/SpotlightCard.tsx | 4 +- docs/app/(home)/_components/TextLoop.tsx | 4 +- docs/app/(home)/_components/USP.tsx | 2 +- docs/app/[...slug]/page.tsx | 8 +- docs/app/demo/_components/DemoEditor.tsx | 10 +- docs/app/demo/_components/EditorMenu.tsx | 8 +- docs/app/docs/[[...slug]]/page.tsx | 8 +- docs/app/examples/[[...slug]]/page.tsx | 6 +- docs/app/og/docs/[...slug]/route.tsx | 4 +- docs/app/og/examples/[...slug]/route.tsx | 4 +- docs/app/og/pages/[...slug]/route.tsx | 4 +- docs/app/pricing/page.tsx | 2 +- docs/app/pricing/tiers.tsx | 19 +- docs/components/AuthNavButton.tsx | 4 +- docs/components/AuthenticationPage.tsx | 4 +- docs/components/CustomDocsLayout.tsx | 2 +- docs/components/ProBadge.tsx | 2 +- .../fumadocs/layout/home/client.tsx | 29 +- .../fumadocs/layout/language-toggle.tsx | 36 +- docs/components/fumadocs/layout/link-item.tsx | 42 +- .../fumadocs/layout/search-toggle.tsx | 35 +- docs/components/fumadocs/layout/shared.tsx | 35 +- .../fumadocs/layout/sidebar/base.tsx | 194 +- .../fumadocs/layout/sidebar/link-item.tsx | 32 +- .../fumadocs/layout/sidebar/page-tree.tsx | 60 +- .../fumadocs/layout/sidebar/tabs/dropdown.tsx | 58 +- .../fumadocs/layout/sidebar/tabs/index.tsx | 50 +- .../fumadocs/layout/theme-toggle.tsx | 52 +- docs/components/fumadocs/ui/button.tsx | 20 +- docs/components/fumadocs/ui/collapsible.tsx | 10 +- .../fumadocs/ui/navigation-menu.tsx | 31 +- docs/components/fumadocs/ui/popover.tsx | 23 +- docs/components/fumadocs/ui/scroll-area.tsx | 30 +- docs/components/search.tsx | 25 +- docs/content/docs/reference/editor/meta.json | 8 +- docs/eslint.config.mjs | 17 - docs/lib/fumadocs/cn.ts | 2 +- docs/lib/fumadocs/merge-refs.ts | 8 +- docs/lib/fumadocs/urls.ts | 10 +- docs/package.json | 10 +- examples/.eslintrc.js | 6 - examples/01-basic/01-minimal/main.tsx | 2 +- examples/01-basic/01-minimal/package.json | 12 +- examples/01-basic/01-minimal/tsconfig.json | 13 +- examples/01-basic/01-minimal/vite.config.ts | 11 +- examples/01-basic/02-block-objects/main.tsx | 2 +- .../01-basic/02-block-objects/package.json | 12 +- .../01-basic/02-block-objects/tsconfig.json | 13 +- .../01-basic/02-block-objects/vite.config.ts | 11 +- examples/01-basic/03-multi-column/main.tsx | 2 +- .../01-basic/03-multi-column/package.json | 12 +- examples/01-basic/03-multi-column/src/App.tsx | 5 +- .../01-basic/03-multi-column/tsconfig.json | 13 +- .../01-basic/03-multi-column/vite.config.ts | 11 +- examples/01-basic/04-default-blocks/main.tsx | 2 +- .../01-basic/04-default-blocks/package.json | 12 +- .../01-basic/04-default-blocks/tsconfig.json | 13 +- .../01-basic/04-default-blocks/vite.config.ts | 11 +- .../05-removing-default-blocks/main.tsx | 2 +- .../05-removing-default-blocks/package.json | 12 +- .../05-removing-default-blocks/tsconfig.json | 13 +- .../05-removing-default-blocks/vite.config.ts | 11 +- .../01-basic/06-block-manipulation/main.tsx | 2 +- .../06-block-manipulation/package.json | 12 +- .../06-block-manipulation/tsconfig.json | 13 +- .../06-block-manipulation/vite.config.ts | 11 +- .../01-basic/07-selection-blocks/main.tsx | 2 +- .../01-basic/07-selection-blocks/package.json | 12 +- .../07-selection-blocks/tsconfig.json | 13 +- .../07-selection-blocks/vite.config.ts | 11 +- examples/01-basic/08-ariakit/main.tsx | 2 +- examples/01-basic/08-ariakit/package.json | 12 +- examples/01-basic/08-ariakit/tsconfig.json | 13 +- examples/01-basic/08-ariakit/vite.config.ts | 11 +- examples/01-basic/09-shadcn/main.tsx | 2 +- examples/01-basic/09-shadcn/package.json | 12 +- examples/01-basic/09-shadcn/src/App.tsx | 10 +- examples/01-basic/09-shadcn/tsconfig.json | 13 +- examples/01-basic/09-shadcn/vite.config.ts | 11 +- examples/01-basic/10-localization/main.tsx | 2 +- .../01-basic/10-localization/package.json | 12 +- .../01-basic/10-localization/tsconfig.json | 13 +- .../01-basic/10-localization/vite.config.ts | 11 +- .../01-basic/11-custom-placeholder/main.tsx | 2 +- .../11-custom-placeholder/package.json | 12 +- .../11-custom-placeholder/tsconfig.json | 13 +- .../11-custom-placeholder/vite.config.ts | 11 +- examples/01-basic/12-multi-editor/main.tsx | 2 +- .../01-basic/12-multi-editor/package.json | 12 +- .../01-basic/12-multi-editor/tsconfig.json | 13 +- .../01-basic/12-multi-editor/vite.config.ts | 11 +- .../01-basic/13-custom-paste-handler/main.tsx | 2 +- .../13-custom-paste-handler/package.json | 12 +- .../13-custom-paste-handler/tsconfig.json | 13 +- .../13-custom-paste-handler/vite.config.ts | 11 +- .../01-basic/14-editor-scrollable/main.tsx | 2 +- .../14-editor-scrollable/package.json | 12 +- .../14-editor-scrollable/tsconfig.json | 13 +- .../14-editor-scrollable/vite.config.ts | 11 +- examples/01-basic/15-shadowdom/main.tsx | 2 +- examples/01-basic/15-shadowdom/package.json | 12 +- examples/01-basic/15-shadowdom/src/App.tsx | 5 +- .../01-basic/15-shadowdom/src/vite-env.d.ts | 2 +- examples/01-basic/15-shadowdom/tsconfig.json | 13 +- examples/01-basic/15-shadowdom/vite.config.ts | 11 +- .../01-basic/16-read-only-editor/main.tsx | 2 +- .../01-basic/16-read-only-editor/package.json | 12 +- .../16-read-only-editor/tsconfig.json | 13 +- .../16-read-only-editor/vite.config.ts | 11 +- .../01-basic/17-no-trailing-block/main.tsx | 2 +- .../17-no-trailing-block/package.json | 12 +- .../17-no-trailing-block/tsconfig.json | 13 +- .../17-no-trailing-block/vite.config.ts | 11 +- examples/01-basic/testing/main.tsx | 2 +- examples/01-basic/testing/package.json | 12 +- examples/01-basic/testing/tsconfig.json | 13 +- examples/01-basic/testing/vite.config.ts | 11 +- .../02-backend/01-file-uploading/main.tsx | 2 +- .../02-backend/01-file-uploading/package.json | 12 +- .../01-file-uploading/tsconfig.json | 13 +- .../01-file-uploading/vite.config.ts | 11 +- .../02-backend/02-saving-loading/main.tsx | 2 +- .../02-backend/02-saving-loading/package.json | 12 +- .../02-saving-loading/tsconfig.json | 13 +- .../02-saving-loading/vite.config.ts | 11 +- examples/02-backend/03-s3/main.tsx | 2 +- examples/02-backend/03-s3/package.json | 12 +- examples/02-backend/03-s3/tsconfig.json | 13 +- examples/02-backend/03-s3/vite.config.ts | 11 +- .../04-rendering-static-documents/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../01-ui-elements-remove/main.tsx | 2 +- .../01-ui-elements-remove/package.json | 12 +- .../01-ui-elements-remove/tsconfig.json | 13 +- .../01-ui-elements-remove/vite.config.ts | 11 +- .../02-formatting-toolbar-buttons/main.tsx | 2 +- .../package.json | 12 +- .../02-formatting-toolbar-buttons/src/App.tsx | 4 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 4 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../04-side-menu-buttons/main.tsx | 2 +- .../04-side-menu-buttons/package.json | 12 +- .../04-side-menu-buttons/tsconfig.json | 13 +- .../04-side-menu-buttons/vite.config.ts | 11 +- .../05-side-menu-drag-handle-items/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 5 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../11-uppy-file-panel/main.tsx | 2 +- .../11-uppy-file-panel/package.json | 12 +- .../11-uppy-file-panel/src/App.tsx | 4 +- .../11-uppy-file-panel/tsconfig.json | 13 +- .../11-uppy-file-panel/vite.config.ts | 11 +- .../12-static-formatting-toolbar/main.tsx | 2 +- .../12-static-formatting-toolbar/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../03-ui-components/13-custom-ui/main.tsx | 2 +- .../13-custom-ui/package.json | 12 +- .../13-custom-ui/tsconfig.json | 13 +- .../13-custom-ui/vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../15-advanced-tables/main.tsx | 2 +- .../15-advanced-tables/package.json | 12 +- .../15-advanced-tables/tsconfig.json | 13 +- .../15-advanced-tables/vite.config.ts | 11 +- .../16-link-toolbar-buttons/main.tsx | 2 +- .../16-link-toolbar-buttons/package.json | 12 +- .../16-link-toolbar-buttons/tsconfig.json | 13 +- .../16-link-toolbar-buttons/vite.config.ts | 11 +- .../17-advanced-tables-2/.bnexample.json | 9 +- .../17-advanced-tables-2/main.tsx | 2 +- .../17-advanced-tables-2/package.json | 12 +- .../17-advanced-tables-2/src/App.tsx | 24 +- .../17-advanced-tables-2/tsconfig.json | 13 +- .../17-advanced-tables-2/vite.config.ts | 11 +- .../03-ui-components/18-drag-n-drop/main.tsx | 2 +- .../18-drag-n-drop/package.json | 12 +- .../18-drag-n-drop/tsconfig.json | 13 +- .../18-drag-n-drop/vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../20-portal-elements/README.md | 5 +- .../20-portal-elements/main.tsx | 2 +- .../20-portal-elements/package.json | 12 +- .../20-portal-elements/src/App.tsx | 3 +- .../20-portal-elements/tsconfig.json | 13 +- .../20-portal-elements/vite.config.ts | 11 +- .../01-theming-dom-attributes/main.tsx | 2 +- .../01-theming-dom-attributes/package.json | 12 +- .../01-theming-dom-attributes/tsconfig.json | 13 +- .../01-theming-dom-attributes/vite.config.ts | 11 +- examples/04-theming/02-changing-font/main.tsx | 2 +- .../04-theming/02-changing-font/package.json | 12 +- .../04-theming/02-changing-font/tsconfig.json | 13 +- .../02-changing-font/vite.config.ts | 11 +- examples/04-theming/03-theming-css/main.tsx | 2 +- .../04-theming/03-theming-css/package.json | 12 +- .../04-theming/03-theming-css/tsconfig.json | 13 +- .../04-theming/03-theming-css/vite.config.ts | 11 +- .../04-theming-css-variables/main.tsx | 2 +- .../04-theming-css-variables/package.json | 12 +- .../04-theming-css-variables/tsconfig.json | 13 +- .../04-theming-css-variables/vite.config.ts | 11 +- .../05-theming-css-variables-code/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- examples/04-theming/06-code-block/main.tsx | 2 +- .../04-theming/06-code-block/package.json | 12 +- .../04-theming/06-code-block/tsconfig.json | 13 +- .../04-theming/06-code-block/vite.config.ts | 11 +- .../04-theming/07-custom-code-block/main.tsx | 2 +- .../07-custom-code-block/package.json | 12 +- .../07-custom-code-block/tsconfig.json | 13 +- .../07-custom-code-block/vite.config.ts | 11 +- .../01-converting-blocks-to-html/main.tsx | 2 +- .../01-converting-blocks-to-html/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../02-converting-blocks-from-html/main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../03-converting-blocks-to-md/main.tsx | 2 +- .../03-converting-blocks-to-md/package.json | 12 +- .../03-converting-blocks-to-md/tsconfig.json | 13 +- .../03-converting-blocks-to-md/vite.config.ts | 11 +- .../04-converting-blocks-from-md/main.tsx | 2 +- .../04-converting-blocks-from-md/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../05-converting-blocks-to-pdf/main.tsx | 2 +- .../05-converting-blocks-to-pdf/package.json | 12 +- .../05-converting-blocks-to-pdf/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../06-converting-blocks-to-docx/main.tsx | 2 +- .../06-converting-blocks-to-docx/package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../07-converting-blocks-to-odt/main.tsx | 2 +- .../07-converting-blocks-to-odt/package.json | 12 +- .../07-converting-blocks-to-odt/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../09-blocks-to-html-static-render/main.tsx | 2 +- .../package.json | 12 +- .../src/App.tsx | 2 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../10-static-html-render/main.tsx | 2 +- .../10-static-html-render/package.json | 12 +- .../10-static-html-render/tsconfig.json | 13 +- .../10-static-html-render/vite.config.ts | 11 +- .../06-custom-schema/01-alert-block/main.tsx | 2 +- .../01-alert-block/package.json | 12 +- .../01-alert-block/tsconfig.json | 13 +- .../01-alert-block/vite.config.ts | 11 +- .../02-suggestion-menus-mentions/main.tsx | 2 +- .../02-suggestion-menus-mentions/package.json | 12 +- .../02-suggestion-menus-mentions/src/App.tsx | 5 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../06-custom-schema/03-font-style/main.tsx | 2 +- .../03-font-style/package.json | 12 +- .../03-font-style/src/App.tsx | 4 +- .../03-font-style/tsconfig.json | 13 +- .../03-font-style/vite.config.ts | 11 +- .../04-pdf-file-block/main.tsx | 2 +- .../04-pdf-file-block/package.json | 12 +- .../04-pdf-file-block/tsconfig.json | 13 +- .../04-pdf-file-block/vite.config.ts | 11 +- .../05-alert-block-full-ux/main.tsx | 2 +- .../05-alert-block-full-ux/package.json | 12 +- .../05-alert-block-full-ux/src/App.tsx | 4 +- .../05-alert-block-full-ux/tsconfig.json | 13 +- .../05-alert-block-full-ux/vite.config.ts | 11 +- .../06-toggleable-blocks/main.tsx | 2 +- .../06-toggleable-blocks/package.json | 12 +- .../06-toggleable-blocks/tsconfig.json | 13 +- .../06-toggleable-blocks/vite.config.ts | 11 +- .../07-configuring-blocks/main.tsx | 2 +- .../07-configuring-blocks/package.json | 12 +- .../07-configuring-blocks/tsconfig.json | 13 +- .../07-configuring-blocks/vite.config.ts | 11 +- .../08-non-editable-block/main.tsx | 2 +- .../08-non-editable-block/package.json | 12 +- .../08-non-editable-block/tsconfig.json | 13 +- .../08-non-editable-block/vite.config.ts | 11 +- .../draggable-inline-content/main.tsx | 2 +- .../draggable-inline-content/package.json | 12 +- .../draggable-inline-content/tsconfig.json | 13 +- .../draggable-inline-content/vite.config.ts | 11 +- .../react-custom-blocks/main.tsx | 2 +- .../react-custom-blocks/package.json | 12 +- .../react-custom-blocks/tsconfig.json | 13 +- .../react-custom-blocks/vite.config.ts | 11 +- .../react-custom-inline-content/main.tsx | 2 +- .../react-custom-inline-content/package.json | 12 +- .../react-custom-inline-content/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../react-custom-styles/main.tsx | 2 +- .../react-custom-styles/package.json | 12 +- .../react-custom-styles/tsconfig.json | 13 +- .../react-custom-styles/vite.config.ts | 11 +- .../07-collaboration/01-partykit/main.tsx | 2 +- .../07-collaboration/01-partykit/package.json | 12 +- .../01-partykit/tsconfig.json | 13 +- .../01-partykit/vite.config.ts | 11 +- .../07-collaboration/02-liveblocks/main.tsx | 2 +- .../02-liveblocks/package.json | 12 +- .../02-liveblocks/tsconfig.json | 13 +- .../02-liveblocks/vite.config.ts | 11 +- examples/07-collaboration/03-y-sweet/main.tsx | 2 +- .../07-collaboration/03-y-sweet/package.json | 12 +- .../07-collaboration/03-y-sweet/tsconfig.json | 13 +- .../03-y-sweet/vite.config.ts | 11 +- .../07-collaboration/04-electric-sql/main.tsx | 2 +- .../04-electric-sql/package.json | 12 +- .../04-electric-sql/tsconfig.json | 13 +- .../04-electric-sql/vite.config.ts | 11 +- .../07-collaboration/05-comments/main.tsx | 2 +- .../07-collaboration/05-comments/package.json | 12 +- .../05-comments/tsconfig.json | 13 +- .../05-comments/vite.config.ts | 11 +- .../06-comments-with-sidebar/main.tsx | 2 +- .../06-comments-with-sidebar/package.json | 12 +- .../06-comments-with-sidebar/src/App.tsx | 2 +- .../06-comments-with-sidebar/tsconfig.json | 13 +- .../06-comments-with-sidebar/vite.config.ts | 11 +- .../07-collaboration/07-ghost-writer/main.tsx | 2 +- .../07-ghost-writer/package.json | 12 +- .../07-ghost-writer/src/App.tsx | 5 +- .../07-ghost-writer/tsconfig.json | 13 +- .../07-ghost-writer/vite.config.ts | 11 +- examples/07-collaboration/08-forking/main.tsx | 2 +- .../07-collaboration/08-forking/package.json | 12 +- .../07-collaboration/08-forking/tsconfig.json | 13 +- .../08-forking/vite.config.ts | 11 +- .../09-comments-testing/main.tsx | 2 +- .../09-comments-testing/package.json | 12 +- .../09-comments-testing/tsconfig.json | 13 +- .../09-comments-testing/vite.config.ts | 11 +- .../01-tiptap-arrow-conversion/main.tsx | 2 +- .../01-tiptap-arrow-conversion/package.json | 12 +- .../01-tiptap-arrow-conversion/tsconfig.json | 13 +- .../01-tiptap-arrow-conversion/vite.config.ts | 11 +- examples/09-ai/01-minimal/main.tsx | 2 +- examples/09-ai/01-minimal/package.json | 12 +- examples/09-ai/01-minimal/src/App.tsx | 4 +- examples/09-ai/01-minimal/tsconfig.json | 13 +- examples/09-ai/01-minimal/vite.config.ts | 11 +- examples/09-ai/02-playground/main.tsx | 2 +- examples/09-ai/02-playground/package.json | 12 +- examples/09-ai/02-playground/src/App.tsx | 6 +- examples/09-ai/02-playground/tsconfig.json | 13 +- examples/09-ai/02-playground/vite.config.ts | 11 +- .../09-ai/03-custom-ai-menu-items/main.tsx | 2 +- .../03-custom-ai-menu-items/package.json | 12 +- .../09-ai/03-custom-ai-menu-items/src/App.tsx | 8 +- .../03-custom-ai-menu-items/tsconfig.json | 13 +- .../03-custom-ai-menu-items/vite.config.ts | 11 +- examples/09-ai/04-with-collaboration/main.tsx | 2 +- .../09-ai/04-with-collaboration/package.json | 12 +- .../09-ai/04-with-collaboration/src/App.tsx | 8 +- .../09-ai/04-with-collaboration/tsconfig.json | 13 +- .../04-with-collaboration/vite.config.ts | 11 +- examples/09-ai/05-manual-execution/main.tsx | 2 +- .../09-ai/05-manual-execution/package.json | 12 +- .../09-ai/05-manual-execution/tsconfig.json | 13 +- .../09-ai/05-manual-execution/vite.config.ts | 11 +- .../09-ai/06-client-side-transport/main.tsx | 2 +- .../06-client-side-transport/package.json | 12 +- .../06-client-side-transport/src/App.tsx | 6 +- .../06-client-side-transport/tsconfig.json | 13 +- .../06-client-side-transport/vite.config.ts | 11 +- examples/09-ai/07-server-persistence/main.tsx | 2 +- .../09-ai/07-server-persistence/package.json | 12 +- .../09-ai/07-server-persistence/src/App.tsx | 6 +- .../09-ai/07-server-persistence/tsconfig.json | 13 +- .../07-server-persistence/vite.config.ts | 11 +- .../react-vanilla-custom-blocks/main.tsx | 2 +- .../react-vanilla-custom-blocks/package.json | 12 +- .../react-vanilla-custom-blocks/tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../main.tsx | 2 +- .../package.json | 12 +- .../tsconfig.json | 13 +- .../vite.config.ts | 11 +- .../react-vanilla-custom-styles/main.tsx | 2 +- .../react-vanilla-custom-styles/package.json | 12 +- .../react-vanilla-custom-styles/tsconfig.json | 13 +- .../vite.config.ts | 11 +- nx.json | 57 - package.json | 43 +- packages/ariakit/package.json | 22 +- packages/ariakit/src/panel/PanelFileInput.tsx | 4 +- packages/ariakit/tsconfig.json | 2 +- packages/ariakit/vite.config.ts | 146 +- packages/code-block/package.json | 23 +- packages/code-block/src/index.test.ts | 2 +- packages/code-block/vite.config.ts | 126 +- packages/code-block/vitestSetup.ts | 2 +- packages/core/package.json | 24 +- .../insertBlocks/insertBlocks.test.ts | 2 +- .../commands/mergeBlocks/mergeBlocks.test.ts | 2 +- .../commands/moveBlocks/moveBlocks.test.ts | 2 +- .../commands/nestBlock/nestBlock.test.ts | 4 +- .../commands/nestBlock/nestBlock.ts | 6 +- .../replaceBlocks/replaceBlocks.test.ts | 2 +- .../commands/splitBlock/splitBlock.test.ts | 2 +- .../commands/updateBlock/updateBlock.test.ts | 2 +- .../src/api/blockManipulation/setupTestEnv.ts | 2 +- .../blockManipulation/tables/tables.test.ts | 2 +- .../api/exporters/markdown/htmlToMarkdown.ts | 122 +- .../api/getBlocksChangedByTransaction.test.ts | 2 +- .../api/parsers/html/util/nestedLists.test.ts | 2 +- .../parsers/markdown/detectMarkdown.test.ts | 2 +- .../api/parsers/markdown/markdownToHtml.ts | 310 +- packages/core/src/api/positionMapping.test.ts | 2 +- packages/core/src/blocks/Code/block.test.ts | 21 +- .../ListItem/CheckListItem/block.test.ts | 2 +- .../NumberedListItem/IndexingPlugin.test.ts | 15 +- .../NumberedListItem/IndexingPlugin.ts | 97 +- .../src/blocks/Table/TableExtension.test.ts | 15 +- packages/core/src/blocks/Table/block.ts | 6 +- .../threadstore/yjs/YjsThreadStore.test.ts | 15 +- .../threadstore/yjs/YjsThreadStore.ts | 7 +- .../core/src/editor/BlockNoteEditor.test.ts | 2 +- .../src/editor/BlockNoteExtension.test.ts | 2 +- packages/core/src/editor/performance.test.ts | 2 +- .../core/src/editor/transformPasted.test.ts | 2 +- .../extensions/Collaboration/ForkYDoc.test.ts | 2 +- .../moveColorAttributes.test.ts | 2 +- .../src/extensions/Placeholder/Placeholder.ts | 3 +- .../PreviousBlockType.test.ts | 2 +- .../PreviousBlockType/PreviousBlockType.ts | 5 +- .../core/src/extensions/SideMenu/SideMenu.ts | 3 +- .../SuggestionMenu/SuggestionMenu.test.ts | 2 +- .../KeyboardShortcutsExtension.ts | 6 +- .../Link/helpers/autolink.ts | 18 +- .../Link/helpers/linkDetector.ts | 18 +- .../Link/helpers/whitespace.ts | 4 +- .../tiptap-extensions/Link/link.test.ts | 48 +- .../tiptap-extensions/UniqueID/UniqueID.ts | 4 +- packages/core/src/schema/blocks/types.ts | 4 +- packages/core/src/util/topo-sort.test.ts | 2 +- packages/core/src/vite-env.d.ts | 2 +- packages/core/src/yjs/utils.test.ts | 2 +- packages/core/vite.config.bundled.ts | 2 +- packages/core/vite.config.ts | 13 +- packages/core/vitestSetup.ts | 2 +- packages/dev-scripts/examples/gen.ts | 12 + packages/dev-scripts/examples/genDocs.ts | 14 +- .../template-react/index.html.template.tsx | 1 - .../template-react/package.json.template.tsx | 10 +- .../template-react/tailwind.css.template.tsx | 4 +- .../template-react/tsconfig.json.template.tsx | 5 +- .../vite.config.ts.template.tsx | 7 +- packages/dev-scripts/examples/util.ts | 6 +- packages/dev-scripts/package.json | 21 +- packages/dev-scripts/tsconfig.json | 10 +- packages/dev-scripts/vite.config.ts | 15 + packages/mantine/package.json | 22 +- packages/mantine/tsconfig.json | 2 +- packages/mantine/vite.config.ts | 166 +- packages/react/package.json | 23 +- packages/react/src/blocks/Video/block.tsx | 5 +- .../react/src/components/Comments/Comment.tsx | 5 +- .../components/Comments/FloatingComposer.tsx | 5 +- .../react/src/components/Comments/Thread.tsx | 5 +- .../DefaultButtons/FileCaptionButton.tsx | 7 +- .../DefaultButtons/FileRenameButton.tsx | 7 +- ...entalMobileFormattingToolbarController.tsx | 20 +- .../components/Popovers/GenericPopover.tsx | 3 +- .../SuggestionMenu/SuggestionMenu.test.tsx | 2 +- .../TableHandles/TableHandlesController.tsx | 4 +- .../react/src/editor/BlockNoteDefaultUI.tsx | 9 +- packages/react/src/icons.ts | 2 +- packages/react/src/schema/ReactBlockSpec.tsx | 8 +- packages/react/vite.config.ts | 164 +- packages/react/vitestSetup.ts | 2 +- packages/server-util/package.json | 25 +- .../src/context/ServerBlockNoteEditor.test.ts | 2 +- .../src/context/react/ReactServer.test.tsx | 2 +- packages/server-util/vite.config.ts | 130 +- packages/server-util/vitestSetup.ts | 2 +- packages/shadcn/package.json | 22 +- packages/shadcn/src/comments/Comment.tsx | 2 +- packages/shadcn/tsconfig.json | 2 +- packages/shadcn/vite.config.ts | 150 +- packages/xl-ai-server/package.json | 15 +- packages/xl-ai-server/tsconfig.json | 1 + packages/xl-ai-server/vite.config.ts | 126 +- packages/xl-ai/package.json | 28 +- .../xl-ai/scripts/rename-msw-snapshots.mjs | 20 +- .../columnContainerDocumentState.test.ts | 2 +- .../formats/html-blocks/htmlBlocks.test.ts | 2 +- .../html-blocks/tools/getPartialHTML.test.ts | 2 +- .../api/formats/json/errorHandling.test.ts | 9 +- .../xl-ai/src/api/formats/json/json.test.ts | 2 +- .../api/formats/json/tools/jsontools.test.ts | 2 +- .../markdown-blocks/markdownBlocks.test.ts | 2 +- .../src/api/formats/tests/sharedTestCases.ts | 5 +- .../src/api/formats/tests/snapshotPath.ts | 4 +- .../tests/validateTestEnvironment.test.ts | 2 +- .../src/api/schema/schemaToJSONSchema.test.ts | 2 +- packages/xl-ai/src/prosemirror/agent.test.ts | 2 +- .../xl-ai/src/prosemirror/changeset.test.ts | 2 +- .../src/prosemirror/fragmentUtil.test.ts | 2 +- .../xl-ai/src/prosemirror/rebaseTool.test.ts | 2 +- .../filterNewOrUpdatedOperations.test.ts | 2 +- .../streamTool/filterValidOperations.test.ts | 2 +- .../xl-ai/src/streamTool/preprocess.test.ts | 2 +- .../streamTool/toValidatedOperations.test.ts | 2 +- .../clientside/ClientSideTransport.ts | 6 +- .../vercelAiSdk/util/appendableStream.test.ts | 2 +- .../vercelAiSdk/util/chatHandlers.test.ts | 2 +- .../src/testUtil/suggestChangesTestUtil.ts | 2 +- packages/xl-ai/tsconfig.json | 4 + packages/xl-ai/vite.config.ts | 181 +- packages/xl-ai/vitestSetup.ts | 2 +- packages/xl-docx-exporter/package.json | 28 +- .../src/docx/docxExporter.test.ts | 6 +- packages/xl-docx-exporter/src/vite-env.d.ts | 2 +- packages/xl-docx-exporter/tsconfig.json | 5 +- packages/xl-docx-exporter/vite.config.ts | 155 +- packages/xl-docx-exporter/vitestSetup.ts | 2 +- packages/xl-email-exporter/package.json | 24 +- .../react-email/reactEmailExporter.test.tsx | 2 +- packages/xl-email-exporter/src/vite-env.d.ts | 2 +- packages/xl-email-exporter/tsconfig.json | 3 +- packages/xl-email-exporter/vite.config.ts | 150 +- packages/xl-email-exporter/viteSetup.ts | 10 - packages/xl-email-exporter/vitestSetup.ts | 2 +- packages/xl-multi-column/package.json | 26 +- .../src/test/commands/backspace.test.ts | 2 +- .../src/test/commands/insertBlocks.test.ts | 2 +- .../src/test/commands/moveBlocks.test.ts | 2 +- .../src/test/commands/removeBlocks.test.ts | 2 +- .../src/test/commands/replaceBlocks.test.ts | 2 +- .../src/test/commands/selection.test.ts | 2 +- .../test/commands/textCursorPosition.test.ts | 2 +- .../src/test/commands/updateBlock.test.ts | 2 +- .../test/commands/util/fixColumnLists.test.ts | 2 +- .../test/conversions/htmlConversion.test.ts | 2 +- .../test/conversions/nodeConversion.test.ts | 2 +- .../xl-multi-column/src/test/setupTestEnv.ts | 2 +- packages/xl-multi-column/src/vite-env.d.ts | 2 +- packages/xl-multi-column/vite.config.ts | 153 +- packages/xl-multi-column/vitestSetup.ts | 2 +- packages/xl-odt-exporter/package.json | 27 +- .../src/odt/odtExporter.test.ts | 2 +- packages/xl-odt-exporter/src/vite-env.d.ts | 2 +- packages/xl-odt-exporter/tsconfig.json | 6 +- packages/xl-odt-exporter/vite.config.ts | 144 +- packages/xl-odt-exporter/vitestSetup.ts | 2 +- packages/xl-pdf-exporter/package.json | 26 +- .../src/pdf/pdfExporter.test.tsx | 2 +- packages/xl-pdf-exporter/src/vite-env.d.ts | 2 +- packages/xl-pdf-exporter/tsconfig.json | 5 +- packages/xl-pdf-exporter/vite.config.ts | 171 +- packages/xl-pdf-exporter/vitestSetup.ts | 2 +- playground/package.json | 18 +- playground/serve.json | 3 - playground/src/examples.gen.tsx | 3538 +++-- playground/src/vite-env.d.ts | 2 +- playground/tsconfig.json | 1 - playground/vite.config.ts | 129 +- pnpm-lock.yaml | 11096 ++++++---------- pnpm-workspace.yaml | 14 +- shared/package.json | 9 +- shared/tsconfig.json | 3 +- shared/vite-env.d.ts | 2 +- shared/vite.config.ts | 15 + .../app/api/server-util/route.tsx | 7 +- tests/nextjs-test-app/app/layout.tsx | 6 +- tests/nextjs-test-app/tsconfig.json | 10 +- tests/package.json | 17 +- tests/playwright/index.html | 2 +- tests/src/end-to-end/ai/ai-selection.test.ts | 108 +- .../src/end-to-end/comments/comments.test.ts | 2 +- .../unit/core/clipboard/copy/runTests.test.ts | 2 +- .../core/clipboard/copyPaste/runTests.test.ts | 2 +- .../copyPasteEquality/runTests.test.ts | 2 +- .../core/clipboard/paste/runTests.test.ts | 2 +- tests/src/unit/core/createTestEditor.ts | 2 +- .../formatConversion/export/runTests.test.ts | 2 +- .../exportParseEqualityTestInstances.ts | 3 +- .../exportParseEquality/runTests.test.ts | 2 +- .../formatConversion/parse/runTests.test.ts | 2 +- tests/src/unit/core/schema/runTests.test.ts | 2 +- .../selection/getSelection/runTests.test.ts | 2 +- .../incrementSelection/runTests.test.ts | 2 +- .../textCursorPosition/runTests.test.ts | 2 +- .../src/unit/core/typeGuards/runTests.test.ts | 2 +- tests/src/unit/nextjs/serverUtil.test.ts | 16 +- .../react/BlockNoteViewRapidRemount.test.tsx | 2 +- .../unit/react/BlockNoteViewRemount.test.tsx | 2 +- .../react/BlockNoteViewRemountHover.test.tsx | 2 +- .../formatConversion/export/runTests.test.ts | 2 +- .../exportParseEquality/runTests.test.ts | 2 +- tests/src/unit/react/setupTestEditor.tsx | 2 +- .../clipboard/copy/copyTestExecutors.ts | 2 +- .../copyPaste/copyPasteTestExecutors.ts | 2 +- .../copyPasteEqualityTestExecutors.ts | 2 +- .../clipboard/paste/pasteTestExecutors.ts | 2 +- .../export/exportTestExecutors.ts | 7 +- .../exportParseEqualityTestExecutors.ts | 6 +- .../parse/parseTestExecutors.ts | 2 +- .../getSelection/getSelectionTestExecutors.ts | 2 +- .../incrementSelectionTestExecutors.ts | 2 +- .../textCursorPositionTestExecutors.ts | 2 +- tests/vite.config.ts | 65 +- tests/vitestSetup.ts | 2 +- vite.config.ts | 142 + vitest.workspace.ts | 16 - 674 files changed, 10343 insertions(+), 13374 deletions(-) delete mode 100644 .eslintrc.json create mode 100644 .node-version delete mode 100644 .nvmrc delete mode 100644 .prettierrc create mode 100755 .vite-hooks/pre-commit create mode 100644 AGENTS.md delete mode 100644 docs/eslint.config.mjs delete mode 100644 examples/.eslintrc.js delete mode 100644 nx.json create mode 100644 packages/dev-scripts/vite.config.ts delete mode 100644 packages/xl-email-exporter/viteSetup.ts delete mode 100644 playground/serve.json create mode 100644 shared/vite.config.ts create mode 100644 vite.config.ts delete mode 100644 vitest.workspace.ts diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index e9511bbf61..0000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "root": true, - "extends": [ - "eslint:recommended", - "plugin:@typescript-eslint/recommended", - "react-app", - "react-app/jest" - ], - "parser": "@typescript-eslint/parser", - "plugins": ["import", "@typescript-eslint"], - "settings": { - "import/extensions": [".ts", ".cts", ".mts", ".tsx", ".js", ".jsx"], - "import/external-module-folders": ["node_modules", "node_modules/@types"], - "import/parsers": { - "@typescript-eslint/parser": [".ts", ".cts", ".mts", ".tsx"] - }, - "import/resolver": { - "node": { - "extensions": [".ts", ".cts", ".mts", ".tsx", ".js", ".jsx"] - } - } - }, - "ignorePatterns": ["**/ui/*"], - "rules": { - "no-console": "error", - "curly": 1, - "import/extensions": ["error", "always", { "ignorePackages": true }], - "import/no-extraneous-dependencies": [ - "error", - { - "devDependencies": true, - "peerDependencies": true, - "optionalDependencies": false, - "bundledDependencies": false - } - ], - "@typescript-eslint/no-non-null-assertion": "off", - "@typescript-eslint/no-explicit-any": "off", - "@typescript-eslint/ban-ts-comment": "off", - "import/no-cycle": "error" - } -} diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index f258f05126..d431145bc6 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -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. \ No newline at end of file + about: Share feature ideas, enhancement suggestions, or other ideas for the BlockNote project. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fef3e24484..f743c98afc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,9 +11,6 @@ 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: @@ -21,46 +18,31 @@ jobs: 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 @@ -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 @@ -132,19 +98,15 @@ 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 @@ -152,11 +114,13 @@ jobs: 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 @@ -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 @@ -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 diff --git a/.github/workflows/fresh-install-tests.yml b/.github/workflows/fresh-install-tests.yml index d5698a1fbc..a1b441678d 100644 --- a/.github/workflows/fresh-install-tests.yml +++ b/.github/workflows/fresh-install-tests.yml @@ -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: @@ -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 @@ -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'); @@ -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() }} @@ -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 }} @@ -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 diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 12bda34238..b39deb9957 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -13,65 +13,21 @@ 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 +permissions: {} 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - ref: ${{ inputs.version }} - fetch-depth: 100 - persist-credentials: false - - 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}" - env: - INPUTS_VERSION: ${{ inputs.version }} - - - run: jq '.packageManager' package.json | tr -d '"pnpm@' - id: package-manager-version - - - name: Install pnpm - uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 - with: - version: ${{ steps.package-manager-version.outputs.stdout }} - - - uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5 - - - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 # zizmor: ignore[cache-poisoning] - with: - # No pnpm cache -- correctness over speed for publish workflows - node-version-file: ".nvmrc" - - - name: Cache NX - uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # 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- - lookup-only: true - - - 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 diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml index 1111b104a8..0b9ea34841 100644 --- a/.github/workflows/zizmor.yml +++ b/.github/workflows/zizmor.yml @@ -18,7 +18,7 @@ jobs: actions: read steps: - name: Checkout repository - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 with: persist-credentials: false diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..5bf4400f22 --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +24.15.0 diff --git a/.nvmrc b/.nvmrc deleted file mode 100644 index c5ddcef4e7..0000000000 --- a/.nvmrc +++ /dev/null @@ -1 +0,0 @@ -v22.14.0 \ No newline at end of file diff --git a/.prettierrc b/.prettierrc deleted file mode 100644 index 0f4e5b7d67..0000000000 --- a/.prettierrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "http://json.schemastore.org/prettierrc", - "semi": true, - "singleQuote": false, - "tabWidth": 2, - "printWidth": 80, - "trailingComma": "all", - "bracketSpacing": true, - "arrowParens": "always", - "endOfLine": "lf", - "plugins": ["prettier-plugin-tailwindcss"] -} diff --git a/.vite-hooks/pre-commit b/.vite-hooks/pre-commit new file mode 100755 index 0000000000..85fb65b4fc --- /dev/null +++ b/.vite-hooks/pre-commit @@ -0,0 +1 @@ +vp staged diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000000..362b82a43a --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,16 @@ + + +# 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 --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