FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

esm: replace --entry-type with --input-type by GeoffreyBooth · Pull Request #27184 · nodejs/node · GitHub

/ node Public

esm: replace --entry-type with --input-type - #27184

Closed
GeoffreyBooth wants to merge 1 commit into
nodejs:masterfrom
GeoffreyBooth:flag-for-string-input-only
Closed

esm: replace --entry-type with --input-type#27184
GeoffreyBooth wants to merge 1 commit into
nodejs:masterfrom
GeoffreyBooth:flag-for-string-input-only

Conversation

Copy link
Copy Markdown
Member

This is a change discussed and approved by the modules working group per our meeting today on 2019-04-10. We’re hoping that this change can be merged in before the release of Node 12.

Per nodejs/modules#300 (comment), this PR replaces --entry-type with --input-type, a flag just like --entry-type but only for --eval, --print and STDIN.

This way we still provide a way to use ESM in those non-file inputs, but we’re removing the footgun that is --entry-type in its current form. To use ESM in files, the files need to end in .mjs or be in a "type": "module" package scope.

Tests and docs updated.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label Apr 11, 2019
GeoffreyBooth force-pushed the flag-for-string-input-only branch from 8e92ab2 to a4047d3 Compare April 11, 2019 02:16
Comment thread doc/api/errors.md Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Was this left in on purpose?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes, see the section head:

These errors have never been released, but had been present on master between
releases.

hybrist left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM once the entry type error in the docs is removed

Comment thread lib/internal/main/repl.js Outdated
devsnek added esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. labels Apr 11, 2019
devsnek requested a review from vsemozhetbyt April 11, 2019 16:33
Comment thread doc/api/errors.md Outdated

joyeecheung left a comment
edited
Loading

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Code LGTM. I will defer the decision around feature change to the modules group, but looks like people welcome it there, and I personally like this approach better. Great work researching into the details! 👍

ljharb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the modules group achieved consensus on this change, so we do support it

Copy link
Copy Markdown
Collaborator

GeoffreyBooth force-pushed the flag-for-string-input-only branch 3 times, most recently from ab4712a to fb9d934 Compare April 15, 2019 21:22
BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Apr 16, 2019

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

MylesBorins force-pushed the flag-for-string-input-only branch from d2eaa1e to 3e037fa Compare April 16, 2019 15:44

Copy link
Copy Markdown
Collaborator

MylesBorins left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

Copy link
Copy Markdown
Contributor

landed in 96e46d3

MylesBorins pushed a commit that referenced this pull request Apr 16, 2019
New flag is for string input only

PR-URL: #27184
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
ljharb deleted the flag-for-string-input-only branch April 16, 2019 17:19
chjj added a commit to chjj/bthreads that referenced this pull request Apr 30, 2019
chjj added a commit to bcoin-org/bmocha that referenced this pull request May 3, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation. experimental Issues and PRs related to experimental features. lib / src Issues and PRs related to general changes in the lib or src directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants


Back | FazBrowse Home | New Git URL