Skip to content

fix(package)!: exports map, fully specified ESM imports, no source maps in the package - #570

Merged
MaksymStoianov merged 3 commits into
developfrom
fix/package-exports
Nov 3, 2026
Merged

MaksymStoianov merged 3 commits into
developfrom
fix/package-exports

Conversation

@MaksymStoianov

Copy link
Copy Markdown
Member
  • exports map and fully specified ESM specifiers in dist: import('@bootgs/utils') now works in plain Node (checked: npm pack → install → 300 exports; types under NodeNext). This also unblocks bootgs in Node.
  • No source maps in the package any more (674 maps pointed to src/, which is not shipped); disabled in tsconfig so no dangling sourceMappingURL remains.
  • scripts/gas/bundle.mjs adjusted; the Apps Script bundle is byte-identical apart from empty type-only module blocks.

BREAKING: deep imports such as @bootgs/utils/dist/... no longer resolve — part of 3.0.0.

🤖 Generated with Claude Code

MaksymStoianov and others added 3 commits November 3, 2026 16:32
package.json declares exports (types, import, default and
./package.json), and a post-build step, scripts/fix-esm-specifiers.mjs,
rewrites the relative specifiers in dist to ./x.js and ./x/index.js, so
the package loads in Node.js ESM without a bundler. The Apps Script
bundler maps those specifiers back; its output is byte-for-byte the same.

BREAKING CHANGE: only the package root and ./package.json can be
imported; deep imports such as @bootgs/utils/dist/... are no longer
resolvable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Maksym Stoianov <stoianov.maksym@gmail.com>
The maps referenced src/, which is not published, so every one of them
was broken. tsconfig.json no longer emits .js.map or .d.ts.map files;
the Apps Script bundle loses only the empty chunks of type-only modules.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Maksym Stoianov <stoianov.maksym@gmail.com>
Signed-off-by: Maksym Stoianov <stoianov.maksym@gmail.com>

# Conflicts:
#	package.json
@MaksymStoianov
MaksymStoianov merged commit 899df94 into develop Nov 3, 2026
2 checks passed
@MaksymStoianov
MaksymStoianov deleted the fix/package-exports branch November 3, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant