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

lib: simplify the readonly properties of icu by JacksonTian · Pull Request #13221 · nodejs/node · GitHub

/ node Public

lib: simplify the readonly properties of icu - #13221

Closed
JacksonTian wants to merge 1 commit into
nodejs:masterfrom
JacksonTian:versions
Closed

lib: simplify the readonly properties of icu#13221
JacksonTian wants to merge 1 commit into
nodejs:masterfrom
JacksonTian:versions

Conversation

JacksonTian commented May 25, 2017
edited
Loading

Copy link
Copy Markdown
Contributor

Call Object.defineProperty() twice to set readonly property is
unnecessary.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

lib/internal/bootstrap_node

nodejs-github-bot added the lib / src Issues and PRs related to general changes in the lib or src directory. label May 25, 2017
mscdex added i18n-api Issues and PRs related to the i18n implementation. and removed lib / src Issues and PRs related to general changes in the lib or src directory. labels May 25, 2017

refack commented May 25, 2017

Copy link
Copy Markdown
Contributor

I'd assume this whole mechanism is necessary if the locale is changed in runtime. @nodejs/intl is there a way to do that?

Comment thread test/parallel/test-process-versions.js Outdated

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

nit: Can you switch to for(var key of expected_keys) { } instead?

kunalspathak commented May 26, 2017
edited
Loading

Copy link
Copy Markdown
Member

I'd assume this whole mechanism is necessary if the locale is changed in runtime.

Good point. But I am wondering if the locale changed at runtime, icu.getVersion(name); would still return the locales present when node instance was bootstrapped.

Copy link
Copy Markdown
Contributor Author

Yes, The locale can be changed, but the ICU version not.

jasnell commented Jun 1, 2017

Copy link
Copy Markdown
Member

ping @srl295

Call Object.defineProperty() twice to set readonly property is
unnecessary.

Copy link
Copy Markdown
Member

I guess this can land as is?

jasnell commented Aug 30, 2017

Copy link
Copy Markdown
Member

With fresh CI, yes I believe it can.

Copy link
Copy Markdown
Member

Copy link
Copy Markdown
Member

Landed in 83a5eef

BridgeAR closed this Aug 30, 2017
BridgeAR pushed a commit that referenced this pull request Aug 30, 2017
Call Object.defineProperty() twice to set readonly property is
unnecessary.

PR-URL: #13221
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

srl295 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

👍 makes it look too easy

srl295 commented Aug 30, 2017

Copy link
Copy Markdown
Member

@refack no, i don't think there's a mechanism to change the default locale at runtime exposed to node.

JacksonTian deleted the versions branch September 2, 2017 08:01
addaleax pushed a commit to addaleax/ayo that referenced this pull request Sep 5, 2017
Call Object.defineProperty() twice to set readonly property is
unnecessary.

PR-URL: nodejs/node#13221
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins pushed a commit that referenced this pull request Sep 10, 2017
Call Object.defineProperty() twice to set readonly property is
unnecessary.

PR-URL: #13221
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
MylesBorins mentioned this pull request Sep 10, 2017
MylesBorins pushed a commit that referenced this pull request Sep 12, 2017
Call Object.defineProperty() twice to set readonly property is
unnecessary.

PR-URL: #13221
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>

Copy link
Copy Markdown
Contributor

Should this be backported to v6.x-staging? If yes please follow the guide and raise a backport PR, if no let me know or add the dont-land-on label.

Copy link
Copy Markdown
Contributor Author

@MylesBorins It seems the pre-condition #9266 hasn't be backported into v6.x-staging.

gibfahn commented Sep 24, 2017

Copy link
Copy Markdown
Member

Left a note on #9266, marking this as don't land for now so we don't keep triaging it for 6.x.

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

i18n-api Issues and PRs related to the i18n implementation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.


Back | FazBrowse Home | New Git URL