tsdown-config-silverwind 1.6.1 → 1.6.3

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/dist/index.d.ts CHANGED
@@ -15,6 +15,7 @@ declare function base({
15
15
  declare function nodeLib({
16
16
  url,
17
17
  outputOptions,
18
+ entry,
18
19
  ...other
19
20
  }: CustomConfig): UserConfig;
20
21
  declare function webLib({
@@ -24,6 +25,7 @@ declare function webLib({
24
25
  declare function nodeCli({
25
26
  url,
26
27
  outputOptions,
28
+ entry,
27
29
  ...other
28
30
  }: CustomConfig): UserConfig;
29
31
  //#endregion
package/dist/index.js CHANGED
@@ -4,6 +4,11 @@ import { fileURLToPath } from "node:url";
4
4
  function isObject(obj) {
5
5
  return Object.prototype.toString.call(obj) === "[object Object]";
6
6
  }
7
+ function isSingleEntry(entry) {
8
+ if (Array.isArray(entry)) return entry.length === 1;
9
+ else if (isObject(entry)) return Object.keys(entry).length === 1;
10
+ else return true;
11
+ }
7
12
  function base({ url, entry, report, loader, outputOptions, ...other }) {
8
13
  return {
9
14
  entry: entry ?? fileURLToPath(new URL("index.ts", url)),
@@ -29,13 +34,14 @@ function base({ url, entry, report, loader, outputOptions, ...other }) {
29
34
  ...other
30
35
  };
31
36
  }
32
- function nodeLib({ url, outputOptions, ...other }) {
37
+ function nodeLib({ url, outputOptions, entry, ...other }) {
33
38
  return base({
39
+ entry,
34
40
  platform: "node",
35
41
  sourcemap: false,
36
42
  minify: false,
37
43
  outputOptions: {
38
- inlineDynamicImports: true,
44
+ ...isSingleEntry(entry) && { inlineDynamicImports: true },
39
45
  ...outputOptions
40
46
  },
41
47
  url,
@@ -52,13 +58,14 @@ function webLib({ url, ...other }) {
52
58
  ...other
53
59
  });
54
60
  }
55
- function nodeCli({ url, outputOptions, ...other }) {
61
+ function nodeCli({ url, outputOptions, entry, ...other }) {
56
62
  return nodeLib({
63
+ entry,
57
64
  platform: "node",
58
65
  sourcemap: false,
59
66
  minify: true,
60
67
  outputOptions: {
61
- inlineDynamicImports: true,
68
+ ...isSingleEntry(entry) && { inlineDynamicImports: true },
62
69
  ...outputOptions
63
70
  },
64
71
  url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown-config-silverwind",
3
- "version": "1.6.1",
3
+ "version": "1.6.3",
4
4
  "description": "Shared tsdown configuration",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": "silverwind/tsdown-config-silverwind",
@@ -17,16 +17,16 @@
17
17
  "node": ">=20"
18
18
  },
19
19
  "devDependencies": {
20
- "@types/node": "24.10.1",
21
- "@typescript/native-preview": "7.0.0-dev.20251204.1",
22
- "eslint": "9.39.1",
23
- "eslint-config-silverwind": "112.1.0",
24
- "tsdown": "0.17.0-beta.6",
20
+ "@types/node": "25.0.6",
21
+ "@typescript/native-preview": "7.0.0-dev.20260112.1",
22
+ "eslint": "9.39.2",
23
+ "eslint-config-silverwind": "115.0.3",
24
+ "tsdown": "0.19.0",
25
25
  "typescript": "5.9.3",
26
26
  "typescript-config-silverwind": "14.0.0",
27
- "updates": "17.0.2",
27
+ "updates": "17.0.7",
28
28
  "versions": "14.0.3",
29
- "vitest": "4.0.15",
30
- "vitest-config-silverwind": "10.4.2"
29
+ "vitest": "4.0.16",
30
+ "vitest-config-silverwind": "10.5.0"
31
31
  }
32
32
  }