-
Notifications
You must be signed in to change notification settings - Fork 4
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
add --preserve-extensions
option
#8
base: master
Are you sure you want to change the base?
add --preserve-extensions
option
#8
Conversation
src/merge-exports.js
Outdated
const mappedExports = {}; | ||
const mappedTypes = {}; | ||
|
||
for (const key in result.pkg.exports) { |
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.
i used for..in
here because i was getting inconsistent ordering between test runs when using Object.entries
and Object.fromEntries
and i think this should preserve order
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.
actually, i am still getting inconsistent results. it fails about 50% of the time. there must be some kind of race condition or shared state between test runs 🤔
it's always the same failure when it happens, these two exports entries end up swapped around. but which test fails also varies. very strange
- "./components/a.js": {
- "default": "./tests/module/components/a/a.js"
+ "./components/b.js": {
+ "default": "./tests/module/components/b/b.js"
},
- "./components/b.js": {
- "default": "./tests/module/components/b/b.js"
+ "./components/a.js": {
+ "default": "./tests/module/components/a/a.js"
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.
even running the tests in serial (-s
flag in ava) i get this issue. not sure what the cause is
572cf5d
to
593ae18
Compare
593ae18
to
d358bbe
Compare
Hi @WickyNilliams , great PR! I have refactored the workspaces for testing, deprecating the use of ava and switching to node:test. Now it offers the following benefits:
Now, upon reviewing the output, I noticed this type of output:
If the index is equal to |
The adoption of (By the way, I didn't intend to close the PR; it was a clicking error while typing on my phone.) |
--present-extensions
which keeps.js
extensionsexports
typesVersions