New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exports
field and worker bundles
#435
Merged
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit
Hold shift + click to select a range
04e06b5
feat(workers): add support for workers style environemnt. See #431
nicksrandall b0feebb
feat(exports): adds support for package exports
nicksrandall b25d523
fixing dev mode with package.exports
nicksrandall b548893
fixing error message for package exports
nicksrandall bf841d9
update docs for exports
nicksrandall 7d49055
make config more clear
nicksrandall 89300f3
adding support for production and development package exports conditi…
nicksrandall 05f1cdd
make package exports support opt-in. Also add config for extra fields
nicksrandall a985105
move exports functionality behind global expirimental flag
nicksrandall 008c8e0
remove extra config check
nicksrandall 7522d55
add note to docs that exports feature is experimental
nicksrandall 83b436e
add test to assert that order of conditions are correct
nicksrandall 1d2620a
allow user to configure what conditionals they'd like to support
nicksrandall ea633db
make the type for conditions a little more strict
nicksrandall 45e94c3
validate sorting of all fields
nicksrandall a575716
simplify snapshot test for exports ordering
nicksrandall e050e5c
default esm to use use dev build when prod or dev are not specified
nicksrandall 68deb25
Remove prod esm builds
emmatown 7a49579
WIP
emmatown 69e6a78
Remove forceStrategy
emmatown ba08537
Things
emmatown edce3ae
Enforce alignment with browser and module fields and conditions
emmatown 38c13f9
envConditions
emmatown 7e31d4d
Some tests
emmatown dfe88ee
Fix dev
emmatown da2b000
Validate exports field config
emmatown 85e49db
dev test
emmatown 51e7b20
Build test
emmatown 988438a
First pass at docs
emmatown be90e4e
GitHub Actions Windows
emmatown 72e5df2
Test things
emmatown 014821b
tests
emmatown 8f95c67
Revert some changes
emmatown 8391a30
Tests
emmatown c824e52
Revert another thing
emmatown 3052d29
Remove CommonJS worker build
emmatown ca512ce
Tests
emmatown 1c46107
Test TypeScript with moduleResolution: nodenext
emmatown 92bb8bd
Windows test debugging
emmatown 4274921
Sort entrypoints
emmatown 04c0962
Only ESM browser builds when using the exports field
emmatown 9560a5d
./package.json after entrypoints
emmatown 28f5d48
thing for windows debugging again
emmatown f1f8e60
Try a different thing?
emmatown 1c0f9e8
try realpath again?
emmatown 3430e86
Try realpath again?
emmatown 0956b9a
Another attempt
emmatown fe18282
Try a thing?
emmatown 7be8e95
Try another thing?
emmatown 374a0b4
more windows debugging
emmatown 5558764
Try a different thing
emmatown 803290f
Async
emmatown a57d57b
Docs
emmatown caebf9e
Update changeset
emmatown d1f5c6e
Update site/src/pages/configuration.mdx
emmatown e73af13
Project level exports field config
emmatown File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@preconstruct/cli": patch | ||
--- | ||
|
||
Added experimental `exports` flag. See the docs at the `exports` section of https://preconstruct.tools/configuration. |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q: why do we use
realpathSync.native
here? some tests in this file do this and some dontThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests that read symlinks use
realpathSync.native
because (at least from my vague reading of things) realpath and realpath.native do subtly different things on Windows(likerealpath
seems to just not resolve some links and realpath.native does?) and that matters when getting the path that a symlink resolves to.