Skip to content

Conversation

@nicolo-ribaudo
Copy link
Member

@nicolo-ribaudo nicolo-ribaudo commented Dec 12, 2020

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

While reading the RFC again, I noticed that my previous implementation didn't exactly reflect it.

To avoid conflicts between assumptions set in presets, they will only be able to enable them (i.e. set them to true). The only way to disable an already enabled assumption is to explicitly do it in a configuration file or in programmatic options.

(discussion - Sorry I minimized it because I coudn't find the "Mark as resolved" button and now I can't un-minimize them)

This PR needs to be merged before 7.13, otherwise it would be a breaking change.

@babel-bot
Copy link
Collaborator

babel-bot commented Dec 12, 2020

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/35177/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 12, 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 8435f26:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

loadOptions({
presets: [() => ({ assumptions: { mutableTemplateObject: false } })],
}),
).toThrow();
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: add error message assertion here so it doesn't pass on incorrect error messages.

@nicolo-ribaudo nicolo-ribaudo merged commit e177fa5 into babel:feat-7.13.0/babel-core-features Dec 14, 2020
@nicolo-ribaudo nicolo-ribaudo deleted the disallow-assumptions-false-in-preset branch December 14, 2020 20:39
nicolo-ribaudo added a commit to nicolo-ribaudo/babel that referenced this pull request Jan 12, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit that referenced this pull request Jan 24, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit that referenced this pull request Jan 24, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit to nicolo-ribaudo/babel that referenced this pull request Feb 4, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit to nicolo-ribaudo/babel that referenced this pull request Feb 10, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit to nicolo-ribaudo/babel that referenced this pull request Feb 11, 2021
* Disallow setting assumptions to `false` in presets

* Error message

* Fix
nicolo-ribaudo added a commit that referenced this pull request Feb 16, 2021
- Disallow setting assumptions to `false` in presets (#12498)
nicolo-ribaudo added a commit that referenced this pull request Feb 21, 2021
- Disallow setting assumptions to `false` in presets (#12498)
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Mar 16, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: assumptions outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants