You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#325033e7b93 Thanks @stipsan! - Move the conditional CSS export from inject.nodeCompat to exports.nodeCompat, and give @tsdown/css output the same treatment.
nodeCompat configures how the CSS file is published, not how the import is injected, so it moves to a dedicated exports option. inject and exports are now independent: inject prepends an import of the CSS to entry chunks, while exports publishes it as the ./<fileName> export subpath (which also makes any injected import self-referential). exports: true declares a plain string export for browser-only packages; exports: {nodeCompat: true} declares the conditional export and emits the no-op JS shim plus its .d.ts. inject: {nodeCompat: true} keeps working, normalized to {inject: true, exports: {nodeCompat: true}} with a deprecation warning; an explicit exports wins over it.
@sanity/tsdown-config gains a css.exports option implementing the same pattern on top of @tsdown/css (an optional peer dependency), which compiles CSS but has no node-shim concept of its own — its inject emits a relative import that throws in runtimes that cannot load .css files.
@sanity/pkg-utils gains a css option, and builds a .css export subpath that declares a source:
pkg build compiles it to dist/ui/styles.css with the same minify and lowering settings vanillaExtract gets, emits the shim, and fills in the types/browser/style/node/default conditions. @sanity/parse-package-json exposes the new parseCssExports for reading those subpaths, and parseExports no longer returns them as JS entries.
#3253bc16006 Thanks @stipsan! - Suppress CIRCULAR_DEPENDENCY warnings from the declaration bundling pass by default, and add a suppressWarnings option.
defineConfig enables Rolldown's checks.circularDependency, which also reports cycles between the emitted .d.ts modules. Those imports are type-only and erased at runtime, so the cycles carry none of the hazards the check exists to surface, and they're unavoidable for mutually referencing public types — in sanity-io/sanity#13753 109 of 136 cycle warnings were declaration-only, drowning out the 27 real ones. The config now sets tsdown's suppressWarnings to drop warnings whose entire cycle consists of declaration files (.d.ts/.d.mts/.d.cts); a cycle that includes even one runtime module still warns. Consumers that filtered these out themselves (like @repo/tsdown.config in sanity-io/sanity) can drop their own predicate.
The new suppressWarnings option takes tsdown's own value shapes (strings matched with includes, regular expressions matched with test, or a predicate) and is OR'd with the built-in suppression, so per-package suppressions can't silently undo it. Merging suppressWarnings over the returned config still replaces the default entirely (mergeConfig replaces functions), which is the escape hatch for restoring every warning: mergeConfig(await defineConfig(), {suppressWarnings: () => false}).
tsdown added suppressWarnings in 0.22.7, so the tsdown peer range is raised from ^0.22.5 to ^0.22.7. On 0.22.5/0.22.6 the option is silently ignored (the cycle warnings keep appearing) and the UserConfig['suppressWarnings'] indexed access in the published declarations does not resolve.
#3246c1106f1 Thanks @stipsan! - Move the tsdoc feature (API Extractor TSDoc/release-tag checking) from @sanity/pkg-utils into @sanity/tsdown-config.
In @sanity/tsdown-config the option is false by default; set tsdoc: true (or an options object) to run the check after the build via tsdown's build:done hook. The checker lives at @sanity/tsdown-config/tsdoc and is lazy-loaded from the root config, so API Extractor is not part of the default entry's module graph. @sanity/pkg-utils continues enabling it by default (tsdoc: true) when composing the config, and still runs it during pkg check via checkTsdoc from @sanity/tsdown-config/tsdoc.
#3238e19e63e Thanks @stipsan! - Default exports.enabled to true instead of 'local-only'.
Gating on CI via 'local-only'/'ci-only' surprised environments that set CI=true without meaning "don't rewrite package.json" (notably Cursor Cloud and GitHub Copilot)
#3221125080f Thanks @stipsan! - Make defineConfig a composable base for programmatic hosts (like the upcoming tsdown-powered @sanity/pkg-utils):
New cwd option: forwarded to tsdown's own cwd, and used for the package-manager detection behind the devExports default instead of process.cwd() — so builds driven programmatically for a package in another directory resolve the right defaults.
Package-manager detection only runs when it can affect the outcome: it exists solely to decide the pnpm-gated devExports: true default, so it is skipped when the userland exports value replaces the defaults (false, true, a bare CI condition) or sets devExports explicitly. Explicit configs behave identically across package managers, with no filesystem probing.
The composition contract is now documented and covered by tests: defineConfig() output is a mergeConfig-safe base — plugins append (never clobbering the React Compiler / vanilla-extract plugins this config sets up), plain objects deep-merge, and scalars/non-plugin arrays replace.
Node 20 support is dropped: engines.node is now ^22.18.0 || >=24.11.0, matching tsdown's own requirement. The previous >=20.19 <22 range was unachievable in practice — this package only executes inside tsdown's process, which already requires Node ^22.18.0.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
squiggler-appBot
changed the title
fix(deps): update dependency @sanity/tsdown-config to ^0.21.3
fix(deps): update dependency @sanity/tsdown-config to ^0.22.0
Aug 5, 2026
squiggler-appBot
changed the title
fix(deps): update dependency @sanity/tsdown-config to ^0.22.0
fix(deps): update dependency @sanity/tsdown-config to ^0.23.0
Aug 5, 2026
squiggler-appBot
changed the title
fix(deps): update dependency @sanity/tsdown-config to ^0.23.0
fix(deps): update dependency @sanity/tsdown-config to ^0.24.0
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^0.21.2→^0.24.0Release Notes
sanity-io/pkg-utils (@sanity/tsdown-config)
v0.24.0Compare Source
Minor Changes
#3250
33e7b93Thanks @stipsan! - Move the conditional CSS export frominject.nodeCompattoexports.nodeCompat, and give@tsdown/cssoutput the same treatment.nodeCompatconfigures how the CSS file is published, not how the import is injected, so it moves to a dedicatedexportsoption.injectandexportsare now independent:injectprepends an import of the CSS to entry chunks, whileexportspublishes it as the./<fileName>export subpath (which also makes any injected import self-referential).exports: truedeclares a plain string export for browser-only packages;exports: {nodeCompat: true}declares the conditional export and emits the no-op JS shim plus its.d.ts.inject: {nodeCompat: true}keeps working, normalized to{inject: true, exports: {nodeCompat: true}}with a deprecation warning; an explicitexportswins over it.@sanity/tsdown-configgains acss.exportsoption implementing the same pattern on top of@tsdown/css(an optional peer dependency), which compiles CSS but has no node-shim concept of its own — itsinjectemits a relative import that throws in runtimes that cannot load.cssfiles.@sanity/pkg-utilsgains acssoption, and builds a.cssexport subpath that declares asource:pkg buildcompiles it todist/ui/styles.csswith the same minify and lowering settingsvanillaExtractgets, emits the shim, and fills in thetypes/browser/style/node/defaultconditions.@sanity/parse-package-jsonexposes the newparseCssExportsfor reading those subpaths, andparseExportsno longer returns them as JS entries.#3253
bc16006Thanks @stipsan! - SuppressCIRCULAR_DEPENDENCYwarnings from the declaration bundling pass by default, and add asuppressWarningsoption.defineConfigenables Rolldown'schecks.circularDependency, which also reports cycles between the emitted.d.tsmodules. Those imports are type-only and erased at runtime, so the cycles carry none of the hazards the check exists to surface, and they're unavoidable for mutually referencing public types — in sanity-io/sanity#13753 109 of 136 cycle warnings were declaration-only, drowning out the 27 real ones. The config now sets tsdown'ssuppressWarningsto drop warnings whose entire cycle consists of declaration files (.d.ts/.d.mts/.d.cts); a cycle that includes even one runtime module still warns. Consumers that filtered these out themselves (like@repo/tsdown.configinsanity-io/sanity) can drop their own predicate.The new
suppressWarningsoption takes tsdown's own value shapes (strings matched withincludes, regular expressions matched withtest, or a predicate) and is OR'd with the built-in suppression, so per-package suppressions can't silently undo it. MergingsuppressWarningsover the returned config still replaces the default entirely (mergeConfigreplaces functions), which is the escape hatch for restoring every warning:mergeConfig(await defineConfig(), {suppressWarnings: () => false}).tsdown added
suppressWarningsin0.22.7, so thetsdownpeer range is raised from^0.22.5to^0.22.7. On0.22.5/0.22.6the option is silently ignored (the cycle warnings keep appearing) and theUserConfig['suppressWarnings']indexed access in the published declarations does not resolve.#3246
c1106f1Thanks @stipsan! - Move thetsdocfeature (API Extractor TSDoc/release-tag checking) from@sanity/pkg-utilsinto@sanity/tsdown-config.In
@sanity/tsdown-configthe option isfalseby default; settsdoc: true(or an options object) to run the check after the build via tsdown'sbuild:donehook. The checker lives at@sanity/tsdown-config/tsdocand is lazy-loaded from the root config, so API Extractor is not part of the default entry's module graph.@sanity/pkg-utilscontinues enabling it by default (tsdoc: true) when composing the config, and still runs it duringpkg checkviacheckTsdocfrom@sanity/tsdown-config/tsdoc.Patch Changes
#3252
d952984Thanks @squiggler-app! - fix(deps): update dependency publint to ^0.3.23Updated dependencies [
33e7b93,d952984]:v0.23.0Compare Source
Minor Changes
#3238
e19e63eThanks @stipsan! - Defaultexports.enabledtotrueinstead of'local-only'.Gating on
CIvia'local-only'/'ci-only'surprised environments that setCI=truewithout meaning "don't rewrite package.json" (notably Cursor Cloud and GitHub Copilot)Patch Changes
v0.22.0Compare Source
Minor Changes
#3221
125080fThanks @stipsan! - MakedefineConfiga composable base for programmatic hosts (like the upcoming tsdown-powered@sanity/pkg-utils):cwdoption: forwarded to tsdown's owncwd, and used for the package-manager detection behind thedevExportsdefault instead ofprocess.cwd()— so builds driven programmatically for a package in another directory resolve the right defaults.devExports: truedefault, so it is skipped when the userlandexportsvalue replaces the defaults (false,true, a bare CI condition) or setsdevExportsexplicitly. Explicit configs behave identically across package managers, with no filesystem probing.defineConfig()output is amergeConfig-safe base —pluginsappend (never clobbering the React Compiler / vanilla-extract plugins this config sets up), plain objects deep-merge, and scalars/non-plugin arrays replace.engines.nodeis now^22.18.0 || >=24.11.0, matching tsdown's own requirement. The previous>=20.19 <22range was unachievable in practice — this package only executes inside tsdown's process, which already requires Node^22.18.0.Patch Changes
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate using a curated preset maintained by
. View repository job log here