@react-native-windows/cli 0.72.0-preview.1 → 0.72.0-preview.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) Microsoft Corporation. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ * @format
5
+ */
6
+ export {};
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License.
5
+ * @format
6
+ */
7
+ var __importDefault = (this && this.__importDefault) || function (mod) {
8
+ return (mod && mod.__esModule) ? mod : { "default": mod };
9
+ };
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ const child_process_1 = require("child_process");
12
+ const path_1 = __importDefault(require("path"));
13
+ const commandWithProgress_1 = require("../runWindows/utils/commandWithProgress");
14
+ const healthCheckList_1 = require("../healthCheckList");
15
+ test('Verify list of health checks aligns with rnw-dependencies', async () => {
16
+ const rnwDepScriptPath = path_1.default.join(path_1.default.dirname(require.resolve('react-native-windows/package.json', {
17
+ paths: [process.cwd()],
18
+ })), 'Scripts/rnw-dependencies.ps1');
19
+ const rnwDeps = (0, child_process_1.execSync)(`${commandWithProgress_1.powershell} -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -ListChecks`, { stdio: 'pipe' });
20
+ const deps = rnwDeps.toString().trim().split('\n');
21
+ const rnwHelathChecks = deps.map(dep => {
22
+ const match = /([^:]+): ([^:]+): (.*)/.exec(dep);
23
+ if (!match) {
24
+ throw new Error(`Unexpected output from ${rnwDepScriptPath}`);
25
+ }
26
+ const [, optional, id, name] = match;
27
+ return [optional.trim() === 'Required', id, name];
28
+ });
29
+ expect(healthCheckList_1.HealthCheckList).toEqual(rnwHelathChecks);
30
+ });
31
+ //# sourceMappingURL=healthChecks.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthChecks.test.js","sourceRoot":"","sources":["../../src/e2etest/healthChecks.test.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;AAEH,iDAAuC;AACvC,gDAAwB;AACxB,iFAAmE;AACnE,wDAAmD;AAEnD,IAAI,CAAC,2DAA2D,EAAE,KAAK,IAAI,EAAE;IAC3E,MAAM,gBAAgB,GAAG,cAAI,CAAC,IAAI,CAChC,cAAI,CAAC,OAAO,CACV,OAAO,CAAC,OAAO,CAAC,mCAAmC,EAAE;QACnD,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;KACvB,CAAC,CACH,EACD,8BAA8B,CAC/B,CAAC;IAEF,MAAM,OAAO,GAAG,IAAA,wBAAQ,EACtB,GAAG,gCAAU,8CAA8C,gBAAgB,yBAAyB,EACpG,EAAC,KAAK,EAAE,MAAM,EAAC,CAChB,CAAC;IACF,MAAM,IAAI,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACnD,MAAM,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACrC,MAAM,KAAK,GAAG,wBAAwB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACjD,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,0BAA0B,gBAAgB,EAAE,CAAC,CAAC;SAC/D;QACD,MAAM,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,CAAC,GAAG,KAAK,CAAC;QACrC,OAAO,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,UAAU,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACpD,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,iCAAe,CAAC,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;AACnD,CAAC,CAAC,CAAC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {execSync} from 'child_process';\nimport path from 'path';\nimport {powershell} from '../runWindows/utils/commandWithProgress';\nimport {HealthCheckList} from '../healthCheckList';\n\ntest('Verify list of health checks aligns with rnw-dependencies', async () => {\n const rnwDepScriptPath = path.join(\n path.dirname(\n require.resolve('react-native-windows/package.json', {\n paths: [process.cwd()],\n }),\n ),\n 'Scripts/rnw-dependencies.ps1',\n );\n\n const rnwDeps = execSync(\n `${powershell} -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -NoPrompt -ListChecks`,\n {stdio: 'pipe'},\n );\n const deps = rnwDeps.toString().trim().split('\\n');\n const rnwHelathChecks = deps.map(dep => {\n const match = /([^:]+): ([^:]+): (.*)/.exec(dep);\n if (!match) {\n throw new Error(`Unexpected output from ${rnwDepScriptPath}`);\n }\n const [, optional, id, name] = match;\n return [optional.trim() === 'Required', id, name];\n });\n\n expect(HealthCheckList).toEqual(rnwHelathChecks);\n});\n"]}
@@ -0,0 +1 @@
1
+ export declare const HealthCheckList: (string | boolean)[][];
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HealthCheckList = void 0;
4
+ // Store list of health checks here to avoid having to launch PowerShell on every react-native config call
5
+ exports.HealthCheckList = [
6
+ [false, "FreeSpace", "Free space on current drive > 15 GB"],
7
+ [false, "InstalledMemory", "Installed memory >= 16 GB"],
8
+ [true, "WindowsVersion", "Windows version >= 10.0.17763.0"],
9
+ [true, "DeveloperMode", "Developer mode is on"],
10
+ [true, "LongPath", "Long path support is enabled"],
11
+ [true, "VSUWP", "Visual Studio 2022 (>= 17.3) & req. components"],
12
+ [true, "Node", "Node.js (LTS, >= 16.0)"],
13
+ [true, "Yarn", "Yarn"],
14
+ [true, "DotNetCore", ".NET SDK (LTS, = 6.0)"]
15
+ ];
16
+ //# sourceMappingURL=healthCheckList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"healthCheckList.js","sourceRoot":"","sources":["../src/healthCheckList.ts"],"names":[],"mappings":";;;AAAA,0GAA0G;AAC7F,QAAA,eAAe,GAAG;IAC7B,CAAC,KAAK,EAAE,WAAW,EAAE,qCAAqC,CAAC;IAC3D,CAAC,KAAK,EAAE,iBAAiB,EAAE,2BAA2B,CAAC;IACvD,CAAC,IAAI,EAAE,gBAAgB,EAAE,iCAAiC,CAAC;IAC3D,CAAC,IAAI,EAAE,eAAe,EAAE,sBAAsB,CAAC;IAC/C,CAAC,IAAI,EAAE,UAAU,EAAE,8BAA8B,CAAC;IAClD,CAAC,IAAI,EAAE,OAAO,EAAE,gDAAgD,CAAC;IACjE,CAAC,IAAI,EAAE,MAAM,EAAE,wBAAwB,CAAC;IACxC,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC;IACtB,CAAC,IAAI,EAAE,YAAY,EAAE,uBAAuB,CAAC;CAC9C,CAAA","sourcesContent":["// Store list of health checks here to avoid having to launch PowerShell on every react-native config call\nexport const HealthCheckList = [\n [false, \"FreeSpace\", \"Free space on current drive > 15 GB\"],\n [false, \"InstalledMemory\", \"Installed memory >= 16 GB\"],\n [true, \"WindowsVersion\", \"Windows version >= 10.0.17763.0\"],\n [true, \"DeveloperMode\", \"Developer mode is on\"],\n [true, \"LongPath\", \"Long path support is enabled\"],\n [true, \"VSUWP\", \"Visual Studio 2022 (>= 17.3) & req. components\"],\n [true, \"Node\", \"Node.js (LTS, >= 16.0)\"],\n [true, \"Yarn\", \"Yarn\"],\n [true, \"DotNetCore\", \".NET SDK (LTS, = 6.0)\"]\n]\n"]}
@@ -5,12 +5,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getHealthChecks = void 0;
7
7
  const path_1 = __importDefault(require("path"));
8
- const child_process_1 = require("child_process");
9
8
  const rnDir = path_1.default.dirname(require.resolve('react-native/package.json', { paths: [process.cwd()] }));
10
9
  const cliDir = path_1.default.dirname(require.resolve('@react-native-community/cli/package.json', { paths: [rnDir] }));
11
10
  const execaPath = require.resolve('execa', { paths: [cliDir] });
12
11
  const execa = require(execaPath);
13
12
  const commandWithProgress_1 = require("./runWindows/utils/commandWithProgress");
13
+ const healthCheckList_1 = require("./healthCheckList");
14
14
  function getHealthChecks() {
15
15
  // #8471: There are known cases where the dependencies script will error out.
16
16
  // Fail gracefully if that happens in the meantime.
@@ -22,6 +22,7 @@ function getHealthChecks() {
22
22
  label: 'Windows',
23
23
  healthchecks: [{
24
24
  label: 'Failed to enumerate health checks',
25
+ description: 'Failed to enumerate health checks',
25
26
  getDiagnostics: async () => ({ needsToBeFixed: true }),
26
27
  runAutomaticFix: async ({ loader }) => { loader.fail(); },
27
28
  }]
@@ -35,26 +36,21 @@ function getHealthChecksUnsafe() {
35
36
  return undefined;
36
37
  }
37
38
  const rnwDepScriptPath = path_1.default.join(path_1.default.dirname(require.resolve('react-native-windows/package.json', { paths: [process.cwd()] })), 'Scripts/rnw-dependencies.ps1');
38
- const rnwDeps = (0, child_process_1.execSync)(`${commandWithProgress_1.powershell} -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -ListChecks`, { stdio: 'pipe' });
39
- const deps = rnwDeps.toString().trim().split('\n');
40
39
  return [
41
40
  {
42
41
  label: 'Windows',
43
- healthchecks: deps.map(dep => {
44
- const match = /([^:]+): ([^:]+): (.*)/.exec(dep);
45
- if (!match) {
46
- throw new Error(`Unexpected output from ${rnwDepScriptPath}`);
47
- }
48
- const [, /*optional*/ , id, name] = match;
42
+ healthchecks: healthCheckList_1.HealthCheckList.map((dep) => {
43
+ const [optional, id, name] = dep;
49
44
  return {
50
45
  label: name,
46
+ description: name,
51
47
  // The schema check of react-native doctor requires this to be a string, although it should be a boolean
52
48
  // Enable this once we pick up a new version of the CLI that includes https://github.com/react-native-community/cli/pull/1367
53
- // isRequired: (optional.trim() === 'Required') ? true : false,
49
+ isRequired: optional,
54
50
  getDiagnostics: async () => {
55
51
  let needsToBeFixed = true;
56
52
  try {
57
- await execa(`${commandWithProgress_1.powershell} -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -Check ${id}`);
53
+ await execa(`"${commandWithProgress_1.powershell}" -ExecutionPolicy Unrestricted -NoProfile "${rnwDepScriptPath}" -NoPrompt -Check ${id}`);
58
54
  needsToBeFixed = false;
59
55
  }
60
56
  catch (_a) {
@@ -1 +1 @@
1
- {"version":3,"file":"healthChecks.js","sourceRoot":"","sources":["../src/healthChecks.ts"],"names":[],"mappings":";;;;;;AAAA,gDAAwB;AAExB,iDAAwC;AAExC,MAAM,KAAK,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,2BAA2B,EAAE,EAAC,KAAK,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,EAAC,CAAC,CAAC,CAAC;AACnG,MAAM,MAAM,GAAG,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,0CAA0C,EAAE,EAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAC,CAAC,CAAC,CAAC;AAC3G,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAChE,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;AAGjC,gFAAoE;AAEpE,SAAgB,eAAe;IAC7B,6EAA6E;IAC7E,mDAAmD;IACnD,IAAI;QACF,OAAO,qBAAqB,EAAE,CAAC;KAChC;IAAC,WAAM;QACN,OAAO,CAAC;gBACN,KAAK,EAAE,SAAS;gBAChB,YAAY,EAAE,CAAC;wBACb,KAAK,EAAE,mCAAmC;wBAC1C,cAAc,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC,EAAC,cAAc,EAAE,IAAI,EAAC,CAAC;wBACpD,eAAe,EAAE,KAAK,EAAE,EAAC,MAAM,EAAC,EAAE,EAAE,GAAE,MAAM,CAAC,IAAI,EAAE,CAAA,CAAA,CAAC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AE,CAAC,CAAC;4BACnH,cAAc,GAAG,KAAK,CAAC;yBACxB;wBAAC,WAAM;yBACP;wBACD,OAAO;4BACL,cAAc;yBACf,CAAA;oBACH,CAAC;oBACD,eAAe,EAAE,KAAK,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAE,EAAE,EAAE;wBAC3D,MAAM,OAAO,GAAG,GAAG,gCAAU,8CAA8C,gBAAgB,YAAY,EAAE,EAAE,CAAC;wBAC5G,IAAI;4BACF,MAAM,EAAE,QAAQ,EAAE,GAAG,MAAM,KAAK,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;4BAChE,IAAI,QAAQ,EAAE;gCACZ,qBAAqB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,oCAAoC,EAAE,GAAG,EAAE,CAAC,CAAC;gCAC3F,MAAM,CAAC,IAAI,EAAE,CAAC;6BACf;iCAAM;gCACL,MAAM,CAAC,OAAO,EAAE,CAAC;6BAClB;yBACF;wBAAC,WAAM;4BACN,qBAAqB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,oCAAoC,EAAE,GAAG,EAAE,CAAC,CAAC;4BAC3F,MAAM,CAAC,IAAI,EAAE,CAAC;yBACf;oBACH,CAAC;iBACF,CAAA;YACH,CAAC,CAAC;SACL;KAAC,CAAC;AACP,CAAC","sourcesContent":["import path from 'path';\n\nimport { execSync} from 'child_process';\n\nconst rnDir = path.dirname(require.resolve('react-native/package.json', {paths: [process.cwd()]}));\nconst cliDir = path.dirname(require.resolve('@react-native-community/cli/package.json', {paths: [rnDir]}));\nconst execaPath = require.resolve('execa', { paths: [cliDir] });\nconst execa = require(execaPath);\n\nimport type {HealthCheckCategory} from '@react-native-community/cli-doctor/build/types';\nimport { powershell } from './runWindows/utils/commandWithProgress';\n\nexport function getHealthChecks(): HealthCheckCategory[] | undefined {\n // #8471: There are known cases where the dependencies script will error out.\n // Fail gracefully if that happens in the meantime.\n try {\n return getHealthChecksUnsafe();\n } catch {\n return [{\n label: 'Windows',\n healthchecks: [{\n label: 'Failed to enumerate health checks',\n getDiagnostics: async () => ({needsToBeFixed: true}),\n runAutomaticFix: async ({loader}) => {loader.fail()},\n }]\n }];\n }\n}\n\nfunction getHealthChecksUnsafe(): HealthCheckCategory[] | undefined {\n// All our health checks are windows only...\n if (process.platform !== 'win32') {\n return undefined;\n }\n\n const rnwDepScriptPath = path.join(path.dirname(require.resolve(\n 'react-native-windows/package.json',\n {paths: [process.cwd()]})), 'Scripts/rnw-dependencies.ps1');\n \n const rnwDeps = execSync(`${powershell} -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -NoPrompt -ListChecks`, {stdio: 'pipe'});\n const deps = rnwDeps.toString().trim().split('\\n');\n return [\n {\n label: 'Windows',\n healthchecks:\n deps.map(dep => {\n const match = /([^:]+): ([^:]+): (.*)/.exec(dep);\n if (!match) {\n throw new Error(`Unexpected output from ${rnwDepScriptPath}`);\n }\n const [, /*optional*/, id, name] = match;\n return {\n label: name,\n // The schema check of react-native doctor requires this to be a string, although it should be a boolean\n // Enable this once we pick up a new version of the CLI that includes https://github.com/react-native-community/cli/pull/1367\n // isRequired: (optional.trim() === 'Required') ? true : false, \n getDiagnostics: async () => {\n let needsToBeFixed = true;\n try {\n await execa(`${powershell} -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -NoPrompt -Check ${id}`);\n needsToBeFixed = false;\n } catch {\n }\n return {\n needsToBeFixed,\n }\n },\n runAutomaticFix: async ({ loader, logManualInstallation }) => {\n const command = `${powershell} -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -Check ${id}`;\n try {\n const { exitCode } = await execa(command, { stdio: 'inherit' });\n if (exitCode) {\n logManualInstallation({ command, healthcheck: `react-native-windows dependency \"${id}\"` });\n loader.fail();\n } else {\n loader.succeed();\n }\n } catch {\n logManualInstallation({ command, healthcheck: `react-native-windows dependency \"${id}\"` });\n loader.fail();\n }\n }\n }\n })\n }];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gCACL,MAAM,CAAC,OAAO,EAAE,CAAC;6BAClB;yBACF;wBAAC,WAAM;4BACN,qBAAqB,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,oCAAoC,EAAE,GAAG,EAAE,CAAC,CAAC;4BAC3F,MAAM,CAAC,IAAI,EAAE,CAAC;yBACf;oBACH,CAAC;iBACsB,CAAA;YAC3B,CAAC,CAAC;SACL;KAAC,CAAC;AACP,CAAC","sourcesContent":["import path from 'path';\n\nconst rnDir = path.dirname(require.resolve('react-native/package.json', {paths: [process.cwd()]}));\nconst cliDir = path.dirname(require.resolve('@react-native-community/cli/package.json', {paths: [rnDir]}));\nconst execaPath = require.resolve('execa', { paths: [cliDir] });\nconst execa = require(execaPath);\n\nimport type {HealthCheckCategory, HealthCheckInterface} from '@react-native-community/cli-doctor/build/types';\nimport { powershell } from './runWindows/utils/commandWithProgress';\nimport { HealthCheckList } from './healthCheckList';\n\nexport function getHealthChecks(): HealthCheckCategory[] | undefined {\n // #8471: There are known cases where the dependencies script will error out.\n // Fail gracefully if that happens in the meantime.\n try {\n return getHealthChecksUnsafe();\n } catch {\n return [{\n label: 'Windows',\n healthchecks: [{\n label: 'Failed to enumerate health checks',\n description: 'Failed to enumerate health checks',\n getDiagnostics: async () => ({needsToBeFixed: true}),\n runAutomaticFix: async ({loader}) => {loader.fail()},\n }]\n }];\n }\n}\n\nfunction getHealthChecksUnsafe(): HealthCheckCategory[] | undefined {\n// All our health checks are windows only...\n if (process.platform !== 'win32') {\n return undefined;\n }\n\n const rnwDepScriptPath = path.join(path.dirname(require.resolve(\n 'react-native-windows/package.json',\n {paths: [process.cwd()]})), 'Scripts/rnw-dependencies.ps1');\n \n return [\n {\n label: 'Windows',\n healthchecks:\n HealthCheckList.map((dep: [boolean, string, string]) => {\n const [optional, id, name] = dep;\n return {\n label: name,\n description: name,\n // The schema check of react-native doctor requires this to be a string, although it should be a boolean\n // Enable this once we pick up a new version of the CLI that includes https://github.com/react-native-community/cli/pull/1367\n isRequired: optional, \n getDiagnostics: async () => {\n let needsToBeFixed = true;\n try {\n await execa(`\"${powershell}\" -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -NoPrompt -Check ${id}`);\n needsToBeFixed = false;\n } catch {\n }\n return {\n needsToBeFixed,\n }\n },\n runAutomaticFix: async ({ loader, logManualInstallation }) => {\n const command = `${powershell} -ExecutionPolicy Unrestricted -NoProfile \"${rnwDepScriptPath}\" -Check ${id}`;\n try {\n const { exitCode } = await execa(command, { stdio: 'inherit' });\n if (exitCode) {\n logManualInstallation({ command, healthcheck: `react-native-windows dependency \"${id}\"` });\n loader.fail();\n } else {\n loader.succeed();\n }\n } catch {\n logManualInstallation({ command, healthcheck: `react-native-windows dependency \"${id}\"` });\n loader.fail();\n }\n }\n } as HealthCheckInterface\n })\n }];\n }"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native-windows/cli",
3
- "version": "0.72.0-preview.1",
3
+ "version": "0.72.0-preview.3",
4
4
  "license": "MIT",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "repository": {
@@ -17,10 +17,10 @@
17
17
  "watch": "rnw-scripts watch"
18
18
  },
19
19
  "dependencies": {
20
- "@react-native-windows/codegen": "0.72.0-preview.1",
21
- "@react-native-windows/fs": "0.72.0-preview.1",
22
- "@react-native-windows/package-utils": "0.72.0-preview.1",
23
- "@react-native-windows/telemetry": "0.72.0-preview.1",
20
+ "@react-native-windows/codegen": "0.72.0-preview.2",
21
+ "@react-native-windows/fs": "0.72.0-preview.2",
22
+ "@react-native-windows/package-utils": "0.72.0-preview.2",
23
+ "@react-native-windows/telemetry": "0.72.0-preview.3",
24
24
  "@xmldom/xmldom": "^0.7.7",
25
25
  "chalk": "^4.1.0",
26
26
  "cli-spinners": "^2.2.0",
@@ -40,8 +40,8 @@
40
40
  "xpath": "^0.0.27"
41
41
  },
42
42
  "devDependencies": {
43
- "@react-native-community/cli-doctor": "^10.0.0",
44
- "@react-native-community/cli-types": "^10.0.0",
43
+ "@react-native-community/cli-doctor": "^11.2.0",
44
+ "@react-native-community/cli-types": "^11.2.0",
45
45
  "@rnw-scripts/eslint-config": "1.1.15",
46
46
  "@rnw-scripts/jest-unittest-config": "1.5.1",
47
47
  "@rnw-scripts/just-task": "2.3.6",
@@ -50,7 +50,7 @@
50
50
  "@types/jest": "^29.2.2",
51
51
  "@types/lodash": "^4.14.168",
52
52
  "@types/mustache": "^4.1.1",
53
- "@types/node": "^14.14.22",
53
+ "@types/node": "^16.0.0",
54
54
  "@types/ora": "^3.2.0",
55
55
  "@types/prompts": "2.0.10",
56
56
  "@types/semver": "^7.3.3",
@@ -84,6 +84,6 @@
84
84
  "promoteRelease": true,
85
85
  "windowsOnly": true,
86
86
  "engines": {
87
- "node": ">= 14"
87
+ "node": ">= 16"
88
88
  }
89
89
  }