Fix published utils export#223
Open
jaasieldelgado131 wants to merge 1 commit into
Open
Conversation
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.
Summary
astro-portabletext/utilsexport at generated JavaScript instead of the TypeScript source fileprepackbuild that emits the JS used by that subpathReproduction
With the published
astro-portabletext@0.13.0package:Node fails with
ERR_UNSUPPORTED_NODE_MODULES_TYPE_STRIPPINGbecause the subpath resolves tolib/utils.tsundernode_modules.After this change,
npm packruns the package build and the packed tarball containslib/utils.js,lib/context.js, andlib/internal.js; installing that tarball in a clean project allowsimport('astro-portabletext/utils')to succeed.Validation
corepack pnpm --dir astro-portabletext buildcorepack pnpm --dir astro-portabletext checkcorepack pnpm --dir lab checkcorepack pnpm --dir lab exec uvu -r tsm src/libcorepack pnpm --dir lab build:fixturecorepack pnpm --dir lab exec uvu src/test .test.jscorepack pnpm lintnpm pack --json --pack-destination <temp>fromastro-portabletext/, then clean install of the tarball andimport('astro-portabletext/utils')Note:
pnpm test:ciis a shell wrapper (./scripts/ci.sh) and does not run directly in this Windows environment, so I ran the same underlying commands individually.