diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e38d4a8e26a..4dfc574b9fdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -94,6 +94,7 @@ - `[jest-transform]` [**BREAKING**] Refactor API of transformers to pass an options bag rather than separate `config` and other options ([#10834](https://github.com/facebook/jest/pull/10834)) - `[jest-types]` Fix `Config.ts` `projects` types ([#11285](https://github.com/facebook/jest/pull/11285)) - `[jest-util]` Replace micromatch with picomatch to fix issues with negated globs ([#11287](https://github.com/facebook/jest/pull/11287)) +- `[jest-validate]` Use `en-US` locale to avoid case conversion problems while validating CLI options on machines with some certain locales(e.g. Turkish) set as default locale. ([#11412](https://github.com/facebook/jest/pull/11412)) - `[jest-worker]` [**BREAKING**] Use named exports ([#10623](https://github.com/facebook/jest/pull/10623)) - `[jest-worker]` Do not swallow errors during serialization ([#10984](https://github.com/facebook/jest/pull/10984)) - `[jest-worker]` Handle `ERR_IPC_CHANNEL_CLOSED` errors properly ([#11143](https://github.com/facebook/jest/pull/11143)) diff --git a/package.json b/package.json index 9199313338af..f8531e6ba0d1 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "ansi-regex": "^5.0.0", "ansi-styles": "^5.0.0", "babel-plugin-replace-ts-export-assignment": "^0.0.2", - "camelcase": "^6.0.0", + "camelcase": "^6.2.0", "chalk": "^4.0.0", "chokidar": "^3.3.0", "codecov": "^3.0.0", diff --git a/packages/jest-validate/package.json b/packages/jest-validate/package.json index e0770b3dfd98..58694e2f73b9 100644 --- a/packages/jest-validate/package.json +++ b/packages/jest-validate/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@jest/types": "^27.0.0-next.8", - "camelcase": "^6.0.0", + "camelcase": "^6.2.0", "chalk": "^4.0.0", "jest-get-type": "^27.0.0-next.9", "leven": "^3.1.0", diff --git a/packages/jest-validate/src/validateCLIOptions.ts b/packages/jest-validate/src/validateCLIOptions.ts index ea445fc932b8..ae71952eeefa 100644 --- a/packages/jest-validate/src/validateCLIOptions.ts +++ b/packages/jest-validate/src/validateCLIOptions.ts @@ -78,7 +78,7 @@ export default function validateCLIOptions( ); const unrecognizedOptions = Object.keys(argv).filter( arg => - !allowedOptions.has(camelcase(arg)) && + !allowedOptions.has(camelcase(arg, {locale: 'en-US'})) && !allowedOptions.has(arg) && (!rawArgv.length || rawArgv.includes(arg)), [], diff --git a/yarn.lock b/yarn.lock index d5571f7a19df..a53c8341c1e9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2594,7 +2594,7 @@ __metadata: ansi-regex: ^5.0.0 ansi-styles: ^5.0.0 babel-plugin-replace-ts-export-assignment: ^0.0.2 - camelcase: ^6.0.0 + camelcase: ^6.2.0 chalk: ^4.0.0 chokidar: ^3.3.0 codecov: ^3.0.0 @@ -13411,7 +13411,7 @@ fsevents@^1.2.7: dependencies: "@jest/types": ^27.0.0-next.8 "@types/yargs": ^16.0.0 - camelcase: ^6.0.0 + camelcase: ^6.2.0 chalk: ^4.0.0 jest-get-type: ^27.0.0-next.9 leven: ^3.1.0