Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[babel 8] Type checking preset-react options#12741

Merged
nicolo-ribaudo merged 14 commits intobabel:mainfrom
JLHwung:type-checking-react-options
Mar 26, 2021
Merged

[babel 8] Type checking preset-react options#12741
nicolo-ribaudo merged 14 commits intobabel:mainfrom
JLHwung:type-checking-react-options

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Feb 2, 2021

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change? Y, behind the BABEL_8_BREAKING flag
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link babel/website#2765
Any Dependency Changes?
License MIT

This PR was derived from #10927. It focuses on checking @babel/preset-react options only.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Feb 2, 2021

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 0c34bc2:

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

@babel-bot
Copy link
Collaborator

babel-bot commented Feb 2, 2021

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

@JLHwung JLHwung mentioned this pull request Feb 3, 2021
34 tasks
@JLHwung JLHwung added this to the Babel 8.0 milestone Feb 3, 2021
@JLHwung JLHwung force-pushed the type-checking-react-options branch from 99782ad to 1a61ea0 Compare February 24, 2021 20:15
@JLHwung JLHwung force-pushed the type-checking-react-options branch from 5259580 to 51e017d Compare March 25, 2021 18:43
@JLHwung JLHwung requested a review from hzoo March 25, 2021 18:43
throwIfNamespace,
};
} else {
let { pragma, pragmaFrag } = options;
Copy link
Member

Choose a reason for hiding this comment

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

do we need to do it here too?

let { pragma, pragmaFrag, development = false } = opts;

kinda confused what below is doing.. maybe can just do|| false

const development = !!options.development

Copy link
Member

Choose a reason for hiding this comment

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

I think it's different to keep the Babel 7 behavior the same (where we coerced everything to a boolean); if we use a default value in the destructuring it will change with falsy values.

const libBundles = [
"packages/babel-parser",
"packages/babel-plugin-proposal-optional-chaining",
"packages/babel-preset-react",
Copy link
Member

Choose a reason for hiding this comment

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

everything is getting bundled huh 😄, feel like eventually this list will be the opposite?

Copy link
Member

Choose a reason for hiding this comment

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

In Babel 8 I'd like to eventually bundle everything, so that we don't pay the cost of resolving all the files (some packages have many of them)

@JLHwung JLHwung requested a review from nicolo-ribaudo March 25, 2021 20:54
@nicolo-ribaudo
Copy link
Member

For the failure, we can modify the rollup options to avoid throwing for that warning.

@nicolo-ribaudo
Copy link
Member

I can push a fix for the failure if you want

@nicolo-ribaudo nicolo-ribaudo changed the title Type checking preset-react options [babel 8] Type checking preset-react options Mar 25, 2021
@nicolo-ribaudo nicolo-ribaudo merged commit 1e3ef05 into babel:main Mar 26, 2021
@nicolo-ribaudo nicolo-ribaudo deleted the type-checking-react-options branch March 26, 2021 19:11
@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 Jun 26, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 26, 2021
@JLHwung JLHwung added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: react outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants