Implement objectRestNoSymbols, setSpreadProperties and pureGetters for object rest/spread#12505
Merged
nicolo-ribaudo merged 4 commits intoJan 14, 2021
Conversation
nicolo-ribaudo
commented
Dec 15, 2020
| if (typeof loose !== "boolean") { | ||
| throw new Error(".loose must be a boolean, or undefined"); | ||
| } | ||
| const { useBuiltIns = false } = opts; |
Member
Author
There was a problem hiding this comment.
In Babel 8 we should change this default to be based on api.targets.
24 tasks
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/37351/ |
JLHwung
reviewed
Dec 15, 2020
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 53e6a15:
|
JLHwung
approved these changes
Dec 15, 2020
d9c06c0 to
526fa68
Compare
526fa68 to
53e6a15
Compare
63c7a5a to
caa4fda
Compare
hzoo
approved these changes
Jan 14, 2021
nicolo-ribaudo
added a commit
that referenced
this pull request
Jan 24, 2021
nicolo-ribaudo
added a commit
that referenced
this pull request
Jan 24, 2021
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Feb 4, 2021
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Feb 10, 2021
nicolo-ribaudo
added a commit
to nicolo-ribaudo/babel
that referenced
this pull request
Feb 11, 2021
nicolo-ribaudo
added a commit
that referenced
this pull request
Feb 16, 2021
- `mutableTemplateObject` and `ignoreToPrimitiveHint` (#12408) - `setClassMethods` (#12407) - `setComputedProperties` (#12490) - `ignoreFunctionLength` (#12491) - `noDocumentAll` (#12481) - `iterableIsArray` and `arrayLikeIsIterable` (#12489) - `pureGetters` (#12504) - `skipForOfIteratorClosing` (#12496) - `objectRestNoSymbols`, `setSpreadProperties` and `pureGetters` (#12505) - `noNewArrows` (#12613, #12793) - `setPublicClassFields` and `privateFieldsAsProperties` (#12497) - `constantReexports` and `enumerableModuleMeta` (#12618) - `constantSuper`, `superIsCallableConstructor` and `noClassCalls` (#12726) Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Huáng Jùnliàng <JLHwung@users.noreply.github.com>
nicolo-ribaudo
added a commit
that referenced
this pull request
Feb 16, 2021
- `mutableTemplateObject` and `ignoreToPrimitiveHint` (#12408) - `setClassMethods` (#12407) - `setComputedProperties` (#12490) - `ignoreFunctionLength` (#12491) - `noDocumentAll` (#12481) - `iterableIsArray` and `arrayLikeIsIterable` (#12489) - `pureGetters` (#12504) - `skipForOfIteratorClosing` (#12496) - `objectRestNoSymbols`, `setSpreadProperties` and `pureGetters` (#12505) - `noNewArrows` (#12613, #12793) - `setPublicClassFields` and `privateFieldsAsProperties` (#12497) - `constantReexports` and `enumerableModuleMeta` (#12618) - `constantSuper`, `superIsCallableConstructor` and `noClassCalls` (#12726) Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Huáng Jùnliàng <JLHwung@users.noreply.github.com>
nicolo-ribaudo
added a commit
that referenced
this pull request
Feb 21, 2021
- `mutableTemplateObject` and `ignoreToPrimitiveHint` (#12408) - `setClassMethods` (#12407) - `setComputedProperties` (#12490) - `ignoreFunctionLength` (#12491) - `noDocumentAll` (#12481) - `iterableIsArray` and `arrayLikeIsIterable` (#12489) - `pureGetters` (#12504) - `skipForOfIteratorClosing` (#12496) - `objectRestNoSymbols`, `setSpreadProperties` and `pureGetters` (#12505) - `noNewArrows` (#12613, #12793) - `setPublicClassFields` and `privateFieldsAsProperties` (#12497) - `constantReexports` and `enumerableModuleMeta` (#12618) - `constantSuper`, `superIsCallableConstructor` and `noClassCalls` (#12726) Co-authored-by: Justin Ridgewell <justin@ridgewell.name> Co-authored-by: Huáng Jùnliàng <JLHwung@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main PR: #12219
RFC: babel/rfcs#5
While implementing
objectRestNoSymbolsandsetSpreadProperties, I noticed that there is a third assumptions in this plugin: that getters are pure. Since we have exactly thepureGettersassumptions, I think it's fine to re-use it.