Fix noFallthroughCasesInSwitch/jsx object is not extensible#9921
Conversation
mrmckeb
left a comment
There was a problem hiding this comment.
@iansu @ianschmitz I've had this reported to me privately too, this seems like a change to the behaviour of ts.readConfigFile where the object is no longer extensible.
|
Re-running CI. |
|
@ryota-murakami Have you check the inner properties of |
|
@benneq @KonstantinSimeonov I'm sorry for slow response.
I've checked inner properties of compilerOptions are frozen. And I'll share video clip that recorded running bellow code without Error. if (appTsConfig.compilerOptions == null) {
appTsConfig.compilerOptions = {};
firstTimeSetup = true;
} else {
appTsConfig.compilerOptions = { ...appTsConfig.compilerOptions };
for(const option in appTsConfig.compilerOptions) {
if (!Object.isFrozen(option)) new Error('appTsConfig.compilerOptions option should be frozen')
}
} |
for(const option in appTsConfig.compilerOptions) {
if (!Object.isFrozen(option)) new Error('appTsConfig.compilerOptions option should be frozen')
}This is iterating over the keys of the object, which are strings and are always frozen and is not checking whether the properties are frozen or not 😛 . I think @benneq 's idea was to make sure that no crashes would occur if any of |
Co-authored-by: Konstantin Simeonov <[email protected]>
|
@KonstantinSimeonov Thanks, that iterator is garbage 😅 But I don't understand why guys care about property frozen status? |
|
Thanks folks! |
|
@benneq @KonstantinSimeonov I got it why should we handle Thank you for your support about this PR! |
|
@ianschmitz should it make a new release version? |
due to 9921 is not released yet (react/create-react-app#9921)
|
Can we please have a release with this fix? The problem is occurring for a lot of people in #9868 |
* Fix noFallthroughCasesInSwitch/jsx object is not extensible (react#9921) Co-authored-by: Konstantin Simeonov <[email protected]> * Add logo license to README * Remove trailing space in reportWebVitals.ts (react#10040) * docs: add React Testing Library as a library requiring jsdom (react#10052) Co-authored-by: Ian Schmitz <[email protected]> * Increase Workbox's maximumFileSizeToCacheInBytes (react#10048) * Create FUNDING.yml * replace inquirer with prompts (react#10083) - remove `react-dev-utils/inquirer` public import * Prepare 4.0.1 release * Prepare 4.0.1 release * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] Co-authored-by: Ryota Murakami <[email protected]> Co-authored-by: Konstantin Simeonov <[email protected]> Co-authored-by: Ian Sutherland <[email protected]> Co-authored-by: sho90 <[email protected]> Co-authored-by: Anyul Rivas <[email protected]> Co-authored-by: Ian Schmitz <[email protected]> Co-authored-by: Jeffrey Posnick <[email protected]> Co-authored-by: Evan Bacon <[email protected]>
* Fix noFallthroughCasesInSwitch/jsx object is not extensible (react#9921) Co-authored-by: Konstantin Simeonov <[email protected]> * Add logo license to README * Remove trailing space in reportWebVitals.ts (react#10040) * docs: add React Testing Library as a library requiring jsdom (react#10052) Co-authored-by: Ian Schmitz <[email protected]> * Increase Workbox's maximumFileSizeToCacheInBytes (react#10048) * Create FUNDING.yml * replace inquirer with prompts (react#10083) - remove `react-dev-utils/inquirer` public import * Prepare 4.0.1 release * Prepare 4.0.1 release * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * chore: bump web-vital dependency version (react#10143) * chore: bump typescript version (react#10141) Co-authored-by: Ian Schmitz <[email protected]> * Add TypeScript 4.x as peerDependency to react-scripts(react#9964) * remove chalk from formatWebpackMessages (react#10198) * Upgrade @svgr/webpack to fix build error (react#10213) Co-authored-by: Ian Schmitz <[email protected]> * Improve vendor chunk names in development (react#9569) * Update postcss packages (react#10003) Co-authored-by: Ian Schmitz <[email protected]> * Recovered some integration tests (react#10091) * Upgrade sass-loader (react#9988) * Move ESLint cache file into node_modules (react#9977) Co-authored-by: Ian Schmitz <[email protected]> * Revert "Update postcss packages" (react#10216) This reverts commit 580ed5d. * Remove references to Node 8 (react#10214) * fix(react-scripts): add missing peer dependency react and update react-refresh-webpack-plugin (react#9872) * Update using-the-public-folder.md (react#10314) Some library --> Some libraries * docs: add missing override options for Jest config (react#9473) * Fix CI tests (react#10217) * appTsConfig immutability handling by immer (react#10027) Co-authored-by: mad-jose <[email protected]> * Add support for new BUILD_PATH advanced configuration variable (react#8986) * Add opt-out for eslint-webpack-plugin (react#10170) * Prepare 4.0.2 release * Publish - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] - [email protected] * tests: update test case to match the description (react#10384) * Bump webpack-dev-server 3.11.0 -> 3.11.1 (react#10312) Resolves react#10084 security vulnerability in websocket-driver library version 0.5.6, imported transitively by sockjs * Upgrade eslint-webpack-plugin to fix opt-out flag (react#10590) * update immer to 8.0.1 to address vulnerability (react#10412) Resolves react#10411 Bumps immer version to 8.0.1 to address the prototype pollution vulnerability with the current 7.0.9 version. * Prepare 4.0.3 release * Update CHANGELOG * Publish - [email protected] - [email protected] - [email protected] Co-authored-by: Ryota Murakami <[email protected]> Co-authored-by: Konstantin Simeonov <[email protected]> Co-authored-by: Ian Sutherland <[email protected]> Co-authored-by: sho90 <[email protected]> Co-authored-by: Anyul Rivas <[email protected]> Co-authored-by: Ian Schmitz <[email protected]> Co-authored-by: Jeffrey Posnick <[email protected]> Co-authored-by: Evan Bacon <[email protected]> Co-authored-by: Sahil Purav <[email protected]> Co-authored-by: Hakjoon Sim <[email protected]> Co-authored-by: Chris Shepherd <[email protected]> Co-authored-by: Jason Williams <[email protected]> Co-authored-by: Jabran Rafique⚡️ <[email protected]> Co-authored-by: John Ruble <[email protected]> Co-authored-by: Morten N.O. Nørgaard Henriksen <[email protected]> Co-authored-by: Sergey Makarov <[email protected]> Co-authored-by: EhsanKhaki <[email protected]> Co-authored-by: Kristoffer K <[email protected]> Co-authored-by: Aviv Hadar <[email protected]> Co-authored-by: Tobias Büschel <[email protected]> Co-authored-by: mad-jose <[email protected]> Co-authored-by: mad-jose <[email protected]> Co-authored-by: Andrew Hyndman <[email protected]> Co-authored-by: Brody McKee <[email protected]> Co-authored-by: James George <[email protected]> Co-authored-by: Dion Woolley <[email protected]> Co-authored-by: Walker Clem <[email protected]>
Co-authored-by: Konstantin Simeonov <[email protected]>
Co-authored-by: Konstantin Simeonov <[email protected]>
Co-authored-by: Konstantin Simeonov <[email protected]>

Relative Issues #9868 #9429
I fixed broken
yarn startthat cause react-scripts can't handle correctlynoFallthroughCasesInSwitchandjsxcompileOptions.Thank you for your decent review 😀