-
Notifications
You must be signed in to change notification settings - Fork 445
chore(repo): Update rolldown and tsdown #8207
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
base: ds.chore/ts-6.0
Are you sure you want to change the base?
Changes from 3 commits
2912035
9f64178
357160b
b4057e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ import { readFileSync } from 'node:fs'; | |
| import { fileURLToPath } from 'node:url'; | ||
|
|
||
| import { parse as parseYaml } from 'yaml'; | ||
| import { defineConfig } from 'tsdown'; | ||
| import { defineConfig, type Options } from 'tsdown'; | ||
|
|
||
| import clerkJsPkgJson from '../clerk-js/package.json' with { type: 'json' }; | ||
| import pkgJson from './package.json' with { type: 'json' }; | ||
|
|
@@ -52,7 +52,7 @@ function getClerkUISupportedReactBounds(): VersionBounds[] { | |
| return bounds; | ||
| } | ||
|
|
||
| export default defineConfig(overrideOptions => { | ||
| export default defineConfig((overrideOptions: Options) => { | ||
| const isWatch = !!overrideOptions.watch; | ||
| const shouldPublish = !!overrideOptions.env?.publish; | ||
| const clerkUISupportedReactBounds = getClerkUISupportedReactBounds(); | ||
|
|
@@ -66,13 +66,15 @@ export default defineConfig(overrideOptions => { | |
| legacy: 'src/legacy.ts', | ||
| types: 'src/types/index.ts', | ||
| }, | ||
| dts: true, | ||
| dts: { | ||
| cjsReexport: true, | ||
| }, | ||
| onSuccess: shouldPublish ? 'pkglab pub --ping' : undefined, | ||
| format: ['cjs', 'esm'], | ||
| clean: true, | ||
| minify: false, | ||
| sourcemap: true, | ||
| external: ['react', 'react-dom'], | ||
| external: ['react', 'react-dom', '@clerk/ui/internal'], | ||
|
||
| // Bundle @clerk/ui/register inline at build time so consumers don't need | ||
| // @clerk/ui as a dependency. The registration code sets up globalThis.__clerkSharedModules | ||
| // to enable @clerk/ui's shared variant to use the host app's React. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think it's somewhat strange that tsdown emits both
mtsandctsfiles. I would have thought that the CJS files would bejssince the package doesn't have"type": "module". After looking into the config for tsdown it does appear that this is to be expected though. When you emit acjsbundle, tsdown defaultsplatformto"node", which forces thefixedExtensionsconfig to betrue. So it does seem like this is intentional for dual ESM+CJS packages.