diff --git a/cli/tests/npm_tests.rs b/cli/tests/npm_tests.rs
index 07e36850f8..038251d9b5 100644
--- a/cli/tests/npm_tests.rs
+++ b/cli/tests/npm_tests.rs
@@ -102,6 +102,15 @@ mod npm {
http_server: true,
});
+ itest!(conditional_exports_node_modules_dir {
+ args:
+ "run --allow-read --node-modules-dir $TESTDATA/npm/conditional_exports/main.js",
+ output: "npm/conditional_exports/main.out",
+ envs: env_vars_for_npm_tests(),
+ http_server: true,
+ temp_cwd: true,
+ });
+
itest!(dual_cjs_esm {
args: "run -A --quiet npm/dual_cjs_esm/main.ts",
output: "npm/dual_cjs_esm/main.out",
diff --git a/cli/tests/testdata/npm/conditional_exports/main.js b/cli/tests/testdata/npm/conditional_exports/main.js
index 3d0dd661ad..a40e2e6893 100644
--- a/cli/tests/testdata/npm/conditional_exports/main.js
+++ b/cli/tests/testdata/npm/conditional_exports/main.js
@@ -2,8 +2,10 @@ import mod from "npm:@denotest/conditional-exports";
import client from "npm:@denotest/conditional-exports/client";
import clientFoo from "npm:@denotest/conditional-exports/client/foo";
import clientBar from "npm:@denotest/conditional-exports/client/bar";
+import supportsESM from "npm:supports-esm";
console.log(mod);
console.log(client);
console.log(clientFoo);
console.log(clientBar);
+console.log(supportsESM);
diff --git a/cli/tests/testdata/npm/conditional_exports/main.out b/cli/tests/testdata/npm/conditional_exports/main.out
index 0f2a4479e1..a24f456e30 100644
--- a/cli/tests/testdata/npm/conditional_exports/main.out
+++ b/cli/tests/testdata/npm/conditional_exports/main.out
@@ -1,6 +1,13 @@
Download http://localhost:4545/npm/registry/@denotest/conditional-exports
+Download http://localhost:4545/npm/registry/supports-esm
+Download http://localhost:4545/npm/registry/has-package-exports
+Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns
Download http://localhost:4545/npm/registry/@denotest/conditional-exports/1.0.0.tgz
+Download http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz
+Download http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz
+Download http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz
{ hello: "from esm" }
{ hello: "from esm client" }
{ hello: "from esm client foo" }
{ hello: "from esm client bar" }
+true
diff --git a/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz b/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz
new file mode 100644
index 0000000000..7daff8ff14
Binary files /dev/null and b/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz differ
diff --git a/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/registry.json b/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/registry.json
new file mode 100644
index 0000000000..9a0b27f3f1
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@ljharb/has-package-exports-patterns/registry.json
@@ -0,0 +1 @@
+{"_id":"@ljharb/has-package-exports-patterns","_rev":"3-d0393bf328f2bed4c41c2cb289ca9384","name":"@ljharb/has-package-exports-patterns","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.0":{"name":"@ljharb/has-package-exports-patterns","version":"0.0.0","main":"./no.js","exports":{".":"./no.js","./patterns/*":"./patterns/*ed.js"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","_id":"@ljharb/has-package-exports-patterns@0.0.0","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-e5d7/9bs2uorgQrHzGfzvT6WTyUbWiaiQXBourc2d7/LzvjZkRpFfDWN96WPsEqRMKrbx6aT/5XFma4WYMvu2A==","shasum":"4bec9d26d79b57021f4069ee42bc1bdb3a222372","tarball":"http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.0.tgz","fileCount":2,"unpackedSize":535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/r2CRA9TVsSAnZWagAAtLsP/3YEyKmT4SHRBhHwRv90\nuydMCnl4UygliJrdRO1EFa7Y0RWv3yeJDmiP/BbHvbKx+oH1WuRE+ZkjgTce\n8FMV/XUU9muyaEcdy33bzKosu1lukgETXT28IxrGK/JbGoboMbt+Iz8+W5Fa\n+2D546TGv0o7hf/aHilosi11J5C7rd4YuqSxJGXJVXpaytik+e9OFU7rrV/7\nW9mbFmt8YOxfNiOslNvZUA05gHWPLGhw7I9Rl9Jqd6o2xdY5TvXoMUsy45SQ\nUdC5nnVijDleUmULhkxS8ULMJ6GvQkF6lVa3OHHItIByvhfKY8TnKK+ioHYw\nyEvZ63sj8mjYTIi6f5Jgj5NvQrm6lI/JcXW761vxxEcSLPW/onAsPvZHJqkU\nqlGVFib7Xh4Sp8NjJax5pO6QpCHMVs1+WemklXUFQA27Lxod1pXOzvFmq4Wu\nr3cMrYGLol7aPogRyb4v/bu25oDLdMkLmokEc68J9+Q4cw/ZaNzMa1sBWFlC\nhW503lWySfkpoWkLl0kypoZwbLsUZoIO5YFLldxnsynm7XSMHOZBGv/hzCdR\ndBHTvFAs9PgYFJj8xbtL2Wnja7Uuyu9ThlA3uezeDu0bD+IcPa8IdQvXTNSI\nA3pnOuDVzy1pdGny5oIeO4VGY9YU6mC8XSt/g2qgLoEGSib9VxSBKA4qCZ7K\neCWx\r\n=eDD7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCxiTdVCltPVhh84T/xXOOv3SQo1hCJzPMuBNIicn4g4gIhAIfVxstRRkI1v3hdPOY1DIjt2oBjGxtI6mi7+NDkUNkp"}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports-patterns_0.0.0_1602222838589_0.9419759981517923"},"_hasShrinkwrap":false},"0.0.1":{"name":"@ljharb/has-package-exports-patterns","version":"0.0.1","main":"./no.js","exports":{".":"./no.js","./patterns/*":"./patterns/*ed.js"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","publishConfig":{"access":"public"},"_id":"@ljharb/has-package-exports-patterns@0.0.1","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-J4HxcjHI8EzVwXj2HKfZrwnWv4wmOhGxSHyxDQLhiL4ibwRoIkYBqsacZUXFUWQzJtW6QC+FKSNy8HqKjkEqaQ==","shasum":"70f07047b058e0909488a0ab1928afb95a9326d0","tarball":"http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.1.tgz","fileCount":3,"unpackedSize":619,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfl7kaCRA9TVsSAnZWagAATXwQAJhbxLJoWKyYSBEsP3E4\n7p2RVYrOy74gBDQSMFGho8tP5WfAaOnApnRYRhjl+eK8EPKJfE1BmC32SJVY\nQ/k9b2l6NkZgTUy/ZvRlBmbVysTjO35OHrIg14tqUvQGoKlZf2thsdw0vN18\n5mRYx7fGFQAd2F+goK3jrdL7FpqZAhIuk3vO93okW6P25yUkeyVEVPDhoN5n\nYtfzOlKaycfNvcQieX24EVzjCBfgWn/sIdVYeJ7ZdQNiXh7YuZCWMa8rgECs\nJDb/4EX+N2DirYzU951LlHaI0j0ZW1MbtERswXnC2Tn9Qtaj5we9vpAongiQ\nxnxpxo40tgJgy2Qzb5WwIvHPJojcRJOEHnrHvvHsRYe2FR4Eh2DHQ55ODIm6\nNuZzp7U6vQXyh8C+1PKlpl6KsEynlefXPBDueB4CnTh9ahLUfSfUjdSfsV9H\n87Hk/HS1kFZTn2lavqaV6vFmgEr3JwozAmbCSnMcP2ZTk7YMAW4NcxvcxcUa\nNqM4+y0t99phoTNCkNDWH8JUSEAVM+OGsJCrd3LzCScmDNgBF61U+lqrdpE0\nFoUOzpjAiGBLzmiL3tXx2SZyQsvC+dPBRW2W2KYcoy+CYXPgUCwfkSYwKz2F\ngF5+9Pyd8VqbcWgIbg7PfQD5KFfXBKF9sCO8hv6UBQgZ6NJpIPYhWpeYfxHK\niFut\r\n=gLnw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZDbx3S9jLwbuuoa4n1W4F0fGUJXO6ng3QVWw9nUlmIAIgYpRJ0NPlmsVduuq+rr53hjjGoNeaxmxOjnSkIZn/J4E="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports-patterns_0.0.1_1603778842085_0.2453392545644033"},"_hasShrinkwrap":false},"0.0.2":{"name":"@ljharb/has-package-exports-patterns","version":"0.0.2","main":"./no.js","exports":{".":"./no.js","./patterns/*":"./patterns/*ed.js","./pattern-trailers/*":"./pattern-trailers/*ed.js","./pattern-trailers/*.js":"./pattern-trailers/*ed.js"},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","publishConfig":{"access":"public"},"gitHead":"f0f693d8e03b9be35d8559df09f9d29cc93f0810","_id":"@ljharb/has-package-exports-patterns@0.0.2","_nodeVersion":"17.8.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-4/RWEeXDO6bocPONheFe6gX/oQdP/bEpv0oL4HqjPP5DCenBSt0mHgahppY49N0CpsaqffdwPq+TlX9CYOq2Dw==","shasum":"c1718939b65efa1f45f53686c2fcfa992b9fb68f","tarball":"http://localhost:4545/npm/registry/@ljharb/has-package-exports-patterns/has-package-exports-patterns-0.0.2.tgz","fileCount":4,"unpackedSize":770,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2kq741WzizIG98/ELM99UeZlbDuUFh6N2Frl5pBxRFAiEAmmsPZYZVwIobIPJFHu+DlkHedTV3FZngCFTVkAlstJ4="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTnmjACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmobhg/+M0JnGNgLGqhKeAP3rdF06hRZnZcwQ/aHufu6K5LKF42LQwNY\r\n0PZIpb4qyfCI+rvSbK+kat3cPuY0ZnV99slZe4ZxR85FpJm3WDm+WxHqkDi8\r\nm5G0rY6dmwTB+8o05g8pUDaxu5Pd+J5ouWXBoySzyrctNoNwslBCvXY5GZZL\r\nowcI3gOFW3uhaBUrZa955LFcB7fUEvZkD7cayMKT21lTBb2lcby3Thl7yVHE\r\nBGU/6a4spdnfOi/YsJx9R67oCqCjwt93gAAa+7rclvsOQZITiR9722toywAU\r\ny64tb8t/MSGsR4cjoBlcjrVfgMPinJSN2rIL34IijKX6pSBvGRFkWY0MqMcO\r\n/YvOH61l2ivdGEMQBxCNPsdfMXKGUKriwJ6NLUZiSMSue5cxGQASj6S5FtkA\r\nqQV7DaQTJut3mrSYL93fs5rvVubBdGw4mmIoKkuICFXAaYTCiROUCrHOnpST\r\nL1G7ZLXLkKyT1k/ISivh5vFQq17IacHCEZ/5Y56UwtSBVistNsBhuVMQSOxJ\r\nwzzi0i0+nAVrSV+OUc9y9rFgx8EMppewOMG+JlLHNMD6V6jmA2wZBgf7ek8O\r\nun9TanuxyINaWKKsqg5/fSZCXjRNDd+uGA+UlrMSoznUACz7zdG+feC1bO+k\r\nkzuAfVPdiRNcilaRUc3ihfQH9TevL0hobPA=\r\n=VOhM\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports-patterns_0.0.2_1649310115254_0.5270760426972871"},"_hasShrinkwrap":false}},"time":{"created":"2020-10-09T05:53:58.589Z","0.0.0":"2020-10-09T05:53:58.693Z","modified":"2022-04-07T05:41:55.495Z","0.0.1":"2020-10-27T06:07:22.221Z","0.0.2":"2022-04-07T05:41:55.403Z"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"homepage":"https://github.com/inspect-js/has-package-exports#readme","repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"license":"MIT","readme":"ERROR: No README data found!","readmeFilename":""}
\ No newline at end of file
diff --git a/cli/tests/testdata/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz b/cli/tests/testdata/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz
new file mode 100644
index 0000000000..2069c9a106
Binary files /dev/null and b/cli/tests/testdata/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz differ
diff --git a/cli/tests/testdata/npm/registry/has-package-exports/registry.json b/cli/tests/testdata/npm/registry/has-package-exports/registry.json
new file mode 100644
index 0000000000..f664bed547
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/has-package-exports/registry.json
@@ -0,0 +1 @@
+{"_id":"has-package-exports","_rev":"16-f1d6bea880275ab712ab13a0d0ab6173","name":"has-package-exports","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"has-package-exports","version":"1.0.0","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"default":"./yes.js","browser":"./browser.js"},"./yes.js"]},"scripts":{"prepublish":"safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"npx aud","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/has-package-exports/issues"},"homepage":"https://github.com/ljharb/has-package-exports#readme","devDependencies":{"@ljharb/eslint-config":"^15.1.0","auto-changelog":"^1.16.2","eslint":"^6.8.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^4.13.0"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false},"gitHead":"014e96afca6d81e9623eaed8f10c226259361384","_id":"has-package-exports@1.0.0","_nodeVersion":"13.6.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-rYAzt2OaM+mwkxAGP7cZ4KkP45O/ZEFSjwg7KmiS+uCrXxB1XepMj9L5VMuAm7tpjiL1IemcrNcn4HAZX+z4RQ==","shasum":"7988de73efb56862fbe277adaf857d70b37a1f07","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.0.0.tgz","fileCount":12,"unpackedSize":8239,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeFtxRCRA9TVsSAnZWagAAvuMP/30xeqzfUKH0fTpOvVyy\n5b2S3EwJP6MpvAkYOfw06l3JOBsGLpL4ihc/EQ5tf92+6Dh2mt7yS7GdedzE\ndbmNuHcwZVEoBD+bNxFqn10Awxg9iceEqKJcVE+ro/Oc11JUXfU/k7va/AMJ\n01GrFj6EhndQ7i9nPwScE9zY3qRzmPNUFZwRUIj958F+o6w455J/gTmOKIlg\n5FvCOxdjEutPLerYwgSku8x0rEd7VyDnkjt2Kc/mupEVA1oci9rTFbxGNymL\nwnCTkNobTboLBDglUJ4Lxk6IssF986npURiC26OGDxFQmnazswuuucdb7KOg\nuqXec2l1lcuc9wqYsAGI+OFxz67V4me2ItsTq7euKJuqcA8R/c+zKXFmI7Is\nQsnWrrr3rbtozgLSvXMdwPKJMycakBaLl3RAhvnbth1REuVhmTlf43BcyRvp\n+Wo1Hn4EWV4rYJ6B+aofpFlFFCnFaqVe01ZJSpKY/hJQDYHb+A1hzaFdrqE1\ne46cVwWdx9MkWMnDHKRm/Yoius7S4ZnMfVUyQxD93LlO7ehv8we7jLuP0ItI\n9/S7OuAq8kpvcFi33wZhVr/WLaaFUjKKAX8XB+TPMF7j+TWOZFDOKBAyziwo\nT+shBLy467UZWnP7PFkhdPPaNQVvcnhFr/DgvYCwuku0lqJ7/ps5lwDh3nbc\nYxeh\r\n=LDQ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDij+wRKhgaDHY3sg6J0mGqK0Wd7O7ouOzPCKe+ePfiUQIhALfnO1f13d9AARXyeNuIGWizOOH0gjOKUZt1UmOluk+E"}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.0.0_1578556496494_0.2933720364176702"},"_hasShrinkwrap":false},"1.1.0":{"name":"has-package-exports","version":"1.1.0","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"]},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"npx aud --production","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/ljharb/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/ljharb/has-package-exports/issues"},"homepage":"https://github.com/ljharb/has-package-exports#readme","devDependencies":{"@ljharb/eslint-config":"^16.0.0","aud":"^1.1.1","auto-changelog":"^2.0.0","eslint":"^6.8.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.0"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false},"gitHead":"ab9580b1a3ee447b11fa6802bc9774f741cbe93f","_id":"has-package-exports@1.1.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-qlaEs954Mp/B4LpzyZNlMYp4r8qVQAB4Bp8+abBVy4lg1FqcArWLHAl9BLMIWDiJ72wkqVpCNT54gX3uYBVYbw==","shasum":"3d9a36d3c683dba8d9c61a7fc0ece204e61ba65a","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.1.0.tgz","fileCount":13,"unpackedSize":11980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeuHApCRA9TVsSAnZWagAAmtQP/jNRb09OUtfuF9q0DpKo\nxIXOXx5s47jZ1cyAykg23ivO9wacfuShrtYOFDVadT4tg19SRozjZiLpa9kk\nGrITrIoucWFCNyukp4yENKBge/ywSugV9+O3H4TGMxdpsPA3U2B8G7Lg8HaO\nzd2+rEdbg2QAtazCnQ3DhHNgQtl1UIleIMkKxThLYNQVnbtQCgH3xN2MIix7\nGArC58oZ3noqZ8VbdCB9zvQhXVCya4eV7+ECvRXosafhIZJ8gdnBJjIi6rxU\nBSrg7gqMhr4Bw132RTgs4NVnCvg37DIEKYDy3IEIMrExRNWovGUccDCkqNFK\n4jILgCuyVOHLxb/jpyRts4Sp3RGn3oFOQf3JozJNw15Sdq7yjzxJJpNtvthW\nN3ISR9y9MlSJX+pn7b7RoXmRDM6PuxUn1oI5tP4fSapTQKfgRxOjjt8J2zeu\n3cJBGRlJin3Wne5wwTPrao/OMWn/UTHRt2YcgtCq8q0VpQGcGywZJylT7VBY\ncRtFn42gJ90zIC140vrDpBVEcKHu2faVA8FGkcZGYmQgMjfIKN+P22IOB8UO\n0xUESk7Z7oFZAKzFv1Q/GQdCw0nFSZNBibNydpnz9xU0nkElnlm4BBJp6XRq\nn7t9ImTLgEzrG1gyDZHmqjMzc/XuitBg9A2phBcNr5qpvbnAHDDU1r1mLeKw\nm7zI\r\n=XY5n\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNxCw4ZZcUPip6Zgx1DIAhyMcr1WAWteosVYupXee9/AiAUj/3EGkh9HN4c4CuRXVmtFeMKCmE8ib5pscAtIzP/yA=="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.1.0_1589145640624_0.7858408887273796"},"_hasShrinkwrap":false},"1.2.0":{"name":"has-package-exports","version":"1.2.0","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/patterns":"file:./packages/patterns"},"devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"7e22f77253d61ab9b951ecb38bdc645d2bb95c81","_id":"has-package-exports@1.2.0","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-2SPoZNnHITtcn7OMdeYwhULqh9z0ehEQS2yaW4hyacr9rdStgyJJyEJtqekludq+WBU7Sz9o8Bi++tysCPuoxA==","shasum":"3a6737872630cfd8cd389d7479dd4a85475c201b","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.0.tgz","fileCount":17,"unpackedSize":14753,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJffBZ/CRA9TVsSAnZWagAAaWkQAJogsJhRDR1h4LkeTVdu\nYIC9SsfnrXtzWSCXsGAyDhWod81ebOHVd/C2Q63hUeo83iA97qtNYnSD9Ga2\nU6YUZ/+bNOrVt15yYm9ghL5HwxrFa4Ft9Whr0/ZNGlCa87nFzG/Xculq3kRT\nFQVpoh5KvonnWuG8WzYqtMbOakThbwcWgl6WN+6JfIi65PrRKy8kSidNxUcP\nwIR5ljll9idXSnaRT3xjF2UjwQsgj9gC1PN+d5AAQMwPPO1UtoD5Tt+vby2Q\nhoLx8AcJzwAK/J3T/dEqxfUKfItj+r+28SFq9aBThndtC4dlg3Hcw4xPs1tb\nNMe2U2b7wR7LPQBzQIgi886xfJGLICIphtdyQ7V/+GCWEm/K3Sw7IuszBMD8\nP6nKmyYU6lkuWgiCoOOz3TFAudN1p2pkH0+Ww1tFpS4OR6tAvV4uzkVIXEuR\nXNchb8doWr4wUWBfjWW9H2CDS3Zd2QnGHHju+F33Rc6dd+QKngMFq56qzHX4\nf88g2Z87OTc+QKwURDllcFEXez6QOp9YM9WRJ/D2DFNBsdaJpGNRgsQAoqEF\ntphS5bA0eFhqjlvbNfLkZSk1m0u/9VWsgX8zw71NnWp1PZ5OVyaTlRcagX5R\nHQtK1doayRU1W/jvcG219zFyRp0Qy2L5jxGptU2WiU0a8vzzwXsxkZ4KkiCi\nM1e9\r\n=a+jz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDXD9bwnzrbbFAaXn8u2Fy1DO7ZIG6dAcbmg9LN+apX4AiEA1rokLOX+RAzABsMdWRlHZo/imuaYmp3i6nf55Uwjvyo="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.0_1601967743133_0.4991118759066693"},"_hasShrinkwrap":false},"1.2.1-alpha.0":{"name":"has-package-exports","version":"1.2.1-alpha.0","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/patterns":"file:./packages/patterns/ljharb-patterns-0.0.0.tgz"},"devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"readme":"# has-package-exports [![Version Badge][npm-version-svg]][package-url]\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current node version have support for the \"exports\" field in package.json?\n\nAt the time of this writing, node v12.17+ and v13+ has support for the [\"exports\" field in package.json](https://nodejs.org/api/packages.html#packages_exports).\n\nThis library exports `true` if the current node version supports it, `false` if it does not, and `null` if it's in a browser.\n\nRequire or import `has-package-exports/conditional` to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).\n\nRequire or import `has-package-exports/pattern` to determine if the current environment supports exports patterns (as of this writing, node v14.13+).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-package-exports\n[npm-version-svg]: http://versionbadg.es/inspect-js/has-package-exports.svg\n[travis-svg]: https://travis-ci.org/inspect-js/has-package-exports.svg\n[travis-url]: https://travis-ci.org/inspect-js/has-package-exports\n[deps-svg]: https://david-dm.org/inspect-js/has-package-exports.svg\n[deps-url]: https://david-dm.org/inspect-js/has-package-exports\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-package-exports/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-package-exports#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-package-exports.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/has-package-exports.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/has-package-exports.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=has-package-exports\n","readmeFilename":"README.md","gitHead":"15d2d48c8e81ce9f69c102915c62f7b1baae7956","_id":"has-package-exports@1.2.1-alpha.0","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Cus9snKzzfROWJF4fmzBmYijTdEd6jFmig+lLp4a4O/iKR8bw9YJENvaQ9ZKtBd8hIjpKVx98tnLQH3/iALJwQ==","shasum":"c975a0a6935cc3994b78fd98a820aad4186fb285","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.1-alpha.0.tgz","fileCount":17,"unpackedSize":14827,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/bNCRA9TVsSAnZWagAAQaUP/3cB45B47OPpbhmHyZPJ\n0DzsLAcI8Gk/dWpDbQI/13r+5wZIEWbIP0ayHCGzyD/ll3nU/w4q/sdKTLG7\nbir2s/mNiY5jAN44lyB3l1yUMSRccDVdRkVUyvH+Jz3To4v5/ANQKh56QCjI\nvdDNydg3uW/B6yOsE6xLTCGflYSZ1IVVUYmiSNPuUg/ONufiewMzSlE6btis\nymKhQ6y6m/FMKgmXq2ePpMVltCzXFsuBaYgY9sfpSsQgTbTALoH/o4htcE3M\nThKF4L/WoGNB27UUvCepwvfWA+Fzhc1OMvgM2JRPpvkcOJ/QFk2Wzfo+MAnv\n/splEDLRiCTWUDx+kq2A7mVNOGJpkuNu9rQwzracHRwMtPw1eFyBV92mc5/B\n98XybFl2wDJIcNWOZKyZDKJM0VHxkhKuDmf+x7yBoDptmtEE0JIy6YT/X4OX\nDv244ORdan1TpWevU4MK7+E3OrD0dfplc3/tk+7Nqj5vHraJPtxCN65OK5UN\nArDnPMHWK6/PSr5fKXrIrsHJS4bNPlfhKx6xwZPAWefzx6KgqWeR+2rpQG/h\nY59g7+zlusHEUVukwWobIzVKL734xmaG8iaBsd6Ir9ErX1bfy93qr6EiiZ2Z\ntTzNm1s47dqwLbKi3qeNPyD3V2IhDTrornLYj/b2Pb1bzeFlBAAJrNiRVmia\ngNdU\r\n=6Oh8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCS3VbBV7bLnt41PBa6uEiFxnGJ56PPnbWThIT2lnY3OQIhAL9PAopIVIirs02NNTN73FxkG9lWSXKJ1lfyyJ6Nio6U"}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.1-alpha.0_1602221773468_0.8847715680026966"},"_hasShrinkwrap":false,"deprecated":"this is broken"},"1.2.1-alpha.1":{"name":"has-package-exports","version":"1.2.1-alpha.1","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/patterns":"file:./packages/patterns"},"devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"readme":"# has-package-exports [![Version Badge][npm-version-svg]][package-url]\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current node version have support for the \"exports\" field in package.json?\n\nAt the time of this writing, node v12.17+ and v13+ has support for the [\"exports\" field in package.json](https://nodejs.org/api/packages.html#packages_exports).\n\nThis library exports `true` if the current node version supports it, `false` if it does not, and `null` if it's in a browser.\n\nRequire or import `has-package-exports/conditional` to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).\n\nRequire or import `has-package-exports/pattern` to determine if the current environment supports exports patterns (as of this writing, node v14.13+).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-package-exports\n[npm-version-svg]: http://versionbadg.es/inspect-js/has-package-exports.svg\n[travis-svg]: https://travis-ci.org/inspect-js/has-package-exports.svg\n[travis-url]: https://travis-ci.org/inspect-js/has-package-exports\n[deps-svg]: https://david-dm.org/inspect-js/has-package-exports.svg\n[deps-url]: https://david-dm.org/inspect-js/has-package-exports\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-package-exports/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-package-exports#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-package-exports.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/has-package-exports.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/has-package-exports.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=has-package-exports\n","readmeFilename":"README.md","gitHead":"92279dcdc5b58bdc9b6caab269e6ede523be1711","_id":"has-package-exports@1.2.1-alpha.1","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-3CHxfGRPggHaycEcLMpE3cM4wOxoDXVcZIw76DN2KchlQTDg9eTxilzTBAIaDBIVPFaWYqN6/TuHw4fc+2POEw==","shasum":"d2038425104c0ba9793432d69df7ec311f7efe82","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.1-alpha.1.tgz","fileCount":17,"unpackedSize":15144,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/shCRA9TVsSAnZWagAAwDAP/jLGKeoUPco6AXQSMADp\ninTGa7V8wMsC4tiL6MJ8ep6yeZu/lOyF+FdZqtpHFPuQr2x77i2yCEr3Jrio\nhhbJmr5SSCD2sKevEVMRtCi2UBD9e2+SDOwnvHquqTAagDBDflJx9uVl/9ZD\nGQ03P5Js5iQMi3GippZbbNC+kM0zdf6EsOJ4uGI8VBBTQDDg6Qyp33EtAiwn\nqiID5s9XltDiviT4+PClFdD+7GgEyQEdMYibSjOpKLWtn+trlGsfIJJsT0vA\nIZ6escIZLklXSynlIcben7xhBN+QC2NVZ9+gq2un/11sN8bworM4SrATAqen\ntGbbhfbLPGP292UyWf/PUa8zWsNdTsqJrSsHh1xqOqrfb4zHNRkBrZxz4hXD\nQE0xp925U0mCfQTf+6CCl/1RpTEtp3oAyaoMQ3PR/9kz7lZSC9FHzPl6phnh\nh6SHEsM4A7CnAWRzGZhQSBzNf0GDuYVL4xTa0ba/hWEXeV/Fewmd/77/h7BT\nrdbLos+/lWhtS3KI3n/Qfvfc8g+k9XBakv7EKFpXT43ZT2Dw49nWMnxX7Ab2\nY8WC0wkxaPfAhN5a6WJn510YtfuL7D67BJ9BLxKJY7FoZxkJG8z2BLHAG8ky\nL5xHCr2cevLMMgziaBo4RN+9D0BrH4MKI/GRYqdhADGKZoO05MBvQEJOLg7n\nb8eW\r\n=cVQQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCvShW3tI3MtM9HapBdIZ35x9j+QckVFdjXPOdaZKwYGgIhAPlq418T/UbZCr64UOzKBXkQnb2les6BAtyMPNDfxDWu"}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.1-alpha.1_1602222880694_0.9830752969674459"},"_hasShrinkwrap":false,"deprecated":"this is broken"},"1.2.1-alpha.2":{"name":"has-package-exports","version":"1.2.1-alpha.2","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"^1.0.0"},"devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"readme":"# has-package-exports [![Version Badge][npm-version-svg]][package-url]\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current node version have support for the \"exports\" field in package.json?\n\nAt the time of this writing, node v12.17+ and v13+ has support for the [\"exports\" field in package.json](https://nodejs.org/api/packages.html#packages_exports).\n\nThis library exports `true` if the current node version supports it, `false` if it does not, and `null` if it's in a browser.\n\nRequire or import `has-package-exports/conditional` to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).\n\nRequire or import `has-package-exports/pattern` to determine if the current environment supports exports patterns (as of this writing, node v14.13+).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-package-exports\n[npm-version-svg]: http://versionbadg.es/inspect-js/has-package-exports.svg\n[travis-svg]: https://travis-ci.org/inspect-js/has-package-exports.svg\n[travis-url]: https://travis-ci.org/inspect-js/has-package-exports\n[deps-svg]: https://david-dm.org/inspect-js/has-package-exports.svg\n[deps-url]: https://david-dm.org/inspect-js/has-package-exports\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-package-exports/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-package-exports#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-package-exports.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/has-package-exports.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/has-package-exports.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=has-package-exports\n","readmeFilename":"README.md","gitHead":"65c6bcc653cf2a745005f35bc1906efc4f75f9d1","_id":"has-package-exports@1.2.1-alpha.2","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-BYB7MfcYWRDS2NbAwbMmy+FSQJMAamjDmZyzzbO1WKqCMGE16Jnsoebm4rH/tDyhXaASxHIpJxmwd+tHvXWI5Q==","shasum":"743c57f3e3f4941ba93df5d6a459d1a976d83ec2","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.1-alpha.2.tgz","fileCount":17,"unpackedSize":15153,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/uXCRA9TVsSAnZWagAAzL4P/1+hSj8Wd+Xki390gM4y\nsKsrFkHKCYfYZE9hEkoYmlo4qkQLGtW5ngSPRrb0x17c3XlOh7JijpW3O8LZ\nTW8V61DEI96lkaKWYmdNHbX51PRYlDltxB4U6ILlSP0KKvzlK/MFpYA2heb8\nlWYM+/R4qbRZ1uJAZ7AGpoeh1+xkCgdK8C92mMMNQ0NJ2ef632wLL5kgwufQ\nPQPD7rWW9W3q7A+TD/GGXNvIWIN7Y/Gy/gZFNjTSbIBV6FcIRytYTTdMh0D6\nayXqn/D41re9fQFzl4zxRF+swI20pPFdJfNk8P2spvHSxa2WqKOP9kpGSubC\nV00lJZd5sjbnmzYuHWe3BysCthCH/AjWlop5tn/U7PLpGF1mfh3w7y+fDtg/\nZ8Zdfunoruohj+qT+qtZyqgnnAx/9Q1FmT/0/F3TNpCgu9UGQCjYY2O7HMfM\n55zVu22Y4w6fCPhoRJTWsmIPAXb+MMhRkqstKeo4rCOA6MposqbHzkxMQz1L\nrhwWa+VcpPP606GJ0ld1GzH0OPtYj5bPfe7UDPVq8JnDXJb2p1MXtnhF0QY4\nrZaeez4F1CVHpJriVHR/9sMtaxCACvfQDwINgc6+K2ojmJX9542JK0EGIAne\n0hFlLw/1rWxXdrmCUd/ceBsjbJYIqRAmzcqocKsGBeQUbnCkLwstYlxwNOPH\nyS5Q\r\n=BCSH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfnKCnlZuE9MamAyUov9ByBapkSJCYKG5bE4i9fy9AdQIgHyEsOUb9+JPVM7Hkhks2ZRMU56Nwr9mWkKeOtGZTtD8="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.1-alpha.2_1602222998602_0.18561594111594326"},"_hasShrinkwrap":false,"deprecated":"this is broken"},"1.2.1-alpha.3":{"name":"has-package-exports","version":"1.2.1-alpha.3","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"0.0.0"},"devDependencies":{"@ljharb/eslint-config":"^17.1.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"readme":"# has-package-exports [![Version Badge][npm-version-svg]][package-url]\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current node version have support for the \"exports\" field in package.json?\n\nAt the time of this writing, node v12.17+ and v13+ has support for the [\"exports\" field in package.json](https://nodejs.org/api/packages.html#packages_exports).\n\nThis library exports `true` if the current node version supports it, `false` if it does not, and `null` if it's in a browser.\n\nRequire or import `has-package-exports/conditional` to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).\n\nRequire or import `has-package-exports/pattern` to determine if the current environment supports exports patterns (as of this writing, node v14.13+).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-package-exports\n[npm-version-svg]: http://versionbadg.es/inspect-js/has-package-exports.svg\n[travis-svg]: https://travis-ci.org/inspect-js/has-package-exports.svg\n[travis-url]: https://travis-ci.org/inspect-js/has-package-exports\n[deps-svg]: https://david-dm.org/inspect-js/has-package-exports.svg\n[deps-url]: https://david-dm.org/inspect-js/has-package-exports\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-package-exports/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-package-exports#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-package-exports.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/has-package-exports.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/has-package-exports.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=has-package-exports\n","readmeFilename":"README.md","gitHead":"65c6bcc653cf2a745005f35bc1906efc4f75f9d1","_id":"has-package-exports@1.2.1-alpha.3","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-W4BFt7OJ0+dd0Rtd/edgfY++XPbAohwgfCyTJbjgF4kpkwKTCKLB5kzKdGlA6ro15OWaKx54K6JeV4V+n4WgCA==","shasum":"eb22038522efafb05e8ed3985695fb8afb58abb4","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.1-alpha.3.tgz","fileCount":17,"unpackedSize":15197,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/w1CRA9TVsSAnZWagAAADgQAJILjb2OuVOYPBvKEhnr\nG/07M+ich4BEUJfOxeO0o0eqfQjx8QopVRZBFUARNiXcfyzXHuLIYQLEF6Sx\n/kvqnDBxin1AKzibsfF+8hBtVKPwlbyw5ezOcX74cgJC975y5w8p1lJzVzMT\nSpB0NAkXGgk4mrwsRb6jLuy4BNEG2pD6Pjg4a1ikno+roIHl7DW2pvjlSNEa\nSUyjcR7LTxeX0xrDTb8R8Kj5lXRNFcpOFB8RpKbHmPtUU3AVcrqLZijf7cWo\nP0QcP/0JoMGYxopZzgo9HQFfMuihi04wkAvGcmHDlcd9DAyt63ZkKFpdVsvX\n1sAdAxKHsUj+xrgjmYtmy8OMFVJarIiKqi3owjI0weZq9aKjVQ3Wqg5IW+nK\n4LWzGoVnoiNdwxGOQZpyZNeQ28helsyeCpq48GjagSBz4Hs8OvWzds4SFjAe\nVTjQOWd489v6MKrky/uQFMJ0W7dJgDde8mz7zRLAj0sgeqcPRaSQL6xCaiSN\nAYqEQfLDHHa3Ttyoa3IQQHOv/nzqC4AX31/CM+yQMu5AqwVO1GelymQyHdji\nO+57nK6crEO63DN6Pa0e3TwVRb1JTY2HXsqiD6GtZcBBGLTo1pX969L7nOM2\nRWSn7eh4CPyWX8V0eF2CyHfbKZU6jUh7nIWaQmqURZTzNEBIHw4C0WZskW5S\n5+ZX\r\n=kqHm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5qSHbnNa3a2w4CaeuKFg1T31KjVi8e3rk1wJ5Va3XrAIgYFTvVw5wyxs11h4fyjoQl8UZ1xo2xwRRa7OpffGBFGU="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.1-alpha.3_1602223157201_0.29070257503425734"},"_hasShrinkwrap":false,"deprecated":"this is broken"},"1.2.1":{"name":"has-package-exports","version":"1.2.1","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"0.0.0"},"devDependencies":{"@ljharb/eslint-config":"^17.2.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.10.0","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"108ea4ef3c1f3de71ef07fd00a94e530a9da951e","_id":"has-package-exports@1.2.1","_nodeVersion":"14.13.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-uyEWJ3NFC0fHT/YgszXX+vFYKegFksDtwpR+zIzy4tYlE2wgoDOanFv4K0mnVmr/vW4RLnCnpKvl4Fg1Cdl/8g==","shasum":"3773e823e1e90641c0d15b5e4596aad48c0f3880","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.1.tgz","fileCount":17,"unpackedSize":15954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJff/2iCRA9TVsSAnZWagAAY3EP/3ECXXn+s0U0SfXBpFsQ\n/QV4VFYiHlkwPW2nYPAEM7mGxfSAod63JLG8kmkTyghkDfb87EyUS1ezhhKg\n8kVbwrUDO/cOv7e3zLE2alOMZrCbA7C59AXd15eRW5o8xGUQdJwvo+54iWbj\n+8z7BM1paNbNPk/V/IU3EbC3gBK5i3UfEAaKOT82lyrou/JHEZbVoQvrupuF\nZ34broaOioKjRLWq3x7COX3DljebU6089Pm9wRuzAdmlPw+acFe5mCWTF0nf\nQdk/mLjj6JvnPaJJ+aDhUdGiEIgaUdVRHFPqTCIFhvtnuM91S7Xm0FJjuJIu\nA2wOsuza8OuPD9wOUufzOPw69H6ag8VdcUy9Y0z1X3+txgtJOb72NaLpd1Iy\n5XjuS0eU6dtELZyEaGoHBENW6QHVR3EHWRroNBjZB2OEDK4e4/K2G3AMX1b0\nQuX88eiePwbvXgObcaeElF7/JHtt9beb3xB2szabX5qsQ1a8dDKAhKGFgpTE\n7ivrKdniH6DiXOF71whUCu5baSBR+vRWqSNNz28vlzRrsjKzZSR5IKS5Fsq9\n4snV32oMrOzxr9QvJnTxxpNxw9K20toqpMiyXD7dUDY0gdQ9tZB3Q9xhdcVf\nhMJC0/Qw/o77y1p2ahXAf4fnhkr8i7jSrql3YDHg/sKs5DcNZ0OWDbYTMj1k\nm1Yz\r\n=XyGa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpv1DmwHbRh4dVtEKBwOr6v1ootI1TAGZLtSjepi8QCgIhAJMuCrZD6daItt+EYvN6MRmn3m9D8UU0LZqzqjZNlnoc"}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.1_1602223521756_0.8310339365161712"},"_hasShrinkwrap":false},"1.2.2":{"name":"has-package-exports","version":"1.2.2","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>&1 >/dev/null) || safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"node test","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"0.0.1"},"devDependencies":{"@ljharb/eslint-config":"^17.2.0","aud":"^1.1.2","auto-changelog":"^2.2.1","eslint":"^7.12.1","has-package-exports":"file:.","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.0.1"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"96f4fc409e03481555d238373e17eee8791e47be","_id":"has-package-exports@1.2.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Lkf3d4JxDJsCj7aG8MeeHvqROkj10vcsXSNuW35su+ZZ6+eJpILE0qrUW7DHk9fYp+JHaPhWlyWYqK/WVdwcrA==","shasum":"bcf0e2d5c823956aa9c3072d62e787c96cddfdbc","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.2.tgz","fileCount":12,"unpackedSize":15783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmQXICRA9TVsSAnZWagAAidsQAJ7sXnuV9A2ttx/8a5O/\nw9Q68Bs69RjX8Ifc+urkgMBoEisbEalwnYBtRrluwFme/4cgf8JxeKljWPdm\npE63cBUEmcXqr3u3AWzh7WQqTC3K5h/9sZxQKHbbWd3Ny2b/qjsDSLPt3Lit\n8Mw1Y1FlhW1EH2Cl4Gjfcwq8Bunq3HhgmZ19WQ8J+bTnoFG1zr/we9ig68KZ\nxsSNTWY1iqQqKYuNm+YYvjv158XJMLCp8S2LApVvIWhCSfZXt7oehRr7ewTf\nSunNvFckbcwdWrIov3d68yd4N2HRhi6GqFCA7LktkomhUMSIwD6spmfm0YOl\nQJZg5YFwr+Rxq/o9Yh3UZY2nthGlI+2e0QQvLA53Tvycvt9CbgzdIlEfgLdc\nlBVgWYz8q6opqafc4bQj4MGfFHG2fFs3kL39akBDjAc/UE4AGAwMiWfu15Gv\nCyGTv68EYA9RohKXqUDFBrWXwk35AVD9sTVp70zFf7THt2Yvo0MQB5ZLDKOP\nJXX9kslQWBRc/3oZEaIVdAoZpMkDvu5fSWtJ0wlsw8f6hB8WhgqSpUBtf1Js\n5U2BX1YfWhpBCyqs63hbbMUPY9/2qkVowJtAqHMN97ZK8AT5849p51ruavTd\nKU/AMkRpksgIboTVYg+2nsp7EEF/DPgGJDw2UynlnfmPbd+xXRh647rMD3Ma\nmoVi\r\n=GCQ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMskNEVl++fe0ZU33getnUwzCl34mq79Lr5PUvYeWSLAiAYmF+Jd5kt/Esodg8r4fMza1KUTP3IW/g5YI9Xk1NySA=="}]},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.2_1603864007423_0.13710314694520243"},"_hasShrinkwrap":false},"1.2.3":{"name":"has-package-exports","version":"1.2.3","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js"},"scripts":{"prepublish":"not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","lint":"eslint .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"nyc tape 'test/**/*.js'","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"0.0.1"},"devDependencies":{"@ljharb/eslint-config":"^17.6.0","aud":"^1.1.5","auto-changelog":"^2.2.1","eslint":"^7.25.0","has-package-exports":"file:.","nyc":"^10.3.2","safe-publish-latest":"^1.1.4","semver":"^6.3.0","tape":"^5.2.2"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"0a5313d89972cbc7744f8070a5113fed8ad6c00d","_id":"has-package-exports@1.2.3","_nodeVersion":"16.0.0","_npmVersion":"7.10.0","dist":{"integrity":"sha512-lkLLwrNNaRsmwj+TylZJh1o3YlzLfgrl9fZKOAMj4MHjbvt7wy1J0icE6jD36dzkA0aQGoNuqY0hVN2uuPfPBA==","shasum":"4cd984c761140156e27aea7cae9473a3dd0cc4d9","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.2.3.tgz","fileCount":13,"unpackedSize":16706,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgjww2CRA9TVsSAnZWagAASRUP/0SnibCbTBBEVvI9hszd\nVfyl+trs/dEZgCegnsD2MmMA7UA9kdHNm10NHR0NMJA+S23BR4amcnA/7Ej9\nMsoFsxHbRrq0xj3Pebcfq/crLm+3zRlnJsMHt/Su4ljAI+57JGwfcVDL5jMi\n16VE9lefUREMJIF4kN0dn86vcUYJtB4V7hPBi7YM8UqnVzehKoBlWG+CihrV\n9nOAEz6bdv77+n2+dBtkNs+kMOGk1dlcdzCUoF7OBd+p3NJs0NkDk1VfGivY\nP2FBr+K2FzT6iK6PViReP8l4j/rWAGnG5cxygti5EGDZFZlXvkrkCWHO1pcJ\n2EbVfQNiXGijcBxxepsnNRXwJpW4pHIhNtenzEH0FgTNelbCSIvkCPFC2HxI\niOaIpKFMaWQy5DxPfxRsLWZZj7K1fw4Zek4J9rNWHMGjgkaSFeKC3wBNyY9n\nNaAL8m2ONGFT0hIuuFasT8C794gA9UvtdlZEE1Ul5Ih1M1T9oKT4UixtiDny\nPoR1tZB93fji3GlAsEeZ32tuJUdmgFHdlEP8Y09veyQao7BdbaKj4Myc4aPo\ndFueMUV9sf+8I03e8QhsNJDxYpZQEa+1oUby9Ijvy4gH1zQLDJWRyduTHRCn\nph5zwRzs32LGv7s94GT4tcEbsTQVULlQcbgMMf7hysFVXdnINdCmmSHa+vS9\na8NE\r\n=zPa1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPh8HsWa0INn7p7yaOvjY7kbyeczIlzQofGMzqZO/5LQIhAMoUChbtV99Kae21CyyfmWgyOHzKYAfs0cDgav90VwA4"}]},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.2.3_1619987509649_0.8276140898547981"},"_hasShrinkwrap":false},"1.3.0":{"name":"has-package-exports","version":"1.3.0","description":"Does the current node version have support for the \"exports\" field in package.json?","main":"no","browser":{"no":"./browser.js","yes":"./browser.js"},"exports":{".":[{"browser":"./browser.js","default":"./yes.js"},"./yes.js"],"./conditional":[{"browser":"./browser.js","import":"./yes.js","require":"./yes.js","node":"./yes.js","default":"./no.js"},"./no.js"],"./pattern":"./pattern.js","./pattern-trailers":"./pattern-trailers.js"},"scripts":{"prepublish":"!(type safe-publish-latest 2>&1 >/dev/null) || not-in-publish || npm run prepublishOnly","prepublishOnly":"safe-publish-latest","lint":"eslint --ext=js,mjs .","pretest":"npm run lint","test":"npm run tests-only","tests-only":"nyc tape 'test/**/*.js'","posttest":"aud --production || true","version":"auto-changelog && git add CHANGELOG.md","postversion":"auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""},"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"keywords":["package.json","package","exports","field"],"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"funding":{"url":"https://github.com/sponsors/ljharb"},"license":"MIT","bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"homepage":"https://github.com/inspect-js/has-package-exports#readme","dependencies":{"@ljharb/has-package-exports-patterns":"^0.0.2"},"devDependencies":{"@ljharb/eslint-config":"^20.2.3","aud":"^2.0.0","auto-changelog":"^2.4.0","eslint":"=8.8.0","has-package-exports":"file:.","nyc":"^10.3.2","safe-publish-latest":"^2.0.0","semver":"^6.3.0","tape":"^5.5.2"},"greenkeeper":{"ignore":["semver"]},"auto-changelog":{"output":"CHANGELOG.md","template":"keepachangelog","unreleased":false,"commitLimit":false,"backfillLimit":false,"hideCredit":true},"gitHead":"10ed49bdd97180c96cd0a24c72e5acf67c6995af","_id":"has-package-exports@1.3.0","_nodeVersion":"17.8.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-e9OeXPQnmPhYoJ63lXC4wWe34TxEGZDZ3OQX9XRqp2VwsfLl3bQBy7VehLnd34g3ef8CmYlBLGqEMKXuz8YazQ==","shasum":"68ee0892a1616893b7e6daed46b74ffdb5079ed6","tarball":"http://localhost:4545/npm/registry/has-package-exports/has-package-exports-1.3.0.tgz","fileCount":13,"unpackedSize":19477,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFijeujs5k90ktAHaPQdPFGO5ijvx6DfP5Erlu+eNzQCAiBAvNyUKfabIx6RHHCzEvIh3KGzDigMvGZemZftPUJynQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiTuVcACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoCChAAjZKw6zbcEsHqHT74JVQoL/JAXwPd5v1NeMX3Awgo+mRxS4/G\r\nZqcVexX241p+AhjxdtBWMixkSBVsX8Tk2QPlhBagrQTgfzj3TgLNnGhhMDWk\r\nSQ/w+rGGi+7d++GCQy+xNZpz38mtwAt03/4Yad3Xc63UC/N4KhN3xKhqa7Un\r\nMTgdTUYchYvToXZoaWmeaSLlNTC/U3oppjonKVxWzO6JYYgDtEayaKzBETDO\r\nMeeCi2JAnOfDNFUHbGZ9NbQ0ZX0VD4xWPqp7cRljvAeVjqM3KQC092buZppB\r\n9wLtbR5L7s7joH6/SZabtVgYClZAZgOnDgbuxQfDLbfTcWmkUYGpr22NeDfm\r\nkl2mUnv6Rc80u2TTAG/jWTgzNHMhcsy3Rymr43POfEHFAXun7bMlwnA1lkQy\r\nBjfw02IA+9tZZfNmZQUYnW0m9LIDKnU47M0zPXY8sskMpdDj4aJLAlzyj+AG\r\nObZdwrsEeWy9GgIFkykJhb0ReJZy3XGCJLvodaKeT/sx5VS6OQnOLAIcoHe5\r\nmD7JtjfzLRZq5sNknxmmnc96OWv+ns1DFRJAKg2TGz6+CaQLqDKPfU3hqtUx\r\nh3teeWgUdxmBHcHkfH6vDYRnQGAY2fi6XMANijGbrPuOBf7oddB0T/gza3Jd\r\nGf15pSLqwYfEByLpO2tQC05Tpsalxqcp9Ys=\r\n=0WVw\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"directories":{},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/has-package-exports_1.3.0_1649337692465_0.6353994811914108"},"_hasShrinkwrap":false}},"time":{"created":"2020-01-09T07:54:56.494Z","1.0.0":"2020-01-09T07:54:56.613Z","modified":"2022-05-04T18:04:33.814Z","1.1.0":"2020-05-10T21:20:40.798Z","1.2.0":"2020-10-06T07:02:23.240Z","1.2.1-alpha.0":"2020-10-09T05:36:13.580Z","1.2.1-alpha.1":"2020-10-09T05:54:40.805Z","1.2.1-alpha.2":"2020-10-09T05:56:38.782Z","1.2.1-alpha.3":"2020-10-09T05:59:17.335Z","1.2.1":"2020-10-09T06:05:21.880Z","1.2.2":"2020-10-28T05:46:47.573Z","1.2.3":"2021-05-02T20:31:49.814Z","1.3.0":"2022-04-07T13:21:32.639Z"},"maintainers":[{"name":"ljharb","email":"ljharb@gmail.com"}],"description":"Does the current node version have support for the \"exports\" field in package.json?","homepage":"https://github.com/inspect-js/has-package-exports#readme","keywords":["package.json","package","exports","field"],"repository":{"type":"git","url":"git+https://github.com/inspect-js/has-package-exports.git"},"author":{"name":"Jordan Harband","email":"ljharb@gmail.com"},"bugs":{"url":"https://github.com/inspect-js/has-package-exports/issues"},"license":"MIT","readme":"# has-package-exports [![Version Badge][npm-version-svg]][package-url]\n\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nDoes the current node version have support for the \"exports\" field in package.json?\n\nAt the time of this writing, node v12.17+ and v13+ has support for the [\"exports\" field in package.json](https://nodejs.org/api/packages.html#packages_exports).\n\nThis library exports `true` if the current node version supports it, `false` if it does not, and `null` if it's in a browser.\n\nRequire or import `has-package-exports/conditional` to determine if the current environment supports conditional exports (as of this writing, node v12.17+ and v13.7+).\n\nRequire or import `has-package-exports/pattern` to determine if the current environment supports exports patterns (as of this writing, node v12.20+ and v14.13+).\n\nRequire or import `has-package-exports/pattern-trailers` to determine if the current environment supports exports pattern trailers (as of this writing, node v14.19+ and v16.9+).\n\n## Tests\nSimply clone the repo, `npm install`, and run `npm test`\n\n[package-url]: https://npmjs.org/package/has-package-exports\n[npm-version-svg]: https://versionbadg.es/inspect-js/has-package-exports.svg\n[deps-svg]: https://david-dm.org/inspect-js/has-package-exports.svg\n[deps-url]: https://david-dm.org/inspect-js/has-package-exports\n[dev-deps-svg]: https://david-dm.org/inspect-js/has-package-exports/dev-status.svg\n[dev-deps-url]: https://david-dm.org/inspect-js/has-package-exports#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/has-package-exports.png?downloads=true&stars=true\n[license-image]: https://img.shields.io/npm/l/has-package-exports.svg\n[license-url]: LICENSE\n[downloads-image]: https://img.shields.io/npm/dm/has-package-exports.svg\n[downloads-url]: https://npm-stat.com/charts.html?package=has-package-exports\n","readmeFilename":"README.md"}
\ No newline at end of file
diff --git a/cli/tests/testdata/npm/registry/supports-esm/registry.json b/cli/tests/testdata/npm/registry/supports-esm/registry.json
new file mode 100644
index 0000000000..0114ddad40
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/supports-esm/registry.json
@@ -0,0 +1 @@
+{"_id":"supports-esm","_rev":"1-c2e0f7841e94f7fd5efa579ca9ab52c9","name":"supports-esm","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"supports-esm","version":"1.0.0","description":"Detect at runtime if Node.js supports ECMAScript modules","main":"index.js","exports":"./index.js","dependencies":{"has-package-exports":"^1.1.0"},"devDependencies":{"semver":"^7.3.2"},"scripts":{"test":"node test.js"},"repository":{"type":"git","url":"git+https://github.com/targos/supports-esm.git"},"keywords":["ESM","support","ES Modules"],"author":{"name":"Michaël Zasso","email":"targos@protonmail.com"},"license":"MIT","bugs":{"url":"https://github.com/targos/supports-esm/issues"},"homepage":"https://github.com/targos/supports-esm#readme","gitHead":"433e6107ae208a642fdf27dc0862d79a7c8b9145","_id":"supports-esm@1.0.0","_nodeVersion":"14.2.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-96Am8CDqUaC0I2+C/swJ0yEvM8ZnGn4unoers/LSdE4umhX7mELzqyLzx3HnZAluq5PXIsGMKqa7NkqaeHMPcg==","shasum":"7cc567747d0745e2b77b331c9b9cae13cf4dc60e","tarball":"http://localhost:4545/npm/registry/supports-esm/supports-esm-1.0.0.tgz","fileCount":4,"unpackedSize":3489,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJev7mjCRA9TVsSAnZWagAANe8P/0TWu/Gj/Nq6fNoK/ZSd\nAthgVBhz9pIPiLe0W3ACsb7nPUoJYykAA10N+Bzscb2S6dKLCuByxUtdiv+M\nOk10z2q+E/FRhOTPsXBRSvQdEBhKD1A1/diCGQTo9MGGchWOtwi+vlNDQUf5\nK6iNyNxjFenVj+t56A97LSQmtHq1I1bbzBa4zBO11mpDDVsTGCDnnSO0TFDO\npBBYmuMEVaHz/Yt7eIoBCQR5+DvIwgpbDrGrV0L25kT8VmZRxqRXOBFJNO2C\nYE2VlE7SZhxRwkRDyonJ3RZJzFCw9NSJTUJwXk8zRNdpv+6XB+YLj0OBgQ28\nGYHqnsJJ5kETM+y4oONU4aKWi+hn6/EteVAAaBkYE1E5NSJoOh5OEE90PytX\nY1vVWn7Yqip+fbw0QrSpgSXj0rfui26MRvCTL1wBZ7Y3phkBB/c2rLmQa7RO\nO+hbRkjk9cyzBzNXe4r2Zv2eKwn6TZNIBPT/EcYaHPnuKn4X4DnPgEB+bP2G\nqWa1C5lQ9VVt3xYYJE961uec+hAlKlllkKu4587rqvZ+OGFqi9AnIXagCBU4\n7LmAsbd/RRhlZcgTAv29qFwPf/nEgjHkcKvyJBLpmq+G9c2o3LM+oVwbZU8D\n2iQ2oyJ2ui8NavomlNxqZkoaocuKER7qgUEJWBB3aTUREhSpFZ1EK3Flm546\netuD\r\n=evMx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDiId5jvQO53FtGea7llGowJaurzOK+xWkjyCE0wA6hgIgd1KdPWDd/ofGUvBGP1Hqqdr5365vjkYyVNxnOUDbWCo="}]},"maintainers":[{"name":"targos","email":"targos+npm@protonmail.com"}],"_npmUser":{"name":"targos","email":"targos+npm@protonmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/supports-esm_1.0.0_1589623203010_0.7300584811356978"},"_hasShrinkwrap":false}},"time":{"created":"2020-05-16T10:00:03.010Z","1.0.0":"2020-05-16T10:00:03.202Z","modified":"2022-05-19T01:59:46.323Z"},"maintainers":[{"name":"targos","email":"targos+npm@protonmail.com"}],"description":"Detect at runtime if Node.js supports ECMAScript modules","homepage":"https://github.com/targos/supports-esm#readme","keywords":["ESM","support","ES Modules"],"repository":{"type":"git","url":"git+https://github.com/targos/supports-esm.git"},"author":{"name":"Michaël Zasso","email":"targos@protonmail.com"},"bugs":{"url":"https://github.com/targos/supports-esm/issues"},"license":"MIT","readme":"# supports-esm\n\n[![NPM version][npm-image]][npm-url]\n[![build status][ci-image]][ci-url]\n[![npm download][download-image]][download-url]\n[![License][license-image]][license-url]\n\nDetect at runtime if Node.js supports ECMAScript modules.\n\n## Installation\n\n`$ npm install supports-esm`\n\n## Usage\n\nThis library exports `true` if the current Node.js version is considered to have\nreasonable support for ESM features, `false` otherwise.\n\nVersion 1.x returns `true` if the following features are all present:\n\n- Dynamic imports\n- \"exports\" field in `package.json`, including conditional exports\n- Package self-reference\n\nOne notable use case is to conditionally execute an ESM or CommonJS entrypoint\nfrom a \"bin\" script, such as a command-line interface authored in ESM and\ntranspiled to CommonJS for backwards compatibility:\n\n```js\n'use strict';\n\nconst supportsESM = require('supports-esm');\n\nif (supportsESM) {\n import('../src/cli.js').catch((error) => {\n console.error(error);\n process.exit(1);\n });\n} else {\n require('../build-cjs/cli.js');\n}\n```\n\nThis snippet works in all Node.js versions >= 10.0.0.\n\n[npm-image]: https://img.shields.io/npm/v/supports-esm.svg\n[npm-url]: https://npmjs.org/package/supports-esm\n[ci-image]: https://github.com/targos/supports-esm/workflows/Test/badge.svg?branch=master\n[ci-url]: https://github.com/targos/supports-esm/actions?query=workflow%3ATest\n[download-image]: https://img.shields.io/npm/dm/supports-esm.svg\n[download-url]: https://npmjs.org/package/supports-esm\n[license-image]: https://img.shields.io/npm/l/supports-esm.svg\n[license-url]: LICENSE\n","readmeFilename":"README.md"}
\ No newline at end of file
diff --git a/cli/tests/testdata/npm/registry/supports-esm/supports-esm-1.0.0.tgz b/cli/tests/testdata/npm/registry/supports-esm/supports-esm-1.0.0.tgz
new file mode 100644
index 0000000000..64e085fa32
Binary files /dev/null and b/cli/tests/testdata/npm/registry/supports-esm/supports-esm-1.0.0.tgz differ
diff --git a/ext/node/02_require.js b/ext/node/02_require.js
index 2174ff8a9f..0f11253f2f 100644
--- a/ext/node/02_require.js
+++ b/ext/node/02_require.js
@@ -303,7 +303,12 @@
// 1. name/.*
// 2. @scope/name/.*
const EXPORTS_PATTERN = /^((?:@[^/\\%]+\/)?[^./\\%][^/\\%]*)(\/.*)?$/;
- function resolveExports(modulesPath, request, parentPath) {
+ function resolveExports(
+ modulesPath,
+ request,
+ parentPath,
+ usesLocalNodeModulesDir,
+ ) {
// The implementation's behavior is meant to mirror resolution in ESM.
const [, name, expansion = ""] =
StringPrototypeMatch(request, EXPORTS_PATTERN) || [];
@@ -312,6 +317,7 @@
}
return core.ops.op_require_resolve_exports(
+ usesLocalNodeModulesDir,
modulesPath,
request,
name,
@@ -349,7 +355,12 @@
if (curPath && stat(curPath) < 1) continue;
if (!absoluteRequest) {
- const exportsResolved = resolveExports(curPath, request, parentPath);
+ const exportsResolved = resolveExports(
+ curPath,
+ request,
+ parentPath,
+ usesLocalNodeModulesDir,
+ );
if (exportsResolved) {
return exportsResolved;
}
diff --git a/ext/node/lib.rs b/ext/node/lib.rs
index b2443db0bb..e8ff3c5492 100644
--- a/ext/node/lib.rs
+++ b/ext/node/lib.rs
@@ -542,6 +542,7 @@ pub fn op_require_as_file_path(file_or_url: String) -> String {
#[op]
fn op_require_resolve_exports(
state: &mut OpState,
+ uses_local_node_modules_dir: bool,
modules_path: String,
_request: String,
name: String,
@@ -550,7 +551,9 @@ fn op_require_resolve_exports(
) -> Result