Skip to content

Commit

Permalink
capture observed behavior for Node 20
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Dec 11, 2023
1 parent 302828b commit 8d2f0c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions patches/@greenwood+cli+0.29.0.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
diff --git a/node_modules/@greenwood/cli/src/lib/walker-package-ranger.js b/node_modules/@greenwood/cli/src/lib/walker-package-ranger.js
index 5ce30c1..18113cd 100644
index 5ce30c1..f4f4d0f 100644
--- a/node_modules/@greenwood/cli/src/lib/walker-package-ranger.js
+++ b/node_modules/@greenwood/cli/src/lib/walker-package-ranger.js
@@ -167,9 +167,14 @@ async function walkPackageJson(packageJson = {}) {
@@ -167,9 +167,15 @@ async function walkPackageJson(packageJson = {}) {
? esmPath
: fallbackPath;
} else if (exportMapEntry.import || exportMapEntry.default) {
- packageExport = exportMapEntry.import
- ? exportMapEntry.import
- : exportMapEntry.default;
+ // TODO this is super slow for some reason? not sure if all the ?
+ // On Node 20 (for .env), this seems faster / not an issue, but then ES Modules Shim is 404???
+ packageExport = exportMapEntry.import?.default?.default // https://unpkg.com/browse/[email protected]/package.json
+ ? exportMapEntry.import.default.default
+ : exportMapEntry.import?.default // https://unpkg.com/browse/[email protected]/package.json
Expand Down

0 comments on commit 8d2f0c4

Please sign in to comment.