@sanity/tsdown-config 0.1.0 → 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.ts.map
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"}
@@ -6,7 +6,7 @@ import { defineConfig as defineConfig$1 } from "tsdown";
6
6
  function defineConfig(options = {}) {
7
7
  return defineConfig$1({
8
8
  tsconfig: options.tsconfig ?? "tsconfig.json",
9
- platform: "neutral",
9
+ platform: options.platform ?? "neutral",
10
10
  report: { gzip: false },
11
11
  publint: true,
12
12
  format: options.format ?? "esm",
@@ -19,4 +19,4 @@ function defineConfig(options = {}) {
19
19
  }
20
20
 
21
21
  export { defineConfig };
22
- //# sourceMappingURL=index.js.map
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.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Shared configuration for tsdown",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -27,12 +27,12 @@
27
27
  "sideEffects": false,
28
28
  "type": "module",
29
29
  "exports": {
30
- ".": "./dist/index.js",
30
+ ".": "./dist/index.mjs",
31
31
  "./package.json": "./package.json"
32
32
  },
33
- "main": "./dist/index.js",
34
- "module": "./dist/index.js",
35
- "types": "./dist/index.d.ts",
33
+ "main": "./dist/index.mjs",
34
+ "module": "./dist/index.mjs",
35
+ "types": "./dist/index.d.mts",
36
36
  "files": [
37
37
  "dist"
38
38
  ],
@@ -45,8 +45,8 @@
45
45
  "tsdown": "^0.16.8",
46
46
  "typescript": "5.9.3",
47
47
  "vitest": "^4.0.14",
48
- "@sanity/pkg-utils": "10.0.0",
49
- "@sanity/tsconfig": "^1.0.0"
48
+ "@sanity/pkg-utils": "^10.1.0",
49
+ "@sanity/tsconfig": "^2.0.0"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "tsdown": "^0.16.8",
@@ -60,6 +60,7 @@
60
60
  },
61
61
  "scripts": {
62
62
  "build": "tsdown",
63
+ "test": "vitest run",
63
64
  "typecheck": "tsc --build"
64
65
  }
65
66
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/index.ts"],"sourcesContent":[],"mappings":";;AAKA;AAKA;UALiB,cAAA,SAAuB,KAAK;;;;iBAK7B,YAAA,WAAsB,iBAAsB"}
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 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 exports: {\n enabled: 'local-only',\n devExports: 'source',\n },\n })\n}\n"],"mappings":";;;;;AAUA,SAAgB,aAAa,UAA0B,EAAE,EAAc;AACrE,QAAOA,eAAmB;EACxB,UAAU,QAAQ,YAAY;EAC9B,UAAU;EACV,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"}