-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
chore: add exports
field to all package.json
s
#9921
Conversation
packages/jest-runtime/src/__tests__/test_root/node_modules/jest-resolve-test/package.json
Outdated
Show resolved
Hide resolved
packages/jest-runtime/src/__tests__/test_root/module_dir/my-module/package.json
Outdated
Show resolved
Hide resolved
packages/jest-runtime/src/__tests__/test_root/node_modules/not-a-haste-package/package.json
Outdated
Show resolved
Hide resolved
hah, my search and replace failed me 😅 I'll roll all |
Since this changes every single |
I'm fine with both. Waiting will produce less unnecessary clutter in npm, but does it really matter at its scale? :D |
Codecov Report
@@ Coverage Diff @@
## master #9921 +/- ##
=======================================
Coverage 64.23% 64.23%
=======================================
Files 292 292
Lines 12466 12466
Branches 3075 3077 +2
=======================================
Hits 8007 8007
Misses 3810 3810
Partials 649 649 Continue to review full report at Codecov.
|
@SimenB there are ways to introduce the package.exports field that would be Semver-Minor. Either enumerating existing fields, or as a last case exporting "./" LMK if you want any help or review |
@MylesBorins thanks for chiming in! I explicitly want to disallow importing from |
Tbh most folks from the modules team gate that pattern and down want people
using it 😅.
Depending on paths you have you could more explicitly nap directories and
files you want to make available
…On Wed, Apr 29, 2020, 6:53 PM Simen Bekkhus ***@***.***> wrote:
@MylesBorins <https://github.com/MylesBorins> thanks for chiming in! I
explicitly want to disallow importing from build/ etc, so I'm fine with
making a breaking change. Could do "./": "./" as a minor now I guess, and
then only make it stricter for a major release? Not sure it gives us much,
though. Or do you want us to do it? Happy to if you think it's worthwhile
🙂
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9921 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADZYV34ZFDB2Q64KP4LHFLRPCVX5ANCNFSM4MT26G3Q>
.
|
Haha yeah, I noticed 😀 My unpushed branch exposes the file in |
Just do a major and maybe backport any security or big bugs. Numbers are
cheap 😇, although I recognize time isn't 😅
…On Wed, Apr 29, 2020, 6:59 PM Simen Bekkhus ***@***.***> wrote:
Haha yeah, I noticed 😀
My unpushed branch exposes the file in main, package.json and, if the
package has a binary, the binary file. I don't really want anything else,
we've been bitten quite a few times by people breaking since we renamed a
file or some such
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#9921 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADZYV3KFQBYV47UHW32B3LRPCWNBANCNFSM4MT26G3Q>
.
|
exports
field to all package.json
s
I'll land the non-breaking parts now. EDIT: "now" - sometime in the coming few days 😀 |
3cd69f1
to
c6a1831
Compare
* master: (398 commits) chore(breaking): remove undocumented `enabledTestsMap` config (jestjs#10787) Change expect.not.objectContaining() to match documentation (jestjs#10708) chore: add name to root project (jestjs#10782) Added explanation on how to use custom @jest-environment to docs (jestjs#10783) fix: remove deprecated functions from the jest object (jestjs#9853) chore: convert jest-runtime to ESM (jestjs#10325) fix(resolve): use escalade to find package.json (jestjs#10781) feat(jest-runner): set exit code to 1 if test logs after teardown (jestjs#10728) chore: add `exports` field to all `package.json`s (jestjs#9921) fix: do not inject `global` variable into module wrapper (jestjs#10644) chore: migrate jest-resolve to ESM (jestjs#10688) chore(transform): refactor API to pass an options bag around rather than multiple boolean options (jestjs#10753) chore: default to node test env rather than browser (jestjs#9874) fix: drop support for node 13 (jestjs#10685) chore: show enhanced syntax error for all syntax errors (jestjs#10749) chore: update lockfile after publish v26.6.3 chore: update changelog for release Don't throw an error if mock dependency can't be found (jestjs#10779) chore: bump babel core types (jestjs#10772) ...
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
See https://nodejs.org/api/packages.html#packages_package_entry_points
This is breaking as node will throw on subpath access.
Test plan
Green CI