tsdown-preset-sxzz 0.3.0 → 0.3.2
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.mjs +16 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import process from "node:process";
|
|
1
3
|
import { mergeConfig } from "tsdown/config";
|
|
2
4
|
|
|
5
|
+
//#region \0rolldown/runtime.js
|
|
6
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
3
9
|
//#region src/index.ts
|
|
10
|
+
const resolveOpts = { paths: [process.cwd()] };
|
|
11
|
+
function isInstalled(pkg) {
|
|
12
|
+
try {
|
|
13
|
+
__require.resolve(pkg, resolveOpts);
|
|
14
|
+
return true;
|
|
15
|
+
} catch {
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
4
19
|
function lib({ entry = "index", inlineDeps = [] } = {}, overrides = {}) {
|
|
5
20
|
return mergeConfig({
|
|
6
21
|
entry: entry === "index" ? "src/index.ts" : entry === "shallow" ? "src/*.ts" : entry === "all" ? "src/**/*.ts" : entry,
|
|
7
|
-
dts:
|
|
22
|
+
dts: { tsgo: isInstalled("@typescript/native-preview") },
|
|
8
23
|
platform: "neutral",
|
|
9
24
|
inlineOnly: inlineDeps,
|
|
10
25
|
exports: true,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tsdown-preset-sxzz",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.2",
|
|
5
5
|
"description": "An opinionated preset for tsdown.",
|
|
6
6
|
"author": "Kevin Deng <sxzz@sxzz.moe>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
"node": ">=20.19.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
|
-
"tsdown": "^0.20.0
|
|
32
|
+
"tsdown": "^0.20.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@arethetypeswrong/core": "^0.18.2",
|
|
36
|
-
"publint": "^0.3.
|
|
36
|
+
"publint": "^0.3.17"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@sxzz/eslint-config": "^7.
|
|
40
|
-
"@sxzz/prettier-config": "^2.
|
|
41
|
-
"@types/node": "^25.0
|
|
42
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
39
|
+
"@sxzz/eslint-config": "^7.6.0",
|
|
40
|
+
"@sxzz/prettier-config": "^2.3.1",
|
|
41
|
+
"@types/node": "^25.2.0",
|
|
42
|
+
"@typescript/native-preview": "7.0.0-dev.20260204.1",
|
|
43
43
|
"bumpp": "^10.4.0",
|
|
44
44
|
"eslint": "^9.39.2",
|
|
45
|
-
"prettier": "^3.8.
|
|
46
|
-
"tsdown": "^0.20.
|
|
45
|
+
"prettier": "^3.8.1",
|
|
46
|
+
"tsdown": "^0.20.2",
|
|
47
47
|
"typescript": "^5.9.3"
|
|
48
48
|
},
|
|
49
49
|
"prettier": "@sxzz/prettier-config",
|