@rrlab/tsdown-config 0.2.1 → 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/README.md CHANGED
@@ -25,7 +25,7 @@ It needs tsdown 0.22 or later and Node 22.18 or later.
25
25
  - `defineLibConfig()`: a library. ESM with `.d.ts` declarations, from the entry `src/index.ts`.
26
26
  - `defineBinConfig()`: a CLI or Node binary. ESM for the `node` platform, from the entry `src/run.ts`.
27
27
 
28
- Each helper wraps tsdown's `defineConfig()` and takes tsdown's `UserConfig`. Your options are spread over the defaults, so they win.
28
+ Each helper wraps tsdown's `defineConfig()` and takes tsdown's `UserConfig`, which this package also exports. Your options are spread over the defaults, so they win.
29
29
 
30
30
  ## Usage
31
31
 
package/dist/index.d.mts CHANGED
@@ -1,7 +1,4 @@
1
- import { UserConfig } from "tsdown";
2
-
3
- //#region src/index.d.ts
4
- declare function defineBinConfig(options?: UserConfig): UserConfig;
5
- declare function defineLibConfig(options?: UserConfig): UserConfig;
6
- //#endregion
7
- export { defineBinConfig, defineLibConfig };
1
+ import { UserConfig, UserConfig as UserConfig$1 } from "tsdown";
2
+ export declare function defineBinConfig(options?: UserConfig$1): UserConfig$1;
3
+ export declare function defineLibConfig(options?: UserConfig$1): UserConfig$1;
4
+ export type { UserConfig };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineConfig } from "tsdown";
2
- //#region src/index.ts
2
+ // src/index.ts
3
3
  function defineBinConfig(options = {}) {
4
4
  return defineConfig({
5
5
  entry: ["src/run.ts"],
@@ -16,5 +16,4 @@ function defineLibConfig(options = {}) {
16
16
  ...options
17
17
  });
18
18
  }
19
- //#endregion
20
19
  export { defineBinConfig, defineLibConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rrlab/tsdown-config",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Shared tsdown configuration helpers used by @rrlab/tsdown-plugin.",
5
5
  "homepage": "https://github.com/withvariablelab/dx/tree/main/run-run/tsdown-config#readme",
6
6
  "bugs": {
@@ -39,7 +39,14 @@
39
39
  "peerDependencies": {
40
40
  "tsdown": ">=0.22.0"
41
41
  },
42
+ "devDependencies": {
43
+ "@types/node": "26.6.6",
44
+ "tsdown": "0.23.4",
45
+ "typescript": "7.0.2",
46
+ "vitest": "5.0.5"
47
+ },
42
48
  "scripts": {
43
- "build": "tsdown"
49
+ "build": "tsdown",
50
+ "test": "vitest run"
44
51
  }
45
52
  }
package/src/index.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { defineConfig, type UserConfig } from "tsdown";
2
2
 
3
+ export type { UserConfig } from "tsdown";
4
+
3
5
  export function defineBinConfig(options: UserConfig = {}) {
4
6
  return defineConfig({
5
7
  entry: ["src/run.ts"],