@sanity/tsdown-config 0.0.2 → 0.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.
|
@@ -2,10 +2,15 @@ import { UserConfig } from "tsdown";
|
|
|
2
2
|
/**
|
|
3
3
|
* @public
|
|
4
4
|
*/
|
|
5
|
-
interface PackageOptions extends Pick<UserConfig, "tsconfig" | "entry" | "format"> {
|
|
5
|
+
interface PackageOptions extends Pick<UserConfig, "tsconfig" | "entry" | "format"> {
|
|
6
|
+
/**
|
|
7
|
+
* @defaultValue 'neutral'
|
|
8
|
+
*/
|
|
9
|
+
platform?: UserConfig["platform"];
|
|
10
|
+
}
|
|
6
11
|
/**
|
|
7
12
|
* @public
|
|
8
13
|
*/
|
|
9
14
|
declare function defineConfig(options?: PackageOptions): UserConfig;
|
|
10
15
|
export { PackageOptions, defineConfig };
|
|
11
|
-
//# sourceMappingURL=index.d.
|
|
16
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;AAKA;;AAIa,UAJI,cAAA,SAAuB,IAI3B,CAJgC,UAIhC,EAAA,UAAA,GAAA,OAAA,GAAA,QAAA,CAAA,CAAA;EAJ2B;;AAUxC;aANa;;;;;iBAMG,YAAA,WAAsB,iBAAsB"}
|
|
@@ -5,15 +5,18 @@ import { defineConfig as defineConfig$1 } from "tsdown";
|
|
|
5
5
|
*/
|
|
6
6
|
function defineConfig(options = {}) {
|
|
7
7
|
return defineConfig$1({
|
|
8
|
-
sourcemap: true,
|
|
9
8
|
tsconfig: options.tsconfig ?? "tsconfig.json",
|
|
10
|
-
platform: "neutral",
|
|
9
|
+
platform: options.platform ?? "neutral",
|
|
11
10
|
report: { gzip: false },
|
|
12
11
|
publint: true,
|
|
13
12
|
format: options.format ?? "esm",
|
|
14
|
-
inputOptions: { experimental: { attachDebugInfo: "none" } }
|
|
13
|
+
inputOptions: { experimental: { attachDebugInfo: "none" } },
|
|
14
|
+
exports: {
|
|
15
|
+
enabled: "local-only",
|
|
16
|
+
devExports: "source"
|
|
17
|
+
}
|
|
15
18
|
});
|
|
16
19
|
}
|
|
17
20
|
|
|
18
21
|
export { defineConfig };
|
|
19
|
-
//# sourceMappingURL=index.
|
|
22
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["defineTsdownConfig"],"sources":["../src/index.ts"],"sourcesContent":["import {defineConfig as defineTsdownConfig, type UserConfig} from 'tsdown'\n\n/**\n * @public\n */\nexport interface PackageOptions extends Pick<UserConfig, 'tsconfig' | 'entry' | 'format'> {\n /**\n * @defaultValue 'neutral'\n */\n platform?: UserConfig['platform']\n}\n\n/**\n * @public\n */\nexport function defineConfig(options: PackageOptions = {}): UserConfig {\n return defineTsdownConfig({\n tsconfig: options.tsconfig ?? 'tsconfig.json',\n platform: options.platform ?? 'neutral',\n report: {gzip: false},\n publint: true,\n format: options.format ?? 'esm',\n inputOptions: {experimental: {attachDebugInfo: 'none'}},\n exports: {\n enabled: 'local-only',\n devExports: 'source',\n },\n })\n}\n"],"mappings":";;;;;AAeA,SAAgB,aAAa,UAA0B,EAAE,EAAc;AACrE,QAAOA,eAAmB;EACxB,UAAU,QAAQ,YAAY;EAC9B,UAAU,QAAQ,YAAY;EAC9B,QAAQ,EAAC,MAAM,OAAM;EACrB,SAAS;EACT,QAAQ,QAAQ,UAAU;EAC1B,cAAc,EAAC,cAAc,EAAC,iBAAiB,QAAO,EAAC;EACvD,SAAS;GACP,SAAS;GACT,YAAY;GACb;EACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sanity/tsdown-config",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Shared configuration for tsdown",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity-io",
|
|
@@ -27,11 +27,12 @@
|
|
|
27
27
|
"sideEffects": false,
|
|
28
28
|
"type": "module",
|
|
29
29
|
"exports": {
|
|
30
|
-
".": "./dist/index.
|
|
30
|
+
".": "./dist/index.mjs",
|
|
31
31
|
"./package.json": "./package.json"
|
|
32
32
|
},
|
|
33
|
-
"main": "./dist/index.
|
|
34
|
-
"
|
|
33
|
+
"main": "./dist/index.mjs",
|
|
34
|
+
"module": "./dist/index.mjs",
|
|
35
|
+
"types": "./dist/index.d.mts",
|
|
35
36
|
"files": [
|
|
36
37
|
"dist"
|
|
37
38
|
],
|
|
@@ -40,10 +41,12 @@
|
|
|
40
41
|
},
|
|
41
42
|
"devDependencies": {
|
|
42
43
|
"@typescript/native-preview": "7.0.0-dev.20251129.1",
|
|
44
|
+
"tinyexec": "^1.0.2",
|
|
43
45
|
"tsdown": "^0.16.8",
|
|
44
46
|
"typescript": "5.9.3",
|
|
45
47
|
"vitest": "^4.0.14",
|
|
46
|
-
"@sanity/pkg-utils": "
|
|
48
|
+
"@sanity/pkg-utils": "^10.1.0",
|
|
49
|
+
"@sanity/tsconfig": "^2.0.0"
|
|
47
50
|
},
|
|
48
51
|
"peerDependencies": {
|
|
49
52
|
"tsdown": "^0.16.8",
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
},
|
|
58
61
|
"scripts": {
|
|
59
62
|
"build": "tsdown",
|
|
63
|
+
"test": "vitest run",
|
|
60
64
|
"typecheck": "tsc --build"
|
|
61
65
|
}
|
|
62
66
|
}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["defineTsdownConfig"],"sources":["../src/index.ts"],"sourcesContent":["import {defineConfig as defineTsdownConfig, type UserConfig} from 'tsdown'\n\n/**\n * @public\n */\nexport interface PackageOptions extends Pick<UserConfig, 'tsconfig' | 'entry' | 'format'> {}\n\n/**\n * @public\n */\nexport function defineConfig(options: PackageOptions = {}): UserConfig {\n return defineTsdownConfig({\n // @TODO add declarationMap: true to tsconfig presets\n sourcemap: true,\n tsconfig: options.tsconfig ?? 'tsconfig.json',\n platform: 'neutral',\n report: {gzip: false},\n publint: true,\n format: options.format ?? 'esm',\n inputOptions: {experimental: {attachDebugInfo: 'none'}},\n })\n}\n"],"mappings":";;;;;AAUA,SAAgB,aAAa,UAA0B,EAAE,EAAc;AACrE,QAAOA,eAAmB;EAExB,WAAW;EACX,UAAU,QAAQ,YAAY;EAC9B,UAAU;EACV,QAAQ,EAAC,MAAM,OAAM;EACrB,SAAS;EACT,QAAQ,QAAQ,UAAU;EAC1B,cAAc,EAAC,cAAc,EAAC,iBAAiB,QAAO,EAAC;EACxD,CAAC"}
|