-
-
Notifications
You must be signed in to change notification settings - Fork 466
chore: upgrade TypeScript 6, Vitest 4, tsdown 0.21, Turbo 2.10 (#322) #372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
thedavidweng
wants to merge
9
commits into
1weiho:main
Choose a base branch
from
thedavidweng:typescript-vitest-tsdown-turbo-21be
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+852
−1,439
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
5a7c9d1
feat!: align core, demo, and CLI template on React 19
cursoragent 84567be
fix(web): narrow MDX ImageZoom src for React 19 img types
cursoragent 61227b6
chore: regenerate pnpm-lock.yaml against current main after React 19 …
thedavidweng 42e3270
feat!: migrate runtime to Vite 8 and native Rolldown optimizer options
cursoragent aa2258e
chore: regenerate pnpm-lock.yaml for Vite 8 against current main
thedavidweng 6719443
chore: upgrade TypeScript 6, Vitest 4, tsdown 0.21, and Turbo 2.10
cursoragent cae47a2
chore: remove deprecated baseUrl from core tsconfig for TypeScript 6;…
thedavidweng 0425967
docs: tighten vite-8 changeset description per CodeRabbit
thedavidweng 5e843a2
chore(template): bump @open-slide/core placeholder to ^1.0.0 per Code…
thedavidweng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@open-slide/core": major | ||
| "@open-slide/cli": major | ||
| --- | ||
|
|
||
| Require React 19 for the runtime and generated workspaces. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@open-slide/core": patch | ||
| "@open-slide/cli": patch | ||
| --- | ||
|
|
||
| Build packages with tsdown 0.21 and TypeScript 6 across the monorepo. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@open-slide/core": major | ||
| "@open-slide/cli": major | ||
| --- | ||
|
|
||
| Migrate the runtime and generated workspaces to Vite 8. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| import fs from 'node:fs/promises'; | ||
| import os from 'node:os'; | ||
| import path from 'node:path'; | ||
| import { describe, expect, it } from 'vitest'; | ||
| import { createViteConfig } from './config.ts'; | ||
|
|
||
| type VirtualExternalsPlugin = { | ||
| name: string; | ||
| resolveId?: (id: string) => { id: string; external: true } | undefined; | ||
| }; | ||
|
|
||
| describe('createViteConfig', () => { | ||
| it('uses native optimizeDeps.rolldownOptions and excludes virtual modules', async () => { | ||
| const root = await fs.mkdtemp(path.join(os.tmpdir(), 'open-slide-vite-config-')); | ||
| try { | ||
| await fs.mkdir(path.join(root, 'slides'), { recursive: true }); | ||
| const config = await createViteConfig({ userCwd: root }); | ||
| const optimizeDeps = config.optimizeDeps; | ||
|
|
||
| expect(optimizeDeps).toBeDefined(); | ||
| expect(optimizeDeps).not.toHaveProperty('esbuildOptions'); | ||
|
|
||
| const plugins = optimizeDeps?.rolldownOptions?.plugins; | ||
| expect(Array.isArray(plugins)).toBe(true); | ||
|
|
||
| const plugin = (plugins as VirtualExternalsPlugin[]).find( | ||
| (entry) => entry?.name === 'open-slide:virtual-externals', | ||
| ); | ||
| expect(plugin).toBeDefined(); | ||
| expect(plugin?.resolveId?.('virtual:open-slide/slides')).toEqual({ | ||
| id: 'virtual:open-slide/slides', | ||
| external: true, | ||
| }); | ||
| expect(plugin?.resolveId?.('virtual:open-slide/config')).toEqual({ | ||
| id: 'virtual:open-slide/config', | ||
| external: true, | ||
| }); | ||
| expect(plugin?.resolveId?.('react')).toBeUndefined(); | ||
| } finally { | ||
| await fs.rm(root, { recursive: true, force: true }); | ||
| } | ||
| }); | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.