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.
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.
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.
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-extensionswhich keeps.jsextensionsexportstypesVersions