Skip to content

vm: rename vm.Module to vm.SourceTextModule - #22007

Merged
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:rename-vm-module
Jul 31, 2018
Merged

vm: rename vm.Module to vm.SourceTextModule#22007
devsnek merged 1 commit into
nodejs:masterfrom
devsnek:rename-vm-module

Conversation

@devsnek

Copy link
Copy Markdown
Member

Should have always been named SourceTextModule

/cc @nodejs/vm

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

@devsnekdevsnek added the vm Issues and PRs related to the vm subsystem. label Jul 28, 2018
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. process Issues and PRs related to the process subsystem. vm Issues and PRs related to the vm subsystem. labels Jul 28, 2018
@devsnek

Copy link
Copy Markdown
MemberAuthor

@targos

Copy link
Copy Markdown
Member

Is it in preparation for adding other kinds of modules?

@devsnek

devsnek commented Jul 28, 2018

Copy link
Copy Markdown
MemberAuthor

@targos mostly... even if the spec doesn't define any more types we should still name them correctly.

@cjihrigcjihrig added the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 28, 2018

@cjihrigcjihrig 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.

No opinion on the change, but the code LGTM.

@targos

Copy link
Copy Markdown
Member

It doesn't have to be semver major. The API is experimental and behind a flag

@TimothyGuTimothyGu removed the semver-major PRs that contain breaking changes and should be released in the next major version. label Jul 28, 2018
@addaleax

Copy link
Copy Markdown
Member

Not that you have to, but can you explain this? What kind of ES modules would not have some kind of source text associated with them? If this is to distinguish from e.g. WASM modules or so, maybe referring to the used language might be better?

(Also, fyi: @nodejs/modules)

@TimothyGu

TimothyGu commented Jul 28, 2018

Copy link
Copy Markdown
Member

@addaleax At the last TC39 meeting, a new type of Module Records backed by JavaScript source called Dynamic Module Records was discussed, and it is now at Stage 1. Regardless of whether that proposal makes it all the way into the spec, SourceTextModule is indeed a more descriptive and accurate name for what this class represents.

@TimothyGu

Copy link
Copy Markdown
Member

@devsnek Would also be nice if my last comment (#22007 (comment)) is integrated into the commit message body.

@devsnek

Copy link
Copy Markdown
MemberAuthor

@TimothyGu will do when I land 👍

@mcollinamcollina 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.

LGTM

@targos

Copy link
Copy Markdown
Member

At the last TC39 meeting, a new type of Module Records backed by
JavaScript source called Dynamic Module Records was discussed, and
it is now at Stage 1. Regardless of whether that proposal makes it
all the way into the spec, SourceTextModule is indeed a more
descriptive and accurate name for what this class represents.
PR-URL: nodejs#22007
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
@devsnekdevsnek closed this Jul 31, 2018
@devsnek
devsnek merged commit 2bdcdfc into nodejs:masterJul 31, 2018
@devsnek
devsnek deleted the rename-vm-module branch July 31, 2018 15:25
@devsnek

Copy link
Copy Markdown
MemberAuthor

landed in 2bdcdfc

targos pushed a commit that referenced this pull request Aug 1, 2018
At the last TC39 meeting, a new type of Module Records backed by
JavaScript source called Dynamic Module Records was discussed, and
it is now at Stage 1. Regardless of whether that proposal makes it
all the way into the spec, SourceTextModule is indeed a more
descriptive and accurate name for what this class represents.
PR-URL: #22007
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yuta Hiroto <hello@hiroppy.me>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: John-David Dalton <john.david.dalton@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
@targostargos mentioned this pull request Aug 1, 2018
@refackrefack mentioned this pull request Oct 18, 2018
3 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.processIssues and PRs related to the process subsystem.vmIssues and PRs related to the vm subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

15 participants

@devsnek@nodejs-github-bot@targos@addaleax@TimothyGu@jdalton@ljharb@mcollina@bmeck@jasnell@hybrist@benjamingr@cjihrig@hiroppy@BridgeAR