tsdown-config-silverwind 4.1.4 → 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 +2 -3
- package/dist/index.js +6 -4
- package/package.json +4 -5
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
|
-
|
|
9
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { fileURLToPath } from "node:url";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// index.ts
|
|
4
4
|
function isObject(obj) {
|
|
5
5
|
return Object.prototype.toString.call(obj) === "[object Object]";
|
|
6
6
|
}
|
|
@@ -18,7 +18,7 @@ function isSingleEntry(entry) {
|
|
|
18
18
|
return keys.length === 1 && !keys[0].includes("*");
|
|
19
19
|
} else return typeof entry !== "string" || !/[*?(]|\[.*\]|\{[^}]*(?:,|\.\.)/.test(entry);
|
|
20
20
|
}
|
|
21
|
-
function base({ url, entry, report, loader, outputOptions, deps, checks, ...other }) {
|
|
21
|
+
function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ...other }) {
|
|
22
22
|
return {
|
|
23
23
|
entry: entry ?? fileURLToPath(new URL("index.ts", url)),
|
|
24
24
|
report: typeof report === "boolean" || typeof report === "string" ? report : {
|
|
@@ -42,7 +42,10 @@ function base({ url, entry, report, loader, outputOptions, deps, checks, ...othe
|
|
|
42
42
|
...checks
|
|
43
43
|
},
|
|
44
44
|
globImport: false,
|
|
45
|
-
dts:
|
|
45
|
+
dts: dts !== false && {
|
|
46
|
+
generator: "oxc",
|
|
47
|
+
...isObject(dts) && dts
|
|
48
|
+
},
|
|
46
49
|
deps: {
|
|
47
50
|
onlyBundle: false,
|
|
48
51
|
...deps
|
|
@@ -75,5 +78,4 @@ function nodeCli(config) {
|
|
|
75
78
|
});
|
|
76
79
|
}
|
|
77
80
|
|
|
78
|
-
//#endregion
|
|
79
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.
|
|
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": "
|
|
30
|
-
"tsdown": "0.23.
|
|
31
|
-
"typescript": "
|
|
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",
|