-
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
doc: add doc for --loader option #22104
Conversation
doc/api/cli.md
Outdated
added: v9.0.0 | ||
--> | ||
|
||
Specify a customer loader, to load [ECMAScript Modules][]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/customer/custom
Also, it should be noted that this is still an experimental feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it's been brought up before but given that --loader
is still experimental I think it would it be better if it were --experimental-loader
in much the same way other experimental stuff is prefixed with --experimental-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdalton given you have to run node with --experimental-modules anyway to use this - why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @jasnell ! fixed the typo.
Should i mention here, that it needs to be used with --experimental-modules
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
given you have to run node with --experimental-modules anyway to use this - why?
I like the consistency of the --experimental-
prefix for experimental things. The prefix makes it explicit that the feature/sub-feature is experimental.
doc/api/cli.md
Outdated
@@ -687,3 +694,4 @@ greater than `4` (its current default value). For more information, see the | |||
[debugger]: debugger.html | |||
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor | |||
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html | |||
[ECMAScript Modules]: esm.html#loader_hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
esm.html#esm_loader_hooks
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! fixed now.
cc @nodejs/modules-active-members? |
It seems |
2406e35
to
9d6356d
Compare
@vsemozhetbyt Added docs for |
cc @nodejs/documentation for |
Linter issue:
|
@vsemozhetbyt thanks, installed markdown linter now. Will ensure i run this, before pushing any more doc updates. |
cc @nodejs/build-infra re CI error:
|
This comment has been minimized.
This comment has been minimized.
0dea374
to
341d4b0
Compare
This comment has been minimized.
This comment has been minimized.
@nodejs/documentation Can anybody confident enough look into |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
341d4b0
to
a88503c
Compare
This comment has been minimized.
This comment has been minimized.
Another CI: https://ci.nodejs.org/job/node-test-pull-request/16313/ If CI is green, I will land this PR tomorrow if nobody objects. |
a88503c
to
b4d15f5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🎉
In last CIs, it seems we have some repetitive fails in One more CI to be sure: https://ci.nodejs.org/job/node-test-pull-request/16332/ |
@vsemozhetbyt sorry, this maybe completely off topic, but why are |
Sorry, this also puzzled me and I thought that it was because I just did not know C++ :) |
b4d15f5
to
b4897b6
Compare
@jdalton : updated the doc for |
@SirR4T It's better. But
|
b4897b6
to
188fb32
Compare
thanks, @jdalton , fixed. |
doc/api/cli.md
Outdated
@@ -687,3 +694,4 @@ greater than `4` (its current default value). For more information, see the | |||
[debugger]: debugger.html | |||
[emit_warning]: process.html#process_process_emitwarning_warning_type_code_ctor | |||
[libuv threadpool documentation]: http://docs.libuv.org/en/latest/threadpool.html | |||
[experimental ECMAScript Module]: esm.html#esm_loader_hooks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: reference list is sorted in ASCII order, so this item needs to be placed before the [libuv threadpool documentation]
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, will fix that. Any way we could add this as a rule to make lint
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be helpful to have it as a rule as we are already a bit messy in some docs in these sections,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would updating remark-preset-lint-node to also include remark-lint-alphabetize-lists work? I expect this would cause build failures, if remark-preset-lint-node
was updated before fixes for that landed in master. How would the transition be handled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that remark-lint-alphabetize-lists
can fix this case as reference lists are not common markdown lists. Maybe @rubys can tell if there is a ready easy solution for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remark calls those lines definitions. Looking at the source to remark-lint-alphabetize-lists
, if list
where changed to definition
on line 18, the code would do what you want.
#22271 is merged, so let's unblock and run CI: |
Landed in 9d6619e |
PR-URL: #22104 Fixes: #21230 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: John-David Dalton <[email protected]>
PR-URL: #22104 Fixes: #21230 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: John-David Dalton <[email protected]>
PR-URL: #22104 Fixes: #21230 Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: John-David Dalton <[email protected]>
Fixes #21230
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes