feat(lakebase): support CJS consumers and validate exports via attw#408
Draft
MarioCadenas wants to merge 3 commits into
Draft
feat(lakebase): support CJS consumers and validate exports via attw#408MarioCadenas wants to merge 3 commits into
MarioCadenas wants to merge 3 commits into
Conversation
Closes #404. - Build @databricks/lakebase as dual ESM + CJS via tsdown, emitting .js/.d.ts and .cjs/.d.cts artifacts. Update package.json exports with conditional import/require entries; the development condition is preserved for source consumers. - Enable tsdown's built-in attw integration in @databricks/lakebase, @databricks/appkit, and @databricks/appkit-ui so type-resolution correctness across node10, node16, and bundler is validated on every build (level: error). appkit and appkit-ui use the esm-only profile; lakebase uses strict. - Patch @arethetypeswrong/core@0.18.2 mirroring the upstream fix for fflate streaming Gunzip chunk accumulation so attw can extract local tarballs. Drop the patch once 0.18.3 lands on the registry.
Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
The merge left a dangling cjs-module-lexer@1.4.3 reference without its package entry (ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY). Regenerated via pnpm install --fix-lockfile so --frozen-lockfile installs succeed. Signed-off-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
Contributor
📦 Bundle size reportCompared against ✅ No size changes vs the baseline.
|
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 686 KB | 240 KB |
| Type declarations | 268 KB | 91 KB |
| Source maps | 1.3 MB | 445 KB |
| Other | 11 KB | 3.7 KB |
| Total | 2.3 MB | 779 KB |
Per-entry composition (own code — deps external (as shipped))
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
. |
74 KB | 2.5 KB | 76 KB | external | 243 KB |
./beta |
39 KB | 231 B | 39 KB | external | 117 KB |
./type-generator |
18 KB | 0 B | 18 KB | external | 53 KB |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
. |
index.js |
initial | 70 KB |
. |
utils.js |
initial | 4.0 KB |
. |
remote-tunnel-manager.js |
lazy | 2.5 KB |
./beta |
beta.js |
initial | 30 KB |
./beta |
databricks.js |
initial | 5.7 KB |
./beta |
service-context.js |
initial | 3.1 KB |
./beta |
client-options.js |
initial | 220 B |
./beta |
databricks.js |
lazy | 128 B |
./beta |
index.js |
lazy | 103 B |
./type-generator |
index.js |
initial | 18 KB |
@databricks/appkit-ui
npm tarball (packed): 298 KB — gzipped download (dist + bin; excludes release-only docs/NOTICE).
| dist | raw | gzip |
|---|---|---|
| JS (runtime) | 354 KB | 117 KB |
| Type declarations | 204 KB | 73 KB |
| Source maps | 676 KB | 220 KB |
| CSS | 16 KB | 3.3 KB |
| Total | 1.2 MB | 413 KB |
Per-entry composition (consumer bundle — deps bundled, peerDeps external)
| Entry | Initial (gz) | Lazy (gz) | Total (gz) | node_modules (min) | Own code (min) |
|---|---|---|---|---|---|
./js |
4.2 KB | 49 KB | 54 KB | 208 KB | 11 KB |
./js/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
./react |
429 KB | 49 KB | 477 KB | 1.3 MB | 166 KB |
./react/beta |
20 B | 0 B | 20 B | 0 B | 0 B |
Chunks:
| Entry | Chunk | Load | Size (gz) |
|---|---|---|---|
./js |
index.js |
initial | 4.1 KB |
./js |
chunk |
initial | 120 B |
./js |
apache-arrow |
lazy | 49 KB |
./js/beta |
beta.js |
initial | 20 B |
./react |
index.js |
initial | 427 KB |
./react |
tslib |
initial | 2.1 KB |
./react |
apache-arrow |
lazy | 49 KB |
./react/beta |
beta.js |
initial | 20 B |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #404.