tsdown-config-silverwind 4.2.1 → 4.3.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.js +8 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -19,11 +19,14 @@ function isSingleEntry(entry) {
|
|
|
19
19
|
return keys.length === 1 && !keys[0].includes("*");
|
|
20
20
|
} else return typeof entry !== "string" || !/[*?(]|\[.*\]|\{[^}]*(?:,|\.\.)/.test(entry);
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function dtsGenerator(url) {
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
const [major, minor] = createRequire(url)("typescript/package.json").version.split(".").map(Number);
|
|
25
|
+
if (major < 7) return "tsc";
|
|
26
|
+
if (major === 7 && minor === 0) return "oxc";
|
|
27
|
+
return "tsgo";
|
|
25
28
|
} catch {
|
|
26
|
-
return
|
|
29
|
+
return "oxc";
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ...other }) {
|
|
@@ -44,6 +47,7 @@ function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ..
|
|
|
44
47
|
outputOptions: mergeOutputOptions({ comments: { legal: false } }, outputOptions),
|
|
45
48
|
fixedExtension: false,
|
|
46
49
|
failOnWarn: true,
|
|
50
|
+
suppressWarnings: /^TypeScript Go is experimental/,
|
|
47
51
|
checks: {
|
|
48
52
|
pluginTimings: false,
|
|
49
53
|
moduleLevelDirective: false,
|
|
@@ -51,7 +55,7 @@ function base({ url, entry, report, loader, outputOptions, deps, checks, dts, ..
|
|
|
51
55
|
},
|
|
52
56
|
globImport: false,
|
|
53
57
|
dts: dts !== false && {
|
|
54
|
-
generator:
|
|
58
|
+
generator: dtsGenerator(url),
|
|
55
59
|
...isObject(dts) && dts
|
|
56
60
|
},
|
|
57
61
|
deps: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown-config-silverwind",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Shared tsdown configuration",
|
|
5
5
|
"author": "silverwind <me@silverwind.io>",
|
|
6
6
|
"repository": {
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"@types/node": "26.6.6",
|
|
27
27
|
"eslint": "10.14.0",
|
|
28
28
|
"eslint-config-silverwind": "155.2.0",
|
|
29
|
-
"tsdown": "0.23.
|
|
29
|
+
"tsdown": "0.23.5",
|
|
30
30
|
"typescript": "7.0.2",
|
|
31
31
|
"typescript-config-silverwind": "21.0.2",
|
|
32
32
|
"updates": "20.0.0",
|
|
33
33
|
"updates-config-silverwind": "4.1.0",
|
|
34
34
|
"versions": "15.5.2",
|
|
35
|
-
"vitest": "5.0
|
|
36
|
-
"vitest-config-silverwind": "
|
|
35
|
+
"vitest": "5.1.0",
|
|
36
|
+
"vitest-config-silverwind": "13.0.0"
|
|
37
37
|
}
|
|
38
38
|
}
|