tsdown 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/tsdown.js +2 -0
- package/dist/cli.d.ts +1 -0
- package/dist/features/clean.d.ts +1 -0
- package/dist/features/entry.d.ts +2 -0
- package/dist/features/external.d.ts +5 -0
- package/dist/features/output.d.ts +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/options.d.ts +23 -0
- package/dist/plugins.d.ts +1 -0
- package/dist/run.d.ts +0 -0
- package/dist/run.js +2 -1
- package/dist/utils/fs.d.ts +1 -0
- package/dist/utils/general.d.ts +1 -0
- package/dist/utils/logger.d.ts +2 -0
- package/dist/utils/package.d.ts +2 -0
- package/package.json +11 -2
package/bin/tsdown.js
ADDED
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function runCLI(): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function cleanOutDir(cwd: string, patterns: (string)[]): Promise<void>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ResolvedOptions } from '../options';
|
|
2
|
+
import type { InputOptions, Plugin } from 'rolldown';
|
|
3
|
+
export type External = InputOptions['external'];
|
|
4
|
+
export declare function ExternalPlugin(pkg: any, platform: ResolvedOptions['platform']): Plugin;
|
|
5
|
+
export declare function getProductionDeps(pkg: any): Set<string>;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { External } from './features/external';
|
|
2
|
+
import type { InputOptions } from 'rolldown';
|
|
3
|
+
export type Format = (('es') | ('esm') | ('module') | ('cjs') | ('commonjs'));
|
|
4
|
+
export interface Options {
|
|
5
|
+
entry?: InputOptions['input'];
|
|
6
|
+
format?: ((Format) | ((Format)[]));
|
|
7
|
+
plugins?: InputOptions['plugins'];
|
|
8
|
+
external?: External;
|
|
9
|
+
outDir?: string;
|
|
10
|
+
clean?: ((boolean) | ((string)[]));
|
|
11
|
+
config?: ((boolean) | (string));
|
|
12
|
+
alias?: Record<string, string>;
|
|
13
|
+
treeshake?: boolean;
|
|
14
|
+
platform?: (('node') | ('neutral'));
|
|
15
|
+
}
|
|
16
|
+
export type OptionsWithoutConfig = Omit<Options, 'config'>;
|
|
17
|
+
type Overwrite<T, U> = (({ [P in Exclude<keyof T, keyof U>] : T[P]}) & (U));
|
|
18
|
+
export type ResolvedOptions = Omit<Overwrite<Required<Options>, {
|
|
19
|
+
format: (Format)[];
|
|
20
|
+
clean: (((string)[]) | (false));
|
|
21
|
+
}>, 'config'>;
|
|
22
|
+
export declare function normalizeOptions(options: Options): Promise<ResolvedOptions>;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ExternalPlugin } from './features/external';
|
package/dist/run.d.ts
ADDED
|
File without changes
|
package/dist/run.js
CHANGED
|
@@ -3,8 +3,9 @@ import { default as process } from "node:process";
|
|
|
3
3
|
import { cac } from "cac";
|
|
4
4
|
|
|
5
5
|
//#region package.json
|
|
6
|
-
const version = '0.2.
|
|
6
|
+
const version = '0.2.2';
|
|
7
7
|
const files = ['dist'];
|
|
8
|
+
const typesVersions = {'*': {'*': ['./dist/*', './*']}};
|
|
8
9
|
|
|
9
10
|
//#endregion
|
|
10
11
|
//#region src/cli.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fsExists(path: string): Promise<boolean>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function toArray<T>(val: ((T) | ((T)[]) | (null) | (undefined)), defaultValue?: T): (T)[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "An even faster bundler powered by Rolldown.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,8 +24,16 @@
|
|
|
24
24
|
"./plugins": "./dist/plugins.js",
|
|
25
25
|
"./package.json": "./package.json"
|
|
26
26
|
},
|
|
27
|
+
"typesVersions": {
|
|
28
|
+
"*": {
|
|
29
|
+
"*": [
|
|
30
|
+
"./dist/*",
|
|
31
|
+
"./*"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
27
35
|
"bin": {
|
|
28
|
-
"tsdown": "./
|
|
36
|
+
"tsdown": "./bin/tsdown.js"
|
|
29
37
|
},
|
|
30
38
|
"publishConfig": {
|
|
31
39
|
"access": "public"
|
|
@@ -47,6 +55,7 @@
|
|
|
47
55
|
"tsup": "^8.1.0",
|
|
48
56
|
"tsx": "^4.15.7",
|
|
49
57
|
"typescript": "~5.5.2",
|
|
58
|
+
"unplugin-isolated-decl": "^0.1.0",
|
|
50
59
|
"vitest": "^1.6.0"
|
|
51
60
|
},
|
|
52
61
|
"engines": {
|