@savvy-web/tsdown-plugins 2.7.4 → 2.7.6

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.
@@ -158,8 +158,9 @@ async function buildTargetGroups(options) {
158
158
  }));
159
159
  const dtsNeverBundle = [...partExternals ?? [], ...partDtsExternals ?? []];
160
160
  if (options.emitDts === false || Object.keys(dts.entry).length === 0) continue;
161
- const dtsDeps = dtsNeverBundle.length > 0 || dts.bundledPackages ? { deps: {
161
+ const dtsDeps = dtsNeverBundle.length > 0 || dts.bundledPackages || partBundle?.length ? { deps: {
162
162
  ...dtsNeverBundle.length > 0 ? { neverBundle: dtsNeverBundle } : {},
163
+ ...partBundle?.length ? { alwaysBundle: partBundle } : {},
163
164
  ...dts.bundledPackages ? partBundleNodeModules ? { dts: { alwaysBundle: dts.bundledPackages } } : {
164
165
  neverBundle: true,
165
166
  dts: { alwaysBundle: dts.bundledPackages }
@@ -259,8 +260,9 @@ async function buildTargetGroups(options) {
259
260
  define: decl.define,
260
261
  ...timingChecks,
261
262
  logLevel: "silent",
262
- ...dtsNeverBundle.length > 0 || decl.bundledPackages ? { deps: {
263
+ ...dtsNeverBundle.length > 0 || decl.bundledPackages || partBundle?.length ? { deps: {
263
264
  ...dtsNeverBundle.length > 0 ? { neverBundle: dtsNeverBundle } : {},
265
+ ...partBundle?.length ? { alwaysBundle: partBundle } : {},
264
266
  ...decl.bundledPackages ? partBundleNodeModules ? { dts: { alwaysBundle: decl.bundledPackages } } : {
265
267
  neverBundle: true,
266
268
  dts: { alwaysBundle: decl.bundledPackages }
package/index.d.ts CHANGED
@@ -568,7 +568,10 @@ interface BuildTargetGroupsOptions {
568
568
  /**
569
569
  * Force-bundle (inline) these packages into the JS output (tsdown `deps.alwaysBundle`),
570
570
  * even declared deps that would otherwise be auto-externalized. The inverse of
571
- * `externals`. JS pass only.
571
+ * `externals`. Forwarded to the JS pass AND, identically, to the dts pass and the
572
+ * prod-only per-module declarations pass — the dts pass RE-EMITS the dual-format `.cjs`
573
+ * chunk (see `buildTargetGroups`'s class doc), so a force-bundled dependency must stay
574
+ * inlined there too, or the re-emitted `.cjs` re-externalizes it.
572
575
  */
573
576
  readonly bundle?: ReadonlyArray<string> | undefined;
574
577
  /** Output formats to emit. Defaults to esm-only when unset. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/tsdown-plugins",
3
- "version": "2.7.4",
3
+ "version": "2.7.6",
4
4
  "private": false,
5
5
  "description": "Interface-only tsdown/rolldown plugin pack powering @savvy-web/bundler",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/tsdown-plugins",
@@ -33,8 +33,8 @@
33
33
  "@effect/platform-node": "4.0.0-rc.115",
34
34
  "@effected/npm": "^0.14.0",
35
35
  "@effected/package-json": "^0.15.0",
36
- "@effected/tsconfig-json": "^0.9.0",
37
- "@effected/workspaces": "^0.21.0",
36
+ "@effected/tsconfig-json": "^0.9.1",
37
+ "@effected/workspaces": "^0.21.1",
38
38
  "@microsoft/api-extractor": "^7.59.0",
39
39
  "@microsoft/tsdoc": "^0.16.0",
40
40
  "@microsoft/tsdoc-config": "^0.18.1",