-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Refine "require" / "import" conditions constraints #35311
Conversation
Review requested:
|
cb70510
to
795e65e
Compare
PR-URL: #35311 Reviewed-By: Jan Krems <jan.krems@gmail.com>
Landed in 226b186. |
This landed without the required second approval. Just noting it as a polite FYI. We have a largely manual process so these things are inevitable from time to time. ¯\(ツ)/¯ One more data point that switching to the commit-queue (after it has been sufficiently real-world tested) as the primary (only?) means to land things will help us enforce a consistent process. |
I had it in my head that the 7 day limit had been removed in a previous PR to the guidelines. Or was the waiting period only removed for PRs with two approvals? That was my misunderstanding of that change then, apologies. |
No worries. The fact that you and 100+ other people are expected to keep the various rules straight is a bit of a process bug in my opinion. These things are simply going to happen from time to time. (Until we get a robust commit-queue that everyone is using!) |
Well at least we have vigilant contributors to spot these things, so thanks for letting me know about it. There's no replacing a good human eye on these things :) |
I won't stop if others feel strongly about enforcing the process here, but I'd prefer we don't revert. We have enough trouble getting stuff landed. This is a narrow doc change. If someone objects to it, they can open the revert PR or better yet open a PR with further revisions that can hopefully get consensus. |
agree no need to revert. |
PR-URL: #35311 Reviewed-By: Jan Krems <jan.krems@gmail.com>
PR-URL: nodejs#35311 Reviewed-By: Jan Krems <jan.krems@gmail.com>
PR-URL: nodejs#35311 Reviewed-By: Jan Krems <jan.krems@gmail.com>
This PR follows up from the discussion in nodejs/modules#556 in relaxing the constraint that
"require"
and"import"
should be exhaustive and permitting other tools to decide to match neither of these conditions effectively.The important property of mutual exclusivity remains though.
I also took the opportunity to clarify that
"import"
applies for any top-level resolve or load operation in the ES module loader and that"require"
is able to resolve non-CommonJS formats, to try and make the fundamental definitions of these conditions clearer for tools etc.It's a fine line between clarify and understandability here, another reason to work towards separating "guide" information from "api" information into two halves of this section ideally over time.
Feedback welcome.
//cc @nodejs/modules-active-members @lukastaegert @sokra.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes