tsdown-config-silverwind 4.1.3 → 4.2.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.
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
1
1
  import { UserConfig } from "tsdown";
2
- //#region index.d.ts
3
2
  type CustomConfig = UserConfig & {
4
3
  url: string;
5
4
  };
6
- export declare function base({ url, entry, report, loader, outputOptions, deps, checks, ...other }: CustomConfig): UserConfig;
5
+ export declare function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ...other }: CustomConfig): UserConfig;
7
6
  export declare function nodeLib({ url, entry, outputOptions, ...other }: CustomConfig): UserConfig;
8
7
  export declare function webLib(config: CustomConfig): UserConfig;
9
8
  export declare function nodeCli(config: CustomConfig): UserConfig;
10
- //#endregion
9
+ export {};
package/dist/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import { fileURLToPath } from "node:url";
2
2
 
3
- //#region index.ts
4
- const suppressWarnings = ["TypeScript 7.0 does not yet have a stable API"];
3
+ // index.ts
5
4
  function isObject(obj) {
6
5
  return Object.prototype.toString.call(obj) === "[object Object]";
7
6
  }
@@ -19,7 +18,7 @@ function isSingleEntry(entry) {
19
18
  return keys.length === 1 && !keys[0].includes("*");
20
19
  } else return typeof entry !== "string" || !/[*?(]|\[.*\]|\{[^}]*(?:,|\.\.)/.test(entry);
21
20
  }
22
- function base({ url, entry, report, loader, outputOptions, deps, checks, ...other }) {
21
+ function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ...other }) {
23
22
  return {
24
23
  entry: entry ?? fileURLToPath(new URL("index.ts", url)),
25
24
  report: typeof report === "boolean" || typeof report === "string" ? report : {
@@ -37,14 +36,16 @@ function base({ url, entry, report, loader, outputOptions, deps, checks, ...othe
37
36
  outputOptions: mergeOutputOptions({ comments: { legal: false } }, outputOptions),
38
37
  fixedExtension: false,
39
38
  failOnWarn: true,
40
- suppressWarnings,
41
39
  checks: {
42
40
  pluginTimings: false,
43
41
  moduleLevelDirective: false,
44
42
  ...checks
45
43
  },
46
44
  globImport: false,
47
- dts: { generator: "tsgo" },
45
+ dts: dts !== false && {
46
+ generator: "oxc",
47
+ ...isObject(dts) && dts
48
+ },
48
49
  deps: {
49
50
  onlyBundle: false,
50
51
  ...deps
@@ -77,5 +78,4 @@ function nodeCli(config) {
77
78
  });
78
79
  }
79
80
 
80
- //#endregion
81
81
  export { base, nodeCli, nodeLib, webLib };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tsdown-config-silverwind",
3
- "version": "4.1.3",
3
+ "version": "4.2.0",
4
4
  "description": "Shared tsdown configuration",
5
5
  "author": "silverwind <me@silverwind.io>",
6
6
  "repository": {
@@ -24,11 +24,10 @@
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "26.6.3",
27
- "@typescript/native-preview": "7.0.0-dev.20260707.2",
28
27
  "eslint": "10.11.0",
29
- "eslint-config-silverwind": "151.0.1",
30
- "tsdown": "0.23.0",
31
- "typescript": "6.0.3",
28
+ "eslint-config-silverwind": "155.2.0",
29
+ "tsdown": "0.23.4",
30
+ "typescript": "7.0.2",
32
31
  "typescript-config-silverwind": "21.0.1",
33
32
  "updates": "19.0.2",
34
33
  "updates-config-silverwind": "4.0.7",