@sanity/tsdown-config 0.6.0 → 0.7.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.
@@ -1 +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 const {entry} = options\n const tsconfig = options.tsconfig ?? 'tsconfig.json'\n const platform = options.platform ?? 'neutral'\n const report = {gzip: false} as const satisfies UserConfig['report']\n const publint = true\n const hash = false\n const format = options.format ?? 'esm'\n const inputOptions = {\n preserveEntrySignatures: 'strict',\n experimental: {attachDebugInfo: 'none'},\n } as const satisfies UserConfig['inputOptions']\n const outputOptions = {\n hoistTransitiveImports: false,\n } as const satisfies UserConfig['outputOptions']\n const exports = {\n enabled: 'local-only',\n // @TODO use @sanity/parse-package-json to determine if devExports should be `true` or `source`\n devExports: true,\n } as const satisfies UserConfig['exports']\n\n return defineTsdownConfig({\n entry,\n exports,\n format,\n hash,\n inputOptions,\n outputOptions,\n platform,\n publint,\n report,\n tsconfig,\n minify: {compress: true, codegen: false, mangle: false},\n treeshake: {\n annotations: true,\n propertyReadSideEffects: false,\n moduleSideEffects: [\n // If the module ends with `.css` it is considered to be a side effect, even if the module is marked as no side effect,\n {test: /\\.css$/, sideEffects: true},\n // This is the equivalent of `moduleSideEffects: 'no-external'`, and included here so it works the same as before the CSS exemption were added.\n {external: true, sideEffects: false},\n ],\n },\n })\n}\n"],"mappings":";;;;AAeA,SAAgB,aAAa,UAA0B,EAAE,EAAc;CACrE,IAAM,EAAC,UAAS;AAoBhB,QAAOA,eAAmB;EACxB;EACA,SARc;GACd,SAAS;GAET,YAAY;GACb;EAKC,QAjBa,QAAQ,UAAU;EAkB/B,MAnBW;EAoBX,cAlBmB;GACnB,yBAAyB;GACzB,cAAc,EAAC,iBAAiB,QAAO;GACxC;EAgBC,eAfoB,EACpB,wBAAwB,IACzB;EAcC,UAzBe,QAAQ,YAAY;EA0BnC,SAxBc;EAyBd,QA1Ba,EAAC,MAAM,IAAM;EA2B1B,UA7Be,QAAQ,YAAY;EA8BnC,QAAQ;GAAC,UAAU;GAAM,SAAS;GAAO,QAAQ;GAAM;EACvD,WAAW;GACT,aAAa;GACb,yBAAyB;GACzB,mBAAmB,CAEjB;IAAC,MAAM;IAAU,aAAa;IAAK,EAEnC;IAAC,UAAU;IAAM,aAAa;IAAM,CACrC;GACF;EACF,CAAC"}
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 const {entry} = options\n const tsconfig = options.tsconfig ?? 'tsconfig.json'\n const platform = options.platform ?? 'neutral'\n const report = {gzip: false} as const satisfies UserConfig['report']\n const publint = true\n const hash = false\n const format = options.format ?? 'esm'\n const inputOptions = {\n preserveEntrySignatures: 'strict',\n experimental: {attachDebugInfo: 'none'},\n } as const satisfies UserConfig['inputOptions']\n const outputOptions = {\n hoistTransitiveImports: false,\n } as const satisfies UserConfig['outputOptions']\n const exports = {\n enabled: 'local-only',\n // @TODO use @sanity/parse-package-json to determine if devExports should be `true` or `source`\n devExports: true,\n } as const satisfies UserConfig['exports']\n\n return defineTsdownConfig({\n entry,\n exports,\n format,\n hash,\n inputOptions,\n outputOptions,\n platform,\n publint,\n report,\n tsconfig,\n minify: {compress: true, codegen: false, mangle: false},\n treeshake: {\n annotations: true,\n propertyReadSideEffects: false,\n moduleSideEffects: [\n // If the module ends with `.css` it is considered to be a side effect, even if the module is marked as no side effect,\n {test: /\\.css$/, sideEffects: true},\n // This is the equivalent of `moduleSideEffects: 'no-external'`, and included here so it works the same as before the CSS exemption were added.\n {external: true, sideEffects: false},\n ],\n },\n })\n}\n"],"mappings":";;;;AAeA,SAAgB,aAAa,UAA0B,CAAC,GAAe;CACrE,IAAM,EAAC,UAAS;CAoBhB,OAAOA,eAAmB;EACxB;EACA,SAAA;GAPA,SAAS;GAET,YAAY;EAKN;EACN,QAjBa,QAAQ,UAAU;EAkB/B,MAAA;EACA,cAAA;GAjBA,yBAAyB;GACzB,cAAc,EAAC,iBAAiB,OAAM;EAgB3B;EACX,eAAA,EAdA,wBAAwB,GAcZ;EACZ,UAzBe,QAAQ,YAAY;EA0BnC,SAAA;EACA,QAAA,EA1Bc,MAAM,GA0Bf;EACL,UA7Be,QAAQ,YAAY;EA8BnC,QAAQ;GAAC,UAAU;GAAM,SAAS;GAAO,QAAQ;EAAK;EACtD,WAAW;GACT,aAAa;GACb,yBAAyB;GACzB,mBAAmB,CAEjB;IAAC,MAAM;IAAU,aAAa;GAAI,GAElC;IAAC,UAAU;IAAM,aAAa;GAAK,CACrC;EACF;CACF,CAAC;AACH"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanity/tsdown-config",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Shared configuration for tsdown",
5
5
  "keywords": [
6
6
  "sanity-io",
@@ -37,20 +37,20 @@
37
37
  "dist"
38
38
  ],
39
39
  "dependencies": {
40
- "publint": "^0.3.18",
41
- "@sanity/parse-package-json": "^2.1.3"
40
+ "publint": "^0.3.21",
41
+ "@sanity/parse-package-json": "^2.1.5"
42
42
  },
43
43
  "devDependencies": {
44
- "@typescript/native-preview": "7.0.0-dev.20260417.1",
45
- "tinyexec": "^1.1.1",
46
- "tsdown": "^0.21.9",
44
+ "@typescript/native-preview": "7.0.0-dev.20260421.2",
45
+ "tinyexec": "^1.2.2",
46
+ "tsdown": "^0.22.0",
47
47
  "typescript": "6.0.3",
48
- "vitest": "^4.1.4",
49
- "@sanity/pkg-utils": "^10.4.16",
48
+ "vitest": "^4.1.7",
49
+ "@sanity/pkg-utils": "^10.5.1",
50
50
  "@sanity/tsconfig": "^2.1.0"
51
51
  },
52
52
  "peerDependencies": {
53
- "tsdown": "0.21.x",
53
+ "tsdown": "0.22.x",
54
54
  "typescript": "5.8.x || 5.9.x || 6.0.x"
55
55
  },
56
56
  "engines": {