tsdown 0.2.5 → 0.2.6

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.
@@ -1,2 +1,2 @@
1
- import type { Options } from '../options';
2
- export declare function resolveEntry(entry: Options['entry']): Promise<string[] | Record<string, string>>;
1
+ import type { Options } from "../options";
2
+ export declare function resolveEntry(entry: Options["entry"]): Promise<string[] | Record<string, string>>;
@@ -1,6 +1,6 @@
1
- import type { ResolvedOptions } from '../options';
2
- import type { PackageJson } from 'pkg-types';
3
- import type { InputOptions, Plugin } from 'rolldown';
4
- export type External = InputOptions['external'];
5
- export declare function ExternalPlugin(pkg: PackageJson | undefined, platform: ResolvedOptions['platform']): Plugin;
1
+ import type { ResolvedOptions } from "../options";
2
+ import type { PackageJson } from "pkg-types";
3
+ import type { InputOptions, Plugin } from "rolldown";
4
+ export type External = InputOptions["external"];
5
+ export declare function ExternalPlugin(pkg: PackageJson | undefined, platform: ResolvedOptions["platform"]): Plugin;
6
6
  export declare function getProductionDeps(pkg: PackageJson): Set<string>;
@@ -1,2 +1,2 @@
1
- import type { Format } from '../options';
2
- export declare function resolveOutputExtension(pkg: any, format: Format): 'mjs' | 'cjs' | 'js';
1
+ import type { Format } from "../options";
2
+ export declare function resolveOutputExtension(pkg: any, format: Format): "mjs" | "cjs" | "js";
@@ -1,2 +1,2 @@
1
- import type { ResolvedOptions } from '../options';
1
+ import type { ResolvedOptions } from "../options";
2
2
  export declare function watchBuild(options: ResolvedOptions, rebuild: () => void): Promise<void>;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- import { type Options, type OptionsWithoutConfig } from './options';
1
+ import { type Options, type OptionsWithoutConfig } from "./options";
2
2
  export declare function build(userOptions?: Options): Promise<void>;
3
3
  export declare function defineConfig(options: OptionsWithoutConfig): OptionsWithoutConfig;
4
+ export type { Options, OptionsWithoutConfig };
package/dist/options.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- import type { External } from './features/external';
2
- import type { MarkPartial, MaybePromise, Overwrite } from './utils/types';
3
- import type { InputOptions, OutputOptions } from 'rolldown';
4
- import type { Options as IsolatedDeclOptions } from 'unplugin-isolated-decl';
5
- export type Format = 'es' | 'esm' | 'module' | 'cjs' | 'commonjs';
6
- export type Sourcemap = boolean | 'inline' | 'hidden';
1
+ import type { External } from "./features/external";
2
+ import type { MarkPartial, MaybePromise, Overwrite } from "./utils/types";
3
+ import type { InputOptions, OutputOptions } from "rolldown";
4
+ import type { Options as IsolatedDeclOptions } from "unplugin-isolated-decl";
5
+ export type Format = "es" | "esm" | "module" | "cjs" | "commonjs";
6
+ export type Sourcemap = boolean | "inline" | "hidden";
7
7
  export interface Options {
8
- entry?: InputOptions['input'];
8
+ entry?: InputOptions["input"];
9
9
  format?: Format | Format[];
10
- plugins?: InputOptions['plugins'];
10
+ plugins?: InputOptions["plugins"];
11
11
  external?: External;
12
12
  outDir?: string;
13
13
  clean?: boolean | string[];
@@ -16,15 +16,15 @@ export interface Options {
16
16
  alias?: Record<string, string>;
17
17
  treeshake?: boolean;
18
18
  minify?: boolean;
19
- platform?: 'node' | 'neutral';
19
+ platform?: "node" | "neutral";
20
20
  dts?: boolean | IsolatedDeclOptions;
21
21
  watch?: boolean | string | string[];
22
22
  inputOptions?: InputOptions;
23
23
  outputOptions?: OutputOptions | ((options: OutputOptions, format: Format) => MaybePromise<OutputOptions | void | null>);
24
24
  }
25
- export type OptionsWithoutConfig = Omit<Options, 'config'>;
26
- export type ResolvedOptions = Omit<Overwrite<MarkPartial<Options, 'inputOptions' | 'outputOptions' | 'minify' | 'alias' | 'external'>, {
25
+ export type OptionsWithoutConfig = Omit<Options, "config">;
26
+ export type ResolvedOptions = Omit<Overwrite<MarkPartial<Options, "inputOptions" | "outputOptions" | "minify" | "alias" | "external">, {
27
27
  format: Format[];
28
28
  clean: string[] | false;
29
- }>, 'config'>;
29
+ }>, "config">;
30
30
  export declare function normalizeOptions(options: Options): Promise<ResolvedOptions>;
package/dist/plugins.d.ts CHANGED
@@ -1 +1 @@
1
- export { ExternalPlugin } from './features/external';
1
+ export { ExternalPlugin } from "./features/external";
package/dist/run.d.ts CHANGED
@@ -0,0 +1 @@
1
+ export {};
package/dist/run.js CHANGED
@@ -3,7 +3,7 @@ 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.5";
6
+ const version = "0.2.6";
7
7
 
8
8
  //#endregion
9
9
  //#region src/cli.ts
@@ -1,2 +1,2 @@
1
- import { type ConsolaInstance } from 'consola';
1
+ import { type ConsolaInstance } from "consola";
2
2
  export declare const logger: ConsolaInstance;
@@ -1,3 +1,3 @@
1
- import { type PackageJson } from 'pkg-types';
1
+ import { type PackageJson } from "pkg-types";
2
2
  export declare function readPackageJson(dir: string): Promise<PackageJson | undefined>;
3
- export declare function getPackageType(pkg: PackageJson | undefined): 'module' | 'commonjs';
3
+ export declare function getPackageType(pkg: PackageJson | undefined): "module" | "commonjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "An even faster bundler powered by Rolldown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -46,19 +46,19 @@
46
46
  "pkg-types": "^1.1.3",
47
47
  "rolldown": "nightly",
48
48
  "unconfig": "^0.5.5",
49
- "unplugin-isolated-decl": "^0.4.1"
49
+ "unplugin-isolated-decl": "^0.4.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@sxzz/eslint-config": "^3.16.3",
52
+ "@sxzz/eslint-config": "^3.17.0",
53
53
  "@sxzz/prettier-config": "^2.0.2",
54
- "@types/node": "^20.14.14",
54
+ "@types/node": "^20.14.15",
55
55
  "bumpp": "^9.4.2",
56
- "eslint": "^9.8.0",
56
+ "eslint": "^9.9.0",
57
57
  "execa": "^9.3.0",
58
58
  "fdir": "^6.2.0",
59
59
  "prettier": "^3.3.3",
60
60
  "tsup": "^8.2.4",
61
- "tsx": "^4.16.5",
61
+ "tsx": "^4.17.0",
62
62
  "typescript": "~5.5.4",
63
63
  "vitest": "^2.0.5"
64
64
  },