Skip to content

feat: support typescript v6#85

Merged
antfu merged 1 commit into
twoslashes:mainfrom
ocavue-forks:ts6
Apr 10, 2026
Merged

feat: support typescript v6#85
antfu merged 1 commit into
twoslashes:mainfrom
ocavue-forks:ts6

Conversation

@ocavue
Copy link
Copy Markdown
Contributor

@ocavue ocavue commented Mar 24, 2026

TypeScript v6 stable just released: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/

This PR updates peer dependencies to support typescript v6

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 24, 2026

Deploy Preview for twoslash ready!

Name Link
🔨 Latest commit 3d080cf
🔍 Latest deploy log https://app.netlify.com/projects/twoslash/deploys/69c2463bed277800089dd44d
😎 Deploy Preview https://deploy-preview-85--twoslash.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SoonIter
Copy link
Copy Markdown

up !!! ↑

@northword
Copy link
Copy Markdown
Contributor

northword commented Apr 10, 2026

TS 6 also removed the baseUrl option, so the code needs to be modified accordingly, for example, line 61 in following code:

const meta: TwoslashReturnMeta = {
extension: typesToExtension(extension),
compilerOptions: {
...defaultCompilerOptions,
baseUrl: fsRoot,
...createOptions.compilerOptions,
...options.compilerOptions,
},
handbookOptions: {
...defaultHandbookOptions,
...createOptions.handbookOptions,
...options.handbookOptions,
},
removals: [],
flagNotations: [],
virtualFiles: [],
positionQueries: options.positionQueries || [],
positionCompletions: options.positionCompletions || [],
positionHighlights: options.positionHighlights || [],
}

errors in vitepress-twoslash
build error:
[vitepress] error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.

file: D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/docs/src/quick-start.md
[vitepress] error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.
  Visit https://aka.ms/ts6 for migration information.

file: D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/docs/src/quick-start.md
    at exports.createVirtualTypeScriptEnvironment (D:\Code\zotero-plugin-dev\zotero-plugin-scaffold\node_modules\.pnpm\@typescript+vfs@1.6.2_typescript@6.0.2\node_modules\@typescript\vfs\dist\vfs.cjs.production.min.js:1:10277)
    at getEnv (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/twoslash@0.3.6_typescript@6.0.2/node_modules/twoslash/dist/core.mjs:65:19)
    at twoslasher2 (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/twoslash@0.3.6_typescript@6.0.2/node_modules/twoslash/dist/core.mjs:135:17)
    at twoslasher (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/twoslash-vue@0.3.6_typescript@6.0.2/node_modules/twoslash-vue/dist/index.mjs:35:14)
    at Object.preprocess (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/@shikijs+twoslash@4.0.2_typescript@6.0.2/node_modules/@shikijs/twoslash/dist/core.mjs:58:23)
    at Object.preprocess (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/@shikijs+vitepress-twoslash@4.0.2_typescript@6.0.2/node_modules/@shikijs/vitepress-twoslash/dist/index.mjs:176:31)
    at codeToHast (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/@shikijs+core@3.23.0/node_modules/@shikijs/core/dist/index.mjs:1274:37)
    at codeToHtml (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/@shikijs+core@3.23.0/node_modules/@shikijs/core/dist/index.mjs:1580:27)
    at Object.codeToHtml (file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/@shikijs+core@3.23.0/node_modules/@shikijs/core/dist/index.mjs:2038:37)
    at file:///D:/Code/zotero-plugin-dev/zotero-plugin-scaffold/node_modules/.pnpm/vitepress@2.0.0-alpha.17_@t_07953261dbf8f90fa331796c508f9c29/node_modules/vitepress/dist/node/chunk-CpMTk0EA.js:28872:39
 ELIFECYCLE  Command failed with exit code 1.

EDIT: resolve in #86

@antfu antfu merged commit df238af into twoslashes:main Apr 10, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants