Repository navigation
fix(package)!: exports map, fully specified ESM imports, no source maps in the package - #570
Merged
Merged
Conversation
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
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.
exportsmap and fully specified ESM specifiers indist:import('@bootgs/utils')now works in plain Node (checked:npm pack→ install → 300 exports; types under NodeNext). This also unblocks bootgs in Node.src/, which is not shipped); disabled in tsconfig so no danglingsourceMappingURLremains.scripts/gas/bundle.mjsadjusted; 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