Skip to content
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

[Tests] add fixture with remapped folder #81

Merged
1 commit merged into from Feb 23, 2024

Conversation

bgotink
Copy link
Contributor

@bgotink bgotink commented Dec 5, 2023

Continuation of #78 which I inadvertently closed by deleting the fork repo.


Adds a fixture with a remapped folder, where the remapped name also exists. The example is a bit contrived, but it does showcase two bugs:

  1. The /mapped/ export is mapped onto /unmapped/, making it impossible to require any of the files in the actual mapped folder. The mapped/index.js file does show up in the result. This is linked to Incorrect main export for preact listed when run without conditions #77
  2. The "tree" doesn't show the mapping

In other words, I'd expect

 "tree": {
   "ex-folder-mapped": {
     "unmapped": {
       "index.js": [
+        "ex-folder-mapped/mapped",
+        "ex-folder-mapped/mapped/",
+        "ex-folder-mapped/mapped/index",
+        "ex-folder-mapped/mapped/index.js",
         "ex-folder-mapped/unmapped",
         "ex-folder-mapped/unmapped/",
         "ex-folder-mapped/unmapped/index",
         "ex-folder-mapped/unmapped/index.js"
       ]
     },
     "index.js": [
       "ex-folder-mapped",
       "ex-folder-mapped/index",
       "ex-folder-mapped/index.js"
     ],
     "package.json": [
       "ex-folder-mapped/package",
       "ex-folder-mapped/package.json"
-    ],
-    "mapped": {
-      "index.js": [
-        "ex-folder-mapped/mapped",
-        "ex-folder-mapped/mapped/",
-        "ex-folder-mapped/mapped/index",
-        "ex-folder-mapped/mapped/index.js"
-      ]
-    }
+    ]
   }
 },

[Tests] modify expected.json to match the expected content

[Tests] add fixture with conditions in directory export
Copy link
Owner

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, got this passing :-)

This comment was marked as outdated.

@ljharb ljharb closed this pull request by merging all changes into ljharb:main in 2ff0828 Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants