Skip to content

Commit ecc0849

Browse files
authored
Merge branch 'main' into feat/watch_copy_files
2 parents a9ab9f9 + 13f1c5d commit ecc0849

File tree

23 files changed

+922
-724
lines changed

23 files changed

+922
-724
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,33 @@ body:
1616
Also try to search for your issue - it may have already been answered or even fixed in the development branch.
1717
However, if you find that an old, closed issue still persists in the latest version,
1818
you should open a new issue using the form below instead of commenting on the old issue.
19+
20+
- type: markdown
21+
attributes:
22+
value: |
23+
## 📋 Show us the bug
24+
25+
> [!CAUTION]
26+
> **This is the most important part.**
27+
> A **minimal reproduction** is required to investigate and fix the issue, or it will be closed.
28+
29+
- Use [StackBlitz](https://stackblitz.com/github/rolldown/tsdown-starter-stackblitz) to create a minimal reproduction and share the link.
30+
- Or provide a minimal repository on GitHub that can reproduce the issue. You could use [this template](https://github.com/rolldown/tsdown-starter-stackblitz).
31+
1932
- type: textarea
2033
id: reproduction-link-or-steps
2134
attributes:
2235
label: Reproduction link or steps
23-
description: |
24-
- Use [StackBlitz](https://stackblitz.com/github/rolldown/tsdown-starter-stackblitz) to create a minimal reproduction and share the link.
25-
- Or provide a minimal repository on GitHub that can reproduce the issue. You could use [this template](https://github.com/rolldown/tsdown-starter-stackblitz).
26-
placeholder: Reproduction link or steps
36+
placeholder: https://github.com/... or https://stackblitz.com/...
2737
validations:
2838
required: true
39+
40+
- type: markdown
41+
attributes:
42+
value: |
43+
> [!TIP]
44+
> **🙋 Need help?** Use [_Priority Support_](https://github.com/sponsors/sxzz) for debugging help and implementation!
45+
2946
- type: textarea
3047
id: expected
3148
attributes:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
blank_issues_enabled: false
12
contact_links:
23
- name: ⁉️ Why and How to make a reproduction?
34
url: https://antfu.me/posts/why-reproductions-are-required
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Needs Reproduction
2+
3+
on:
4+
issues:
5+
types: [labeled]
6+
7+
jobs:
8+
comment:
9+
if: github.event.label.name == 'needs reproduction'
10+
runs-on: ubuntu-slim
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Comment on issue
15+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
16+
with:
17+
script: |
18+
const message = [
19+
`Hello @${context.payload.issue.user.login}! 👋`,
20+
'',
21+
'Thank you for raising an issue. However, we need a **minimal reproduction** to investigate the problem effectively.',
22+
'',
23+
'### 📋 What is a Minimal Reproduction?',
24+
'',
25+
'A minimal reproduction is the smallest possible project that demonstrates your issue. It should:',
26+
'- Include **only** the code necessary to reproduce the issue',
27+
'- Remove all unrelated dependencies and code',
28+
'- Be as simple as possible while still showing the problem',
29+
'',
30+
'Learn more about why reproductions are required: **[Why Reproductions are Required](https://antfu.me/posts/why-reproductions-are-required)**',
31+
'',
32+
'### 🔧 How to Provide a Reproduction',
33+
'',
34+
'Choose one of the following options:',
35+
'',
36+
'1. **Use StackBlitz** (Recommended for quick sharing)',
37+
' - Open the [tsdown starter template](https://stackblitz.com/github/rolldown/tsdown-starter-stackblitz)',
38+
' - Modify it to reproduce your issue',
39+
' - Share the StackBlitz link',
40+
'',
41+
'2. **Use a GitHub Repository**',
42+
' - Fork [this template](https://github.com/rolldown/tsdown-starter-stackblitz)',
43+
' - Create a minimal reproduction',
44+
' - Share your repository link',
45+
'',
46+
'### 💡 Need Help?',
47+
'',
48+
'If you\'re having trouble creating a reproduction or need debugging assistance, consider using **[Priority Support](https://github.com/sponsors/sxzz)** for dedicated help!',
49+
'',
50+
'---',
51+
'',
52+
'Once you\'ve provided a minimal reproduction, please comment here with the link. We\'ll be happy to investigate further. Thank you for your understanding! 🙏'
53+
].join('\n');
54+
55+
await github.rest.issues.createComment({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
issue_number: context.issue.number,
59+
body: message
60+
});

dts.snapshot.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"config-!~{00m}~.d.mts": {
2+
"config-!~{00i}~.d.mts": {
33
"defineConfig": "declare function defineConfig(_: UserConfigExport): UserConfigExport",
44
"mergeConfig": "declare function mergeConfig(_: InlineConfig, _: InlineConfig): InlineConfig",
55
"resolveUserConfig": "declare function resolveUserConfig(_: UserConfig, _: InlineConfig): Promise<ResolvedConfig[]>"
@@ -15,7 +15,7 @@
1515
},
1616
"index.d.mts": {
1717
"build": "declare function build(_: InlineConfig): Promise<TsdownBundle[]>",
18-
"buildWithConfigs": "declare function buildWithConfigs(_: ResolvedConfig[], _: string[]): Promise<TsdownBundle[]>",
18+
"buildWithConfigs": "declare function buildWithConfigs(_: ResolvedConfig[], _: string[], _: () => void): Promise<TsdownBundle[]>",
1919
"enableDebug": "declare function enableDebug(_: boolean | Arrayable<string>): void",
2020
"#exports": [
2121
"AttwOptions",
@@ -68,12 +68,12 @@
6868
]
6969
},
7070
"plugins.d.mts": {
71-
"ExternalPlugin": "declare function ExternalPlugin(_: ResolvedConfig): Plugin",
71+
"DepPlugin": "declare function DepPlugin(_: ResolvedConfig): Plugin",
7272
"NodeProtocolPlugin": "declare function NodeProtocolPlugin(_: 'strip' | true): Plugin",
7373
"ShebangPlugin": "declare function ShebangPlugin(_: Logger, _: string, _: string, _: boolean): Plugin",
7474
"WatchPlugin": "declare function WatchPlugin(_: string[], _: TsdownBundle): Plugin",
7575
"#exports": [
76-
"ExternalPlugin",
76+
"DepPlugin",
7777
"NodeProtocolPlugin",
7878
"ReportPlugin",
7979
"ShebangPlugin",
@@ -83,7 +83,7 @@
8383
"run.d.mts": {
8484
"#exports": []
8585
},
86-
"types-!~{00k}~.d.mts": {
86+
"types-!~{00g}~.d.mts": {
8787
"Arrayable": "type Arrayable<T> = T | T[]",
8888
"AttwOptions": "interface AttwOptions extends CheckPackageOptions {\n profile?: 'strict' | 'node16' | 'esm-only'\n level?: 'error' | 'warn'\n ignoreRules?: string[]\n}",
8989
"Awaitable": "type Awaitable<T> = T | Promise<T>",
@@ -114,32 +114,32 @@
114114
"Overwrite": "type Overwrite<T, U> = Omit<T, keyof U> & U",
115115
"PackageJson": "interface PackageJson {\n name?: string\n version?: string\n description?: string\n keywords?: string[]\n homepage?: string\n bugs?: string | { url?: string; email?: string }\n license?: string\n repository?: string | { type: string; url: string; directory?: string }\n scripts?: PackageJsonScripts\n private?: boolean\n author?: PackageJsonPerson\n contributors?: PackageJsonPerson[]\n funding?: PackageJsonFunding | PackageJsonFunding[]\n files?: string[]\n main?: string\n browser?: string | Record<string, string | false>\n unpkg?: string\n bin?: string | Record<string, string>\n man?: string | string[]\n dependencies?: Record<string, string>\n devDependencies?: Record<string, string>\n optionalDependencies?: Record<string, string>\n peerDependencies?: Record<string, string>\n types?: string\n typings?: string\n module?: string\n type?: 'module' | 'commonjs'\n exports?: PackageJsonExports\n imports?: Record<string, string | Record<string, string>>\n workspaces?: string[] | { packages?: string[]; nohoist?: string[] }\n typesVersions?: Record<string, Record<string, string[]>>\n os?: string[]\n cpu?: string[]\n publishConfig?: { registry?: string; tag?: string; access?: 'public' | 'restricted'; executableFiles?: string[]; directory?: string; linkDirectory?: boolean } & Pick<PackageJson, 'bin' | 'main' | 'exports' | 'types' | 'typings' | 'module' | 'browser' | 'unpkg' | 'typesVersions' | 'os' | 'cpu'>\n packageManager?: string\n [key: string]: any\n}",
116116
"PackageJsonCommonScripts": "type PackageJsonCommonScripts = 'build' | 'coverage' | 'deploy' | 'dev' | 'format' | 'lint' | 'preview' | 'release' | 'typecheck' | 'watch'",
117-
"PackageJsonExportKey": "type PackageJsonExportKey = '.' | 'import' | 'require' | 'types' | 'node' | 'browser' | 'default' | string & {}",
117+
"PackageJsonExportKey": "type PackageJsonExportKey = '.' | 'import' | 'require' | 'types' | 'node' | 'browser' | 'default' | (string & {})",
118118
"PackageJsonExports": "type PackageJsonExports = string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject>",
119119
"PackageJsonExportsObject": "type PackageJsonExportsObject = { [P in PackageJsonExportKey]?: string | PackageJsonExportsObject | Array<string | PackageJsonExportsObject> }",
120120
"PackageJsonFunding": "type PackageJsonFunding = string | { url: string; type?: string }",
121121
"PackageJsonNpmLifeCycleScripts": "type PackageJsonNpmLifeCycleScripts = 'dependencies' | 'prepublishOnly' | PackageJsonScriptWithPreAndPost<'install' | 'pack' | 'prepare' | 'publish' | 'restart' | 'start' | 'stop' | 'test' | 'version'>",
122122
"PackageJsonPerson": "type PackageJsonPerson = string | { name: string; email?: string; url?: string }",
123123
"PackageJsonPnpmLifeCycleScripts": "type PackageJsonPnpmLifeCycleScripts = 'pnpm:devPreinstall'",
124-
"PackageJsonScriptName": "type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | string & {}",
124+
"PackageJsonScriptName": "type PackageJsonScriptName = PackageJsonCommonScripts | PackageJsonNpmLifeCycleScripts | PackageJsonPnpmLifeCycleScripts | (string & {})",
125125
"PackageJsonScripts": "type PackageJsonScripts = { [P in PackageJsonScriptName]?: string }",
126126
"PackageJsonScriptWithPreAndPost": "type PackageJsonScriptWithPreAndPost<S extends string> = S | `${'pre' | 'post'}${S}`",
127127
"PackageJsonWithPath": "interface PackageJsonWithPath extends PackageJson {\n packageJsonPath: string\n}",
128128
"PackageType": "type PackageType = 'module' | 'commonjs' | undefined",
129129
"PublintOptions": "interface PublintOptions extends Options {}",
130130
"ReportOptions": "interface ReportOptions {\n gzip?: boolean\n brotli?: boolean\n maxCompressSize?: number\n}",
131131
"ReportPlugin": "declare function ReportPlugin(_: ReportOptions, _: Logger, _: string, _: boolean, _: string, _: boolean): Plugin",
132-
"ResolvedConfig": "type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, 'workspace' | 'fromVite' | 'publicDir' | 'bundle' | 'removeNodeProtocol' | 'logLevel' | 'failOnWarn' | 'customLogger' | 'envFile' | 'envPrefix'>, 'globalName' | 'inputOptions' | 'outputOptions' | 'minify' | 'define' | 'alias' | 'external' | 'onSuccess' | 'outExtensions' | 'hooks' | 'copy' | 'loader' | 'name' | 'banner' | 'footer' | 'checks'>, { entry: Record<string, string>; nameLabel: string | undefined; format: NormalizedFormat; target?: string[]; clean: string[]; pkg?: PackageJsonWithPath; nodeProtocol: 'strip' | boolean; logger: Logger; ignoreWatch: Array<string | RegExp>; noExternal?: NoExternalFn; inlineOnly?: Array<string | RegExp>; css: Required<CssOptions>; dts: false | DtsOptions; report: false | ReportOptions; tsconfig: false | string; exports: false | ExportsOptions; devtools: false | DevtoolsOptions; publint: false | PublintOptions; attw: false | AttwOptions; unused: false | UnusedOptions }>",
132+
"ResolvedConfig": "type ResolvedConfig = Overwrite<MarkPartial<Omit<UserConfig, 'workspace' | 'fromVite' | 'publicDir' | 'bundle' | 'removeNodeProtocol' | 'logLevel' | 'failOnWarn' | 'customLogger' | 'envFile' | 'envPrefix'>, 'globalName' | 'inputOptions' | 'outputOptions' | 'minify' | 'define' | 'alias' | 'external' | 'onSuccess' | 'outExtensions' | 'hooks' | 'copy' | 'loader' | 'name' | 'banner' | 'footer' | 'checks'>, { entry: Record<string, string>; nameLabel: string | undefined; format: NormalizedFormat; target?: string[]; clean: string[]; pkg?: PackageJsonWithPath; nodeProtocol: 'strip' | boolean; logger: Logger; ignoreWatch: Array<string | RegExp>; noExternal?: NoExternalFn; inlineOnly?: Array<string | RegExp> | false; css: Required<CssOptions>; dts: false | DtsOptions; report: false | ReportOptions; tsconfig: false | string; exports: false | ExportsOptions; devtools: false | DevtoolsOptions; publint: false | PublintOptions; attw: false | AttwOptions; unused: false | UnusedOptions }>",
133133
"RolldownChunk": "type RolldownChunk = (OutputChunk | OutputAsset) & { outDir: string }",
134134
"RolldownContext": "interface RolldownContext {\n buildOptions: BuildOptions\n}",
135135
"Sourcemap": "type Sourcemap = boolean | 'inline' | 'hidden'",
136136
"TsdownBundle": "interface TsdownBundle extends AsyncDisposable {\n chunks: RolldownChunk[]\n config: ResolvedConfig\n}",
137137
"TsdownHooks": "interface TsdownHooks {\n 'build:prepare': (_: BuildContext) => void | Promise<void>\n 'build:before': (_: BuildContext & RolldownContext) => void | Promise<void>\n 'build:done': (_: BuildContext & { chunks: RolldownChunk[] }) => void | Promise<void>\n}",
138138
"TsdownInputOption": "type TsdownInputOption = Arrayable<string | Record<string, Arrayable<string>>>",
139-
"UserConfig": "interface UserConfig {\n entry?: TsdownInputOption\n external?: ExternalOption\n noExternal?: Arrayable<string | RegExp> | NoExternalFn\n inlineOnly?: Arrayable<string | RegExp>\n skipNodeModulesBundle?: boolean\n alias?: Record<string, string>\n tsconfig?: string | boolean\n platform?: 'node' | 'neutral' | 'browser'\n target?: string | string[] | false\n env?: Record<string, any>\n envFile?: string\n envPrefix?: string | string[]\n define?: Record<string, string>\n shims?: boolean\n treeshake?: boolean | TreeshakingOptions\n loader?: ModuleTypes\n removeNodeProtocol?: boolean\n nodeProtocol?: 'strip' | boolean\n checks?: ChecksOptions & { legacyCjs?: boolean }\n plugins?: InputOptions['plugins']\n inputOptions?: InputOptions | ((_: InputOptions, _: NormalizedFormat, _: { cjsDts: boolean }) => Awaitable<InputOptions | void | null>)\n format?: Format | Format[] | Partial<Record<Format, Partial<ResolvedConfig>>>\n globalName?: string\n outDir?: string\n write?: boolean\n sourcemap?: Sourcemap\n clean?: boolean | string[]\n minify?: boolean | 'dce-only' | MinifyOptions\n footer?: ChunkAddon\n banner?: ChunkAddon\n unbundle?: boolean\n bundle?: boolean\n fixedExtension?: boolean\n outExtensions?: OutExtensionFactory\n hash?: boolean\n cjsDefault?: boolean\n outputOptions?: OutputOptions | ((_: OutputOptions, _: NormalizedFormat, _: { cjsDts: boolean }) => Awaitable<OutputOptions | void | null>)\n cwd?: string\n name?: string\n logLevel?: LogLevel\n failOnWarn?: boolean | CIOption\n customLogger?: Logger\n fromVite?: boolean | 'vitest'\n watch?: boolean | Arrayable<string>\n ignoreWatch?: Arrayable<string | RegExp>\n devtools?: WithEnabled<DevtoolsOptions>\n onSuccess?: string | ((_: ResolvedConfig, _: AbortSignal) => void | Promise<void>)\n dts?: WithEnabled<DtsOptions>\n unused?: WithEnabled<UnusedOptions>\n publint?: WithEnabled<PublintOptions>\n attw?: WithEnabled<AttwOptions>\n report?: WithEnabled<ReportOptions>\n globImport?: boolean\n exports?: WithEnabled<ExportsOptions>\n css?: CssOptions\n publicDir?: CopyOptions | CopyOptionsFn\n copy?: CopyOptions | CopyOptionsFn\n hooks?: Partial<TsdownHooks> | ((_: Hookable<TsdownHooks>) => Awaitable<void>)\n workspace?: Workspace | Arrayable<string> | true\n}",
139+
"UserConfig": "interface UserConfig {\n entry?: TsdownInputOption\n external?: ExternalOption\n noExternal?: Arrayable<string | RegExp> | NoExternalFn\n inlineOnly?: Arrayable<string | RegExp> | false\n skipNodeModulesBundle?: boolean\n alias?: Record<string, string>\n tsconfig?: string | boolean\n platform?: 'node' | 'neutral' | 'browser'\n target?: string | string[] | false\n env?: Record<string, any>\n envFile?: string\n envPrefix?: string | string[]\n define?: Record<string, string>\n shims?: boolean\n treeshake?: boolean | TreeshakingOptions\n loader?: ModuleTypes\n removeNodeProtocol?: boolean\n nodeProtocol?: 'strip' | boolean\n checks?: ChecksOptions & { legacyCjs?: boolean }\n plugins?: InputOptions['plugins']\n inputOptions?: InputOptions | ((_: InputOptions, _: NormalizedFormat, _: { cjsDts: boolean }) => Awaitable<InputOptions | void | null>)\n format?: Format | Format[] | Partial<Record<Format, Partial<ResolvedConfig>>>\n globalName?: string\n outDir?: string\n write?: boolean\n sourcemap?: Sourcemap\n clean?: boolean | string[]\n minify?: boolean | 'dce-only' | MinifyOptions\n footer?: ChunkAddon\n banner?: ChunkAddon\n unbundle?: boolean\n bundle?: boolean\n fixedExtension?: boolean\n outExtensions?: OutExtensionFactory\n hash?: boolean\n cjsDefault?: boolean\n outputOptions?: OutputOptions | ((_: OutputOptions, _: NormalizedFormat, _: { cjsDts: boolean }) => Awaitable<OutputOptions | void | null>)\n cwd?: string\n name?: string\n logLevel?: LogLevel\n failOnWarn?: boolean | CIOption\n customLogger?: Logger\n fromVite?: boolean | 'vitest'\n watch?: boolean | Arrayable<string>\n ignoreWatch?: Arrayable<string | RegExp>\n devtools?: WithEnabled<DevtoolsOptions>\n onSuccess?: string | ((_: ResolvedConfig, _: AbortSignal) => void | Promise<void>)\n dts?: WithEnabled<DtsOptions>\n unused?: WithEnabled<UnusedOptions>\n publint?: WithEnabled<PublintOptions>\n attw?: WithEnabled<AttwOptions>\n report?: WithEnabled<ReportOptions>\n globImport?: boolean\n exports?: WithEnabled<ExportsOptions>\n css?: CssOptions\n publicDir?: CopyOptions | CopyOptionsFn\n copy?: CopyOptions | CopyOptionsFn\n hooks?: Partial<TsdownHooks> | ((_: Hookable<TsdownHooks>) => Awaitable<void>)\n workspace?: Workspace | Arrayable<string> | true\n}",
140140
"UserConfigExport": "type UserConfigExport = Awaitable<Arrayable<UserConfig> | UserConfigFn>",
141141
"UserConfigFn": "type UserConfigFn = (_: InlineConfig, _: { ci: boolean }) => Awaitable<Arrayable<UserConfig>>",
142-
"WithEnabled": "type WithEnabled<T> = boolean | undefined | CIOption | T & { enabled?: boolean | CIOption }",
142+
"WithEnabled": "type WithEnabled<T> = boolean | undefined | CIOption | (T & { enabled?: boolean | CIOption })",
143143
"Workspace": "interface Workspace {\n include?: Arrayable<string> | 'auto'\n exclude?: Arrayable<string>\n config?: boolean | string\n}"
144144
}
145145
}

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sxzz/tsdown",
3-
"version": "0.20.0-beta.4",
3+
"version": "0.20.1",
44
"exports": "./src/index.ts",
55
"publish": {
66
"include": [

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tsdown",
33
"type": "module",
4-
"version": "0.20.0-beta.4",
4+
"version": "0.20.1",
55
"packageManager": "[email protected]",
66
"description": "The Elegant Bundler for Libraries",
77
"author": "Kevin Deng <[email protected]>",

packages/create-tsdown/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "create-tsdown",
33
"type": "module",
4-
"version": "0.20.0-beta.4",
4+
"version": "0.20.1",
55
"description": "Create a new tsdown project",
66
"author": "Kevin Deng <[email protected]>",
77
"license": "MIT",

packages/migrate/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "tsdown-migrate",
33
"type": "module",
4-
"version": "0.20.0-beta.4",
4+
"version": "0.20.1",
55
"description": "A CLI tool to help migrate your project to tsdown.",
66
"author": "Kevin Deng <[email protected]>",
77
"license": "MIT",

0 commit comments

Comments
 (0)