@rnx-kit/cli 1.0.2 → 1.1.1

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.
package/README.md CHANGED
@@ -334,8 +334,6 @@ The following commands route to `@react-native-community/cli`:
334
334
 
335
335
  <!-- References -->
336
336
 
337
- [@rnx-kit/align-deps]:
338
- https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps#readme
337
+ [@rnx-kit/align-deps]: https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps#readme
339
338
  [Metro]: https://facebook.github.io/metro
340
- [configuration]:
341
- https://github.com/microsoft/rnx-kit/tree/main/packages/config#readme
339
+ [configuration]: https://github.com/microsoft/rnx-kit/tree/main/packages/config#readme
package/lib/build.d.ts CHANGED
@@ -26,10 +26,10 @@ export declare const rnxBuildCommand: {
26
26
  default: string;
27
27
  parse: typeof asDestination;
28
28
  } | {
29
+ default?: undefined;
29
30
  name: string;
30
31
  description: string;
31
32
  parse: typeof setCcacheDir;
32
- default?: undefined;
33
33
  })[];
34
34
  };
35
35
  export {};
@@ -3,8 +3,8 @@ import { asBoolean, asNumber, asTransformProfile } from "../helpers/parsers.ts";
3
3
  export declare const commonBundleCommandOptions: ({
4
4
  name: string;
5
5
  description: string;
6
- default?: undefined;
7
6
  parse?: undefined;
7
+ default?: undefined;
8
8
  } | {
9
9
  name: string;
10
10
  description: string;
@@ -26,14 +26,14 @@ export declare const commonBundleCommandOptions: ({
26
26
  default: string;
27
27
  parse?: undefined;
28
28
  } | {
29
- default?: undefined;
30
29
  name: string;
31
30
  description: string;
32
31
  parse: typeof asNumber;
33
- } | {
34
32
  default?: undefined;
33
+ } | {
35
34
  name: string;
36
35
  description: string;
37
36
  parse: typeof asTransformProfile;
37
+ default?: undefined;
38
38
  })[];
39
39
  //# sourceMappingURL=cliOptions.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import type { AllPlatforms } from "@rnx-kit/types-bundle-config";
2
- import type { CliPlatformBundleConfig } from "./types.ts";
2
+ import type { CLIPlatformBundleConfig } from "./types.ts";
3
3
  /**
4
4
  * Get the list of target platforms for bundling.
5
5
  *
@@ -19,5 +19,5 @@ export declare function getTargetPlatforms(overridePlatform?: AllPlatforms, targ
19
19
  * @param overridePlatform Override platform, typically from the command-line. When given, this overrides the list of target platforms.
20
20
  * @returns Array of platform-specific bundle configurations
21
21
  */
22
- export declare function getCliPlatformBundleConfigs(id?: string, overridePlatform?: AllPlatforms, kitConfig?: import("@rnx-kit/types-kit-config").KitConfig | undefined): CliPlatformBundleConfig[];
22
+ export declare function getCliPlatformBundleConfigs(id?: string, overridePlatform?: AllPlatforms, kitConfig?: import("@rnx-kit/types-kit-config").KitConfig | undefined): CLIPlatformBundleConfig[];
23
23
  //# sourceMappingURL=kit-config.d.ts.map
@@ -1,7 +1,7 @@
1
1
  import { bundle } from "@rnx-kit/metro-service";
2
2
  import type { ConfigT } from "metro-config";
3
3
  import * as nodefs from "node:fs";
4
- import type { CliPlatformBundleConfig } from "./types.ts";
4
+ import type { CLIPlatformBundleConfig } from "./types.ts";
5
5
  /**
6
6
  * Run the Metro bundler.
7
7
  *
@@ -14,5 +14,5 @@ import type { CliPlatformBundleConfig } from "./types.ts";
14
14
  * @param minify Optionally choose whether or not the bundle is minified. When not set, minification is controlled by the `dev` property.
15
15
  * @param output Output bundle format; defaults to plain JS
16
16
  */
17
- export declare function metroBundle(metroConfig: ConfigT, bundleConfig: CliPlatformBundleConfig, dev: boolean, minify?: boolean, output?: typeof bundle, fs?: typeof nodefs): Promise<void>;
17
+ export declare function metroBundle(metroConfig: ConfigT, bundleConfig: CLIPlatformBundleConfig, dev: boolean, minify?: boolean, output?: typeof bundle, fs?: typeof nodefs): Promise<void>;
18
18
  //# sourceMappingURL=metro.d.ts.map
@@ -54,19 +54,6 @@ const metro_config_ts_1 = require("../helpers/metro-config.js");
54
54
  */
55
55
  async function metroBundle(metroConfig, bundleConfig, dev, minify, output = metro_service_1.bundle, fs = nodefs) {
56
56
  (0, console_1.info)(`Bundling ${bundleConfig.platform}...`);
57
- if (!dev && bundleConfig.treeShake) {
58
- if (minify != null) {
59
- if (typeof bundleConfig.treeShake === "object") {
60
- bundleConfig.treeShake.minify = minify;
61
- }
62
- else {
63
- bundleConfig.treeShake = { minify };
64
- }
65
- }
66
- }
67
- else {
68
- bundleConfig.treeShake = false;
69
- }
70
57
  (0, metro_config_ts_1.customizeMetroConfig)(metroConfig, bundleConfig);
71
58
  const metroBundleArgs = {
72
59
  ...bundleConfig,
@@ -1,13 +1,13 @@
1
- import type { CliPlatformBundleConfig } from "./types.ts";
2
- type BundleConfigOverrides = Partial<Pick<CliPlatformBundleConfig, "entryFile" | "bundleOutput" | "bundleEncoding" | "sourcemapOutput" | "sourcemapSourcesRoot" | "sourcemapUseAbsolutePath" | "assetsDest" | "treeShake" | "unstableTransformProfile" | "indexedRamBundle" | "hermes">>;
3
- export declare const overridableCommonBundleOptions: readonly (keyof BundleConfigOverrides)[];
1
+ import type { CLIPlatformBundleConfig } from "./types.ts";
2
+ export type BundleConfigOverrides = Partial<Pick<CLIPlatformBundleConfig, "assetsDest" | "bundleEncoding" | "bundleOutput" | "entryFile" | "hermes" | "indexedRamBundle" | "sourcemapOutput" | "sourcemapSourcesRoot" | "sourcemapUseAbsolutePath" | "treeShake" | "unstableTransformProfile">>;
3
+ export declare const BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES: readonly (keyof BundleConfigOverrides)[];
4
4
  /**
5
- * Apply overrides, if any, to each rnx-kit bundle configuration. Overrides are applied in-place.
5
+ * Apply overrides from the command line, if any, to the bundle configuration.
6
+ * Overrides are applied in-place.
6
7
  *
8
+ * @param config Platform-specific bundle configuration; this is modified if any overrides are applied.
7
9
  * @param overrides Optional overrides to apply
8
- * @param configs Array of platform-specific bundle configurations. This is modified if any overrides are applied.
9
- * @param keys Config keys to pick from {@link overrides}
10
+ * @param keys Config keys to pick from {@link overrides}; defaults to {@link BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES}
10
11
  */
11
- export declare function applyBundleConfigOverrides(overrides: BundleConfigOverrides, configs: CliPlatformBundleConfig[], keys: (keyof BundleConfigOverrides)[]): void;
12
- export {};
12
+ export declare function applyCommandLineOverrides(config: CLIPlatformBundleConfig, overrides: BundleConfigOverrides, flags?: readonly ("assetsDest" | "bundleEncoding" | "bundleOutput" | "entryFile" | "hermes" | "indexedRamBundle" | "sourcemapOutput" | "sourcemapSourcesRoot" | "sourcemapUseAbsolutePath" | "treeShake" | "unstableTransformProfile")[]): void;
13
13
  //# sourceMappingURL=overrides.d.ts.map
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.overridableCommonBundleOptions = void 0;
4
- exports.applyBundleConfigOverrides = applyBundleConfigOverrides;
5
- const properties_1 = require("@rnx-kit/tools-language/properties");
6
- exports.overridableCommonBundleOptions = [
3
+ exports.BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES = void 0;
4
+ exports.applyCommandLineOverrides = applyCommandLineOverrides;
5
+ // TODO: Add `hermes` and `treeShake` when we remove support for `ram-bundle`
6
+ exports.BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES = [
7
7
  "assetsDest",
8
8
  "bundleEncoding",
9
9
  "bundleOutput",
@@ -14,17 +14,19 @@ exports.overridableCommonBundleOptions = [
14
14
  "unstableTransformProfile",
15
15
  ];
16
16
  /**
17
- * Apply overrides, if any, to each rnx-kit bundle configuration. Overrides are applied in-place.
17
+ * Apply overrides from the command line, if any, to the bundle configuration.
18
+ * Overrides are applied in-place.
18
19
  *
20
+ * @param config Platform-specific bundle configuration; this is modified if any overrides are applied.
19
21
  * @param overrides Optional overrides to apply
20
- * @param configs Array of platform-specific bundle configurations. This is modified if any overrides are applied.
21
- * @param keys Config keys to pick from {@link overrides}
22
+ * @param keys Config keys to pick from {@link overrides}; defaults to {@link BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES}
22
23
  */
23
- function applyBundleConfigOverrides(overrides, configs, keys) {
24
- const overridesToApply = (0, properties_1.pickValues)(overrides, keys);
25
- if (overridesToApply) {
26
- for (const config of configs) {
27
- Object.assign(config, overridesToApply);
24
+ function applyCommandLineOverrides(config, overrides, flags = exports.BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES) {
25
+ for (const flag of flags) {
26
+ if (Object.hasOwn(overrides, flag)) {
27
+ const value = overrides[flag];
28
+ // @ts-expect-error TypeScript can't infer that `flag` is a key of `BundleConfigOverrides`, which is a subset of the keys of `CLIPlatformBundleConfig`
29
+ config[flag] = value;
28
30
  }
29
31
  }
30
32
  }
@@ -18,7 +18,7 @@ export type CLICommonBundleOptions = {
18
18
  resetCache?: boolean;
19
19
  config?: string;
20
20
  };
21
- export type CliPlatformBundleConfig = BundleParameters & Required<Pick<BundleParameters, "entryFile" | "bundleOutput" | "sourcemapUseAbsolutePath" | "treeShake" | "plugins">> & {
21
+ export type CLIPlatformBundleConfig = BundleParameters & Required<Pick<BundleParameters, "entryFile" | "bundleOutput" | "sourcemapUseAbsolutePath" | "treeShake" | "plugins">> & {
22
22
  unstableTransformProfile?: TransformProfile;
23
23
  /**
24
24
  * Target platform for the bundle
package/lib/bundle.d.ts CHANGED
@@ -2,6 +2,7 @@ import type { Config as CLIConfig } from "@react-native-community/cli-types";
2
2
  import type { CLICommonBundleOptions } from "./bundle/types.ts";
3
3
  import { asBoolean } from "./helpers/parsers.ts";
4
4
  type CLIBundleOptions = CLICommonBundleOptions & {
5
+ metafile?: boolean | string;
5
6
  treeShake?: boolean;
6
7
  };
7
8
  export declare function rnxBundle(_argv: string[], cliConfig: CLIConfig, cliOptions: CLIBundleOptions): Promise<void>;
@@ -35,15 +36,15 @@ export declare const rnxBundleCommand: {
35
36
  default: string;
36
37
  parse?: undefined;
37
38
  } | {
39
+ default?: undefined;
38
40
  name: string;
39
41
  description: string;
40
42
  parse: typeof import("./helpers/parsers.ts").asNumber;
41
- default?: undefined;
42
43
  } | {
44
+ default?: undefined;
43
45
  name: string;
44
46
  description: string;
45
47
  parse: typeof import("./helpers/parsers.ts").asTransformProfile;
46
- default?: undefined;
47
48
  })[];
48
49
  };
49
50
  export {};
package/lib/bundle.js CHANGED
@@ -9,16 +9,37 @@ const kit_config_ts_1 = require("./bundle/kit-config.js");
9
9
  const metro_ts_1 = require("./bundle/metro.js");
10
10
  const overrides_ts_1 = require("./bundle/overrides.js");
11
11
  const parsers_ts_1 = require("./helpers/parsers.js");
12
+ function applyTreeShakingOverrides(bundleConfig, { dev, metafile, minify }) {
13
+ if (!dev && bundleConfig.treeShake) {
14
+ const treeShake = typeof bundleConfig.treeShake === "object" ? bundleConfig.treeShake : {};
15
+ if (metafile != null) {
16
+ treeShake.metafile =
17
+ typeof metafile === "string"
18
+ ? metafile
19
+ : `${bundleConfig.bundleOutput}.meta.json`;
20
+ }
21
+ if (minify != null) {
22
+ treeShake.minify = minify;
23
+ }
24
+ bundleConfig.treeShake = treeShake;
25
+ }
26
+ else {
27
+ bundleConfig.treeShake = false;
28
+ }
29
+ }
12
30
  async function rnxBundle(_argv, cliConfig, cliOptions) {
13
31
  const metroConfig = await (0, metro_service_1.loadMetroConfig)(cliConfig, cliOptions);
14
32
  const bundleConfigs = (0, kit_config_ts_1.getCliPlatformBundleConfigs)(cliOptions.id, cliOptions.platform);
15
- (0, overrides_ts_1.applyBundleConfigOverrides)(cliOptions, bundleConfigs, [
16
- ...overrides_ts_1.overridableCommonBundleOptions,
33
+ const overridableFlags = [
34
+ ...overrides_ts_1.BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES,
17
35
  "hermes",
18
36
  "treeShake",
19
- ]);
37
+ ];
20
38
  for (const bundleConfig of bundleConfigs) {
21
- await (0, metro_ts_1.metroBundle)(metroConfig, bundleConfig, cliOptions.dev, cliOptions.minify);
39
+ (0, overrides_ts_1.applyCommandLineOverrides)(bundleConfig, cliOptions, overridableFlags);
40
+ applyTreeShakingOverrides(bundleConfig, cliOptions);
41
+ const { dev, minify } = cliOptions;
42
+ await (0, metro_ts_1.metroBundle)(metroConfig, bundleConfig, dev, minify);
22
43
  const { bundleOutput, hermes, sourcemapOutput } = bundleConfig;
23
44
  if (hermes) {
24
45
  (0, hermes_ts_1.emitBytecode)(cliConfig, bundleOutput, sourcemapOutput, hermes === true ? {} : hermes);
@@ -31,6 +52,10 @@ exports.rnxBundleCommand = {
31
52
  func: rnxBundle,
32
53
  options: [
33
54
  ...cliOptions_ts_1.commonBundleCommandOptions,
55
+ {
56
+ name: "--metafile [boolean|string]",
57
+ description: "If tree shaking enabled, also produce some metadata about the build in JSON format",
58
+ },
34
59
  {
35
60
  name: "--tree-shake [boolean]",
36
61
  description: "Enable tree shaking to remove unused code and reduce the bundle size",
@@ -105,15 +105,15 @@ export declare const rnxCopyAssetsCommand: {
105
105
  description: string;
106
106
  func: (_argv: string[], config: CLIConfig, options: Options) => Promise<void>;
107
107
  options: ({
108
- default?: undefined;
109
108
  name: string;
110
109
  description: string;
111
110
  parse: typeof parsePlatform;
112
- } | {
113
111
  default?: undefined;
112
+ } | {
114
113
  parse?: undefined;
115
114
  name: string;
116
115
  description: string;
116
+ default?: undefined;
117
117
  } | {
118
118
  parse?: undefined;
119
119
  name: string;
@@ -9,40 +9,40 @@ export declare const rnxRamBundleCommand: {
9
9
  description: string;
10
10
  func: typeof rnxRamBundle;
11
11
  options: ({
12
- name: string;
13
- description: string;
14
12
  default?: undefined;
15
13
  parse?: undefined;
14
+ name: string;
15
+ description: string;
16
16
  } | {
17
+ default?: undefined;
17
18
  name: string;
18
19
  description: string;
19
20
  parse: typeof import("@rnx-kit/tools-react-native").parsePlatform;
20
- default?: undefined;
21
21
  } | {
22
22
  name: string;
23
23
  description: string;
24
24
  default: boolean;
25
25
  parse: typeof import("./helpers/parsers").asBoolean;
26
26
  } | {
27
+ default?: undefined;
27
28
  name: string;
28
29
  description: string;
29
30
  parse: typeof import("./helpers/parsers").asBoolean;
30
- default?: undefined;
31
31
  } | {
32
+ parse?: undefined;
32
33
  name: string;
33
34
  description: string;
34
35
  default: string;
35
- parse?: undefined;
36
36
  } | {
37
+ default?: undefined;
37
38
  name: string;
38
39
  description: string;
39
40
  parse: typeof import("./helpers/parsers").asNumber;
40
- default?: undefined;
41
41
  } | {
42
+ default?: undefined;
42
43
  name: string;
43
44
  description: string;
44
45
  parse: typeof import("./helpers/parsers").asTransformProfile;
45
- default?: undefined;
46
46
  })[];
47
47
  };
48
48
  export {};
package/lib/ram-bundle.js CHANGED
@@ -8,28 +8,24 @@ const cliOptions_ts_1 = require("./bundle/cliOptions.js");
8
8
  const kit_config_ts_1 = require("./bundle/kit-config.js");
9
9
  const metro_ts_1 = require("./bundle/metro.js");
10
10
  const overrides_ts_1 = require("./bundle/overrides.js");
11
- function disableTreeShaking(configs) {
12
- const wasEnabled = configs.reduce((modified, config) => {
13
- if (config.treeShake) {
14
- config.treeShake = false;
15
- return true;
16
- }
17
- return modified;
18
- }, false);
19
- if (wasEnabled) {
11
+ function disableTreeShaking(config) {
12
+ if (config.treeShake) {
13
+ config.treeShake = false;
20
14
  (0, console_1.info)("`treeShake` was disabled because it is not compatible with the RAM bundle format");
21
15
  }
22
16
  }
23
17
  async function rnxRamBundle(_argv, cliConfig, cliOptions) {
24
18
  const metroConfig = await (0, metro_service_1.loadMetroConfig)(cliConfig, cliOptions);
25
19
  const bundleConfigs = (0, kit_config_ts_1.getCliPlatformBundleConfigs)(cliOptions.id, cliOptions.platform);
26
- (0, overrides_ts_1.applyBundleConfigOverrides)(cliOptions, bundleConfigs, [
27
- ...overrides_ts_1.overridableCommonBundleOptions,
20
+ const overridableFlags = [
21
+ ...overrides_ts_1.BUNDLE_CONFIG_COMMAND_LINE_OVERRIDES,
28
22
  "indexedRamBundle",
29
- ]);
30
- disableTreeShaking(bundleConfigs);
23
+ ];
31
24
  for (const bundleConfig of bundleConfigs) {
32
- await (0, metro_ts_1.metroBundle)(metroConfig, bundleConfig, cliOptions.dev, cliOptions.minify, metro_service_1.ramBundle);
25
+ (0, overrides_ts_1.applyCommandLineOverrides)(bundleConfig, cliOptions, overridableFlags);
26
+ disableTreeShaking(bundleConfig);
27
+ const { dev, minify } = cliOptions;
28
+ await (0, metro_ts_1.metroBundle)(metroConfig, bundleConfig, dev, minify, metro_service_1.ramBundle);
33
29
  }
34
30
  }
35
31
  exports.rnxRamBundleCommand = {
package/lib/run.d.ts CHANGED
@@ -10,8 +10,8 @@ export declare const rnxRunCommand: {
10
10
  options: ({
11
11
  name: string;
12
12
  description: string;
13
- default?: undefined;
14
13
  parse?: undefined;
14
+ default?: undefined;
15
15
  } | {
16
16
  name: string;
17
17
  description: string;
package/lib/start.d.ts CHANGED
@@ -12,10 +12,10 @@ export declare const rnxStartCommand: {
12
12
  parse: typeof asNumber;
13
13
  default: number;
14
14
  } | {
15
+ parse?: undefined;
15
16
  name: string;
16
17
  description: string;
17
18
  default: string;
18
- parse?: undefined;
19
19
  } | {
20
20
  default?: undefined;
21
21
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rnx-kit/cli",
3
- "version": "1.0.2",
3
+ "version": "1.1.1",
4
4
  "description": "Command-line interface for working with kit packages in your repo",
5
5
  "homepage": "https://github.com/microsoft/rnx-kit/tree/main/packages/cli#readme",
6
6
  "license": "MIT",
@@ -8,6 +8,14 @@
8
8
  "name": "Microsoft Open Source",
9
9
  "email": "microsoftopensource@users.noreply.github.com"
10
10
  },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/microsoft/rnx-kit",
14
+ "directory": "packages/cli"
15
+ },
16
+ "bin": {
17
+ "rnx-cli": "bin/rnx-cli.cjs"
18
+ },
11
19
  "files": [
12
20
  "bin/rnx-cli.mjs",
13
21
  "lib/**/*.d.ts",
@@ -15,9 +23,6 @@
15
23
  "react-native.config.js"
16
24
  ],
17
25
  "main": "lib/index.js",
18
- "bin": {
19
- "rnx-cli": "bin/rnx-cli.cjs"
20
- },
21
26
  "types": "lib/index.d.ts",
22
27
  "exports": {
23
28
  ".": {
@@ -28,11 +33,6 @@
28
33
  "./react-native.config.js": "./react-native.config.js",
29
34
  "./package.json": "./package.json"
30
35
  },
31
- "repository": {
32
- "type": "git",
33
- "url": "https://github.com/microsoft/rnx-kit",
34
- "directory": "packages/cli"
35
- },
36
36
  "scripts": {
37
37
  "build": "rnx-kit-scripts build",
38
38
  "format": "rnx-kit-scripts format",
@@ -48,14 +48,14 @@
48
48
  "@rnx-kit/metro-plugin-typescript": "^0.5.4",
49
49
  "@rnx-kit/metro-serializer": "^2.0.0",
50
50
  "@rnx-kit/metro-serializer-esbuild": "^0.3.1",
51
- "@rnx-kit/metro-service": "^4.1.3",
51
+ "@rnx-kit/metro-service": "^4.1.5",
52
52
  "@rnx-kit/third-party-notices": "^2.0.0",
53
53
  "@rnx-kit/tools-android": "^0.2.2",
54
54
  "@rnx-kit/tools-apple": "^0.2.2",
55
55
  "@rnx-kit/tools-filesystem": "^0.2.0",
56
56
  "@rnx-kit/tools-language": "^3.0.1",
57
57
  "@rnx-kit/tools-node": "^3.0.4",
58
- "@rnx-kit/tools-react-native": "^2.3.4",
58
+ "@rnx-kit/tools-react-native": "^2.3.5",
59
59
  "@rnx-kit/types-bundle-config": "^1.0.0",
60
60
  "@rnx-kit/types-kit-config": "^1.0.0",
61
61
  "@rnx-kit/types-node": "^1.0.0",
@@ -63,24 +63,11 @@
63
63
  "ora": "^5.4.1",
64
64
  "qrcode": "^1.5.0"
65
65
  },
66
- "peerDependencies": {
67
- "jest": ">=26.0",
68
- "react-native": ">=0.64"
69
- },
70
- "peerDependenciesMeta": {
71
- "jest": {
72
- "optional": true
73
- },
74
- "react-native": {
75
- "optional": true
76
- }
77
- },
78
66
  "devDependencies": {
79
67
  "@babel/core": "^7.20.0",
80
68
  "@babel/preset-env": "^7.20.0",
81
69
  "@react-native-community/cli-types": "^20.0.0",
82
70
  "@react-native-windows/cli": "^0.79.0",
83
- "@rnx-kit/eslint-config": "*",
84
71
  "@rnx-kit/jest-preset": "*",
85
72
  "@rnx-kit/scripts": "*",
86
73
  "@rnx-kit/tsconfig": "*",
@@ -96,10 +83,22 @@
96
83
  "react-native": "^0.83.0",
97
84
  "type-fest": "^4.0.0"
98
85
  },
99
- "engines": {
100
- "node": ">=22.11"
86
+ "peerDependencies": {
87
+ "jest": ">=26.0",
88
+ "react-native": ">=0.64"
89
+ },
90
+ "peerDependenciesMeta": {
91
+ "jest": {
92
+ "optional": true
93
+ },
94
+ "react-native": {
95
+ "optional": true
96
+ }
101
97
  },
102
98
  "jest": {
103
99
  "preset": "@rnx-kit/jest-preset/private"
100
+ },
101
+ "engines": {
102
+ "node": ">=22.11"
104
103
  }
105
104
  }