tsdown-config-silverwind 1.4.0 → 1.5.0

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.
@@ -0,0 +1,28 @@
1
+ import { UserConfig } from "tsdown";
2
+
3
+ //#region index.d.ts
4
+ type CustomConfig = UserConfig & {
5
+ url: string;
6
+ };
7
+ declare function base({
8
+ url,
9
+ entry,
10
+ report,
11
+ loader,
12
+ outputOptions,
13
+ ...other
14
+ }: CustomConfig): UserConfig;
15
+ declare function nodeLib({
16
+ url,
17
+ ...other
18
+ }: CustomConfig): UserConfig;
19
+ declare function webLib({
20
+ url,
21
+ ...other
22
+ }: CustomConfig): UserConfig;
23
+ declare function nodeCli({
24
+ url,
25
+ ...other
26
+ }: CustomConfig): UserConfig;
27
+ //#endregion
28
+ export { CustomConfig, base, nodeCli, nodeLib, webLib };
@@ -17,7 +17,7 @@ function fixEntry(entry) {
17
17
  }));
18
18
  else return entry;
19
19
  }
20
- const base = ({ url, entry, report, loader, outputOptions,...other }) => {
20
+ function base({ url, entry, report, loader, outputOptions,...other }) {
21
21
  return {
22
22
  entry: fixEntry(entry ?? fileURLToPath(new URL("index.ts", url))),
23
23
  report: typeof report === "boolean" ? report : {
@@ -38,10 +38,12 @@ const base = ({ url, entry, report, loader, outputOptions,...other }) => {
38
38
  },
39
39
  ...other
40
40
  };
41
- };
41
+ }
42
42
  function nodeLib({ url,...other }) {
43
43
  return base({
44
44
  platform: "node",
45
+ sourcemap: false,
46
+ minify: false,
45
47
  url,
46
48
  ...other
47
49
  });
@@ -49,6 +51,8 @@ function nodeLib({ url,...other }) {
49
51
  function webLib({ url,...other }) {
50
52
  return base({
51
53
  platform: "browser",
54
+ sourcemap: true,
55
+ minify: false,
52
56
  url,
53
57
  ...other
54
58
  });
@@ -56,10 +60,12 @@ function webLib({ url,...other }) {
56
60
  function nodeCli({ url,...other }) {
57
61
  return nodeLib({
58
62
  platform: "node",
63
+ sourcemap: false,
64
+ minify: true,
59
65
  url,
60
66
  ...other
61
67
  });
62
68
  }
63
69
 
64
70
  //#endregion
65
- export { nodeCli, nodeLib, webLib };
71
+ export { base, nodeCli, nodeLib, webLib };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown-config-silverwind",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Shared tsdown configuration",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": "silverwind/tsdown-config-silverwind",
@@ -17,15 +17,15 @@
17
17
  "node": ">=20"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "24.5.2",
21
- "eslint": "9.36.0",
22
- "eslint-config-silverwind": "105.2.1",
23
- "tsdown": "0.15.5",
24
- "typescript": "5.9.2",
25
- "typescript-config-silverwind": "10.0.2",
26
- "updates": "16.7.3",
27
- "versions": "13.2.0",
28
- "vitest": "3.2.4",
29
- "vitest-config-silverwind": "10.2.0"
20
+ "@types/node": "24.10.0",
21
+ "eslint": "9.39.1",
22
+ "eslint-config-silverwind": "110.0.0",
23
+ "tsdown": "0.16.0",
24
+ "typescript": "5.9.3",
25
+ "typescript-config-silverwind": "12.0.0",
26
+ "updates": "16.9.1",
27
+ "versions": "14.0.2",
28
+ "vitest": "4.0.7",
29
+ "vitest-config-silverwind": "10.4.0"
30
30
  }
31
31
  }
package/dist/index.d.ts DELETED
@@ -1,20 +0,0 @@
1
- import { Options } from "tsdown";
2
-
3
- //#region index.d.ts
4
- type CustomConfig = Options & {
5
- url: string;
6
- };
7
- declare function nodeLib({
8
- url,
9
- ...other
10
- }: CustomConfig): Options;
11
- declare function webLib({
12
- url,
13
- ...other
14
- }: CustomConfig): Options;
15
- declare function nodeCli({
16
- url,
17
- ...other
18
- }: CustomConfig): Options;
19
- //#endregion
20
- export { CustomConfig, nodeCli, nodeLib, webLib };