Skip to content

[pull] master from cube-js:master#440

Merged
pull[bot] merged 4 commits intocode:masterfrom
cube-js:master
May 1, 2026
Merged

[pull] master from cube-js:master#440
pull[bot] merged 4 commits intocode:masterfrom
cube-js:master

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 1, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

vasilev-alex and others added 4 commits April 30, 2026 18:37
…subpath (#10796)

Two regressions made @cubejs-client/core unusable from CommonJS under
strict resolvers (Yarn PnP, pnpm). Loose node_modules layouts masked
both via hoisting.

Bug 1: main CJS bundle requires @babel/runtime but doesn't declare it.

  The rollup config applies @babel/plugin-transform-runtime with
  helpers: true to the CJS/UMD outputs, which rewrites Babel helpers
  into `require('@babel/runtime/helpers/*')` calls. PR #5917 (v0.31.34)
  declared @babel/runtime in dependencies for exactly this reason.
  The TS migration in #9562 removed that declaration on the assumption
  that tsc was now the only build, missing that rollup still produces
  the CJS/UMD bundles and still externalizes helpers.

  Fix: switch the rollup babel plugin to `babelHelpers: 'bundled'` and
  drop @babel/plugin-transform-runtime. Helpers are now inlined into
  each bundle (CJS bundle grows ~1KB), and the package no longer has
  an undeclared runtime dependency. Same change applies to the
  ws-transport, react, and vue3 bundles built from the same config.

Bug 2: `@cubejs-client/core/format` is unreachable from CommonJS.

  The ./format exports map has only `import` (ESM), no `require`, and
  formatValue is intentionally not re-exported from the main entry to
  avoid bloating the CJS/UMD bundles with d3-format/d3-time-format.
  As a result `require('@cubejs-client/core/format')` fails with
  "Package subpath './format' is not defined".

  Fix: add a dedicated CJS bundle at dist/format.cjs (rollup, with
  d3-format/d3-time-format inlined since both are ESM-only and can't
  be required) and add a `require` condition to the ./format exports.
  ESM consumers continue to get dist/src/format.js (tree-shakable,
  deps externalized); CJS consumers now get a self-contained 50KB
  bundle. The main entry is unchanged — no size regression for users
  who don't import ./format.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.