@nrwl/react-native 13.4.5-beta.3 → 13.4.5-beta.7

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/migrations.json CHANGED
@@ -17,6 +17,12 @@
17
17
  "cli": "nx",
18
18
  "description": "Update typing for svg in react native",
19
19
  "factory": "./src/migrations/update-13-5-0/update-react-native-typing-svg-13-5-0"
20
+ },
21
+ "add-babel-config-root-13-5-0": {
22
+ "version": "13.5.0-beta.0",
23
+ "cli": "nx",
24
+ "description": "Add babel.config.json at root for react native workspace if it does not exist",
25
+ "factory": "./src/migrations/update-13-5-0/add-babel-config-root-13-5-0"
20
26
  }
21
27
  },
22
28
  "packageJsonUpdates": {
@@ -320,6 +326,11 @@
320
326
  "@babel/runtime": {
321
327
  "version": "7.16.7",
322
328
  "alwaysAddToPackageJson": false
329
+ },
330
+ "react-native-config": {
331
+ "version": "1.4.5",
332
+ "alwaysAddToPackageJson": false,
333
+ "addToPackageJson": "devDependencies"
323
334
  }
324
335
  }
325
336
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/react-native",
3
- "version": "13.4.5-beta.3",
3
+ "version": "13.4.5-beta.7",
4
4
  "description": "React Native Plugin for Nx",
5
5
  "keywords": [
6
6
  "Monorepo",
@@ -24,12 +24,12 @@
24
24
  "main": "index.js",
25
25
  "types": "index.d.ts",
26
26
  "dependencies": {
27
- "@nrwl/detox": "13.4.5-beta.3",
28
- "@nrwl/devkit": "13.4.5-beta.3",
29
- "@nrwl/jest": "13.4.5-beta.3",
30
- "@nrwl/linter": "13.4.5-beta.3",
31
- "@nrwl/react": "13.4.5-beta.3",
32
- "@nrwl/workspace": "13.4.5-beta.3",
27
+ "@nrwl/detox": "13.4.5-beta.7",
28
+ "@nrwl/devkit": "13.4.5-beta.7",
29
+ "@nrwl/jest": "13.4.5-beta.7",
30
+ "@nrwl/linter": "13.4.5-beta.7",
31
+ "@nrwl/react": "13.4.5-beta.7",
32
+ "@nrwl/workspace": "13.4.5-beta.7",
33
33
  "chalk": "^4.1.0",
34
34
  "enhanced-resolve": "^5.8.3",
35
35
  "fs-extra": "^9.1.0",
package/project.json CHANGED
@@ -44,17 +44,17 @@
44
44
  "output": "/"
45
45
  },
46
46
  {
47
- "input": "./packages/react-native/src",
47
+ "input": "packages/react-native/src",
48
48
  "glob": "**/*.!(ts)",
49
49
  "output": "/src"
50
50
  },
51
51
  {
52
- "input": "./packages/react-native",
52
+ "input": "packages/react-native",
53
53
  "glob": "*.rb",
54
54
  "output": "/"
55
55
  },
56
56
  {
57
- "input": "./packages/react-native",
57
+ "input": "packages/react-native",
58
58
  "glob": "**/*.json",
59
59
  "ignore": ["**/tsconfig*.json"],
60
60
  "output": "/"
@@ -1,4 +1,5 @@
1
1
  apply plugin: "com.android.application"
2
+ apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
2
3
 
3
4
  import com.android.build.OutputFile
4
5
 
@@ -208,6 +209,7 @@ dependencies {
208
209
  implementation fileTree(dir: "libs", include: ["*.jar"])
209
210
  //noinspection GradleDynamicVersion
210
211
  implementation "com.facebook.react:react-native:+" // From node_modules
212
+ implementation project(':react-native-config')
211
213
 
212
214
  implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
213
215
 
@@ -4,6 +4,7 @@ import android.app.Application;
4
4
  import android.content.Context;
5
5
  import com.facebook.react.PackageList;
6
6
  import com.facebook.react.ReactApplication;
7
+ import com.lugg.ReactNativeConfig.ReactNativeConfigPackage;
7
8
  import com.facebook.react.ReactInstanceManager;
8
9
  import com.facebook.react.ReactNativeHost;
9
10
  import com.facebook.react.ReactPackage;
@@ -1,5 +1,8 @@
1
1
  rootProject.name = '<%= className %>'
2
2
 
3
+ include ':react-native-config'
4
+ project(':react-native-config').projectDir = new File(rootProject.projectDir, '../../../node_modules/react-native-config/android')
5
+
3
6
  apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle");
4
7
  applyNativeModulesSettingsGradle(settings)
5
8
 
@@ -7,6 +7,7 @@
7
7
  "@testing-library/react-native": "*",
8
8
  "react": "*",
9
9
  "react-native": "*",
10
+ "react-native-config": "*",
10
11
  "react-native-svg": "*"
11
12
  }
12
13
  }
@@ -4,16 +4,18 @@ exports.reactNativeInitSchematic = exports.updateDependencies = exports.reactNat
4
4
  const tslib_1 = require("tslib");
5
5
  const set_default_collection_1 = require("@nrwl/workspace/src/utilities/set-default-collection");
6
6
  const devkit_1 = require("@nrwl/devkit");
7
- const versions_1 = require("../../utils/versions");
8
7
  const run_tasks_in_serial_1 = require("@nrwl/workspace/src/utilities/run-tasks-in-serial");
9
- const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
10
8
  const jest_1 = require("@nrwl/jest");
11
9
  const detox_1 = require("@nrwl/detox");
12
- const versions_2 = require("@nrwl/react/src/utils/versions");
10
+ const versions_1 = require("@nrwl/react/src/utils/versions");
11
+ const versions_2 = require("../../utils/versions");
12
+ const add_git_ignore_entry_1 = require("./lib/add-git-ignore-entry");
13
+ const init_root_babel_config_1 = require("./lib/init-root-babel-config");
13
14
  function reactNativeInitGenerator(host, schema) {
14
15
  return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
15
16
  (0, set_default_collection_1.setDefaultCollection)(host, '@nrwl/react-native');
16
17
  (0, add_git_ignore_entry_1.addGitIgnoreEntry)(host);
18
+ (0, init_root_babel_config_1.initRootBabelConfig)(host);
17
19
  const tasks = [moveDependency(host), updateDependencies(host)];
18
20
  if (!schema.unitTestRunner || schema.unitTestRunner === 'jest') {
19
21
  const jestTask = (0, jest_1.jestInitGenerator)(host, {});
@@ -33,12 +35,12 @@ exports.reactNativeInitGenerator = reactNativeInitGenerator;
33
35
  function updateDependencies(host) {
34
36
  const isPnpm = (0, devkit_1.detectPackageManager)(host.root) === 'pnpm';
35
37
  return (0, devkit_1.addDependenciesToPackageJson)(host, {
36
- react: versions_2.reactVersion,
37
- 'react-native': versions_1.reactNativeVersion,
38
- }, Object.assign({ '@nrwl/react-native': versions_1.nxVersion, '@types/react': versions_2.typesReactVersion, '@types/react-native': versions_1.typesReactNativeVersion, '@react-native-community/cli': versions_1.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_1.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_1.reactNativeCommunityCliIos, 'metro-react-native-babel-preset': versions_1.metroReactNativeBabelPresetVersion, '@testing-library/react-native': versions_1.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_1.testingLibraryJestNativeVersion, 'jest-react-native': versions_1.jestReactNativeVersion, metro: versions_1.metroVersion, 'metro-resolver': versions_1.metroVersion, 'react-test-renderer': versions_1.reactTestRendererVersion, 'react-native-svg-transformer': versions_1.reactNativeSvgTransformerVersion, 'react-native-svg': versions_1.reactNativeSvgVersion }, (isPnpm
38
+ react: versions_1.reactVersion,
39
+ 'react-native': versions_2.reactNativeVersion,
40
+ }, Object.assign({ '@nrwl/react-native': versions_2.nxVersion, '@types/react': versions_1.typesReactVersion, '@types/react-native': versions_2.typesReactNativeVersion, '@react-native-community/cli': versions_2.reactNativeCommunityCli, '@react-native-community/cli-platform-android': versions_2.reactNativeCommunityCliAndroid, '@react-native-community/cli-platform-ios': versions_2.reactNativeCommunityCliIos, 'metro-react-native-babel-preset': versions_2.metroReactNativeBabelPresetVersion, '@testing-library/react-native': versions_2.testingLibraryReactNativeVersion, '@testing-library/jest-native': versions_2.testingLibraryJestNativeVersion, 'jest-react-native': versions_2.jestReactNativeVersion, metro: versions_2.metroVersion, 'metro-resolver': versions_2.metroVersion, 'react-test-renderer': versions_2.reactTestRendererVersion, 'react-native-svg-transformer': versions_2.reactNativeSvgTransformerVersion, 'react-native-svg': versions_2.reactNativeSvgVersion, 'react-native-config': versions_2.reactNativeConfigVersion }, (isPnpm
39
41
  ? {
40
- 'metro-config': versions_1.metroVersion,
41
- '@babel/runtime': versions_1.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
42
+ 'metro-config': versions_2.metroVersion,
43
+ '@babel/runtime': versions_2.babelRuntimeVersion, // @babel/runtime is used by react-native-svg
42
44
  }
43
45
  : {})));
44
46
  }
@@ -1 +1 @@
1
- {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,iGAA4F;AAC5F,yCAOsB;AAEtB,mDAgB8B;AAC9B,2FAAqF;AACrF,qEAA+D;AAC/D,qCAA+C;AAC/C,uCAAiD;AACjD,6DAGwC;AAExC,SAAsB,wBAAwB,CAAC,IAAU,EAAE,MAAc;;QACvE,IAAA,6CAAoB,EAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;QACjD,IAAA,wCAAiB,EAAC,IAAI,CAAC,CAAC;QAExB,MAAM,KAAK,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;QAE/D,IAAI,CAAC,MAAM,CAAC,cAAc,IAAI,MAAM,CAAC,cAAc,KAAK,MAAM,EAAE;YAC9D,MAAM,QAAQ,GAAG,IAAA,wBAAiB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAC7C,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACtB;QAED,IAAI,CAAC,MAAM,CAAC,aAAa,IAAI,MAAM,CAAC,aAAa,KAAK,OAAO,EAAE;YAC7D,MAAM,SAAS,GAAG,MAAM,IAAA,0BAAkB,EAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACrD,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SACvB;QAED,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;YACtB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,OAAO,IAAA,sCAAgB,EAAC,GAAG,KAAK,CAAC,CAAC;IACpC,CAAC;CAAA;AArBD,4DAqBC;AAED,SAAgB,kBAAkB,CAAC,IAAU;IAC3C,MAAM,MAAM,GAAG,IAAA,6BAAoB,EAAC,IAAI,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC;IAC1D,OAAO,IAAA,qCAA4B,EACjC,IAAI,EACJ;QACE,KAAK,EAAE,uBAAY;QACnB,cAAc,EAAE,6BAAkB;KACnC,kBAEC,oBAAoB,EAAE,oBAAS,EAC/B,cAAc,EAAE,4BAAiB,EACjC,qBAAqB,EAAE,kCAAuB,EAC9C,6BAA6B,EAAE,kCAAuB,EACtD,8CAA8C,EAC5C,yCAA8B,EAChC,0CAA0C,EAAE,qCAA0B,EACtE,iCAAiC,EAAE,6CAAkC,EACrE,+BAA+B,EAAE,2CAAgC,EACjE,8BAA8B,EAAE,0CAA+B,EAC/D,mBAAmB,EAAE,iCAAsB,EAC3C,KAAK,EAAE,uBAAY,EACnB,gBAAgB,EAAE,uBAAY,EAC9B,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,IACtC,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAjCD,gDAiCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
1
+ {"version":3,"file":"init.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/generators/init/init.ts"],"names":[],"mappings":";;;;AAAA,iGAA4F;AAC5F,yCAOsB;AAEtB,2FAAqF;AACrF,qCAA+C;AAC/C,uCAAiD;AACjD,6DAGwC;AAExC,mDAiB8B;AAE9B,qEAA+D;AAC/D,yEAAmE;AAE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,kCAAuB,EACtD,8CAA8C,EAC5C,yCAA8B,EAChC,0CAA0C,EAAE,qCAA0B,EACtE,iCAAiC,EAAE,6CAAkC,EACrE,+BAA+B,EAAE,2CAAgC,EACjE,8BAA8B,EAAE,0CAA+B,EAC/D,mBAAmB,EAAE,iCAAsB,EAC3C,KAAK,EAAE,uBAAY,EACnB,gBAAgB,EAAE,uBAAY,EAC9B,qBAAqB,EAAE,mCAAwB,EAC/C,8BAA8B,EAAE,2CAAgC,EAChE,kBAAkB,EAAE,gCAAqB,EACzC,qBAAqB,EAAE,mCAAwB,IAC5C,CAAC,MAAM;QACR,CAAC,CAAC;YACE,cAAc,EAAE,uBAAY;YAC5B,gBAAgB,EAAE,8BAAmB,EAAE,6CAA6C;SACrF;QACH,CAAC,CAAC,EAAE,CAAC,EAEV,CAAC;AACJ,CAAC;AAlCD,gDAkCC;AAED,SAAS,cAAc,CAAC,IAAU;IAChC,OAAO,IAAA,0CAAiC,EAAC,IAAI,EAAE,CAAC,oBAAoB,CAAC,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,kBAAe,wBAAwB,CAAC;AAC3B,QAAA,wBAAwB,GAAG,IAAA,2BAAkB,EACxD,wBAAwB,CACzB,CAAC"}
@@ -56,4 +56,35 @@ describe('init', () => {
56
56
  expect(cli.defaultCollection).toEqual('@nrwl/react');
57
57
  });
58
58
  });
59
+
60
+ describe('babel config', () => {
61
+ it('should create babel config if not present', async () => {
62
+ await reactNativeInitGenerator(tree, {
63
+ unitTestRunner: 'none',
64
+ e2eTestRunner: 'none',
65
+ });
66
+ expect(tree.exists('babel.config.json')).toBe(true);
67
+ });
68
+
69
+ it('should not overwrite existing babel config', async () => {
70
+ tree.write('babel.config.json', '{ "preset": ["preset-awesome"] }');
71
+
72
+ await reactNativeInitGenerator(tree, {
73
+ unitTestRunner: 'none',
74
+ e2eTestRunner: 'none',
75
+ });
76
+
77
+ const existing = readJson(tree, 'babel.config.json');
78
+ expect(existing).toEqual({ preset: ['preset-awesome'] });
79
+ });
80
+
81
+ it('should not overwrite existing babel config (.js)', async () => {
82
+ tree.write('/babel.config.js', 'module.exports = () => {};');
83
+ await reactNativeInitGenerator(tree, {
84
+ unitTestRunner: 'none',
85
+ e2eTestRunner: 'none',
86
+ });
87
+ expect(tree.exists('babel.config.json')).toBe(false);
88
+ });
89
+ });
59
90
  });
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ export declare function initRootBabelConfig(tree: Tree): void;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initRootBabelConfig = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ function initRootBabelConfig(tree) {
6
+ if (tree.exists('/babel.config.json') || tree.exists('/babel.config.js')) {
7
+ return;
8
+ }
9
+ (0, devkit_1.writeJson)(tree, '/babel.config.json', {
10
+ babelrcRoots: ['*'], // Make sure .babelrc files other than root can be loaded in a monorepo
11
+ });
12
+ }
13
+ exports.initRootBabelConfig = initRootBabelConfig;
14
+ //# sourceMappingURL=init-root-babel-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init-root-babel-config.js","sourceRoot":"","sources":["../../../../../../../packages/react-native/src/generators/init/lib/init-root-babel-config.ts"],"names":[],"mappings":";;;AAAA,yCAA+C;AAE/C,SAAgB,mBAAmB,CAAC,IAAU;IAC5C,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;QACxE,OAAO;KACR;IAED,IAAA,kBAAS,EAAC,IAAI,EAAE,oBAAoB,EAAE;QACpC,YAAY,EAAE,CAAC,GAAG,CAAC,EAAE,uEAAuE;KAC7F,CAAC,CAAC;AACL,CAAC;AARD,kDAQC"}
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const init_root_babel_config_1 = require("../../generators/init/lib/init-root-babel-config");
6
+ function update(tree) {
7
+ return (0, tslib_1.__awaiter)(this, void 0, void 0, function* () {
8
+ const projects = (0, devkit_1.getProjects)(tree);
9
+ if (tree.exists('/babel.config.json') || tree.exists('/babel.config.js')) {
10
+ return;
11
+ }
12
+ let hasReactNaiveProject = false;
13
+ projects.forEach((project) => {
14
+ var _a, _b;
15
+ if (hasReactNaiveProject)
16
+ return;
17
+ hasReactNaiveProject =
18
+ ((_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.start) === null || _b === void 0 ? void 0 : _b.executor) === '@nrwl/react-native:start';
19
+ });
20
+ if (hasReactNaiveProject) {
21
+ (0, init_root_babel_config_1.initRootBabelConfig)(tree);
22
+ }
23
+ });
24
+ }
25
+ exports.default = update;
26
+ //# sourceMappingURL=add-babel-config-root-13-5-0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-babel-config-root-13-5-0.js","sourceRoot":"","sources":["../../../../../../packages/react-native/src/migrations/update-13-5-0/add-babel-config-root-13-5-0.ts"],"names":[],"mappings":";;;AAAA,yCAAiD;AAEjD,6FAAuF;AAEvF,SAA8B,MAAM,CAAC,IAAU;;QAC7C,MAAM,QAAQ,GAAG,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;QAEnC,IAAI,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,EAAE;YACxE,OAAO;SACR;QAED,IAAI,oBAAoB,GAAG,KAAK,CAAC;QACjC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;;YAC3B,IAAI,oBAAoB;gBAAE,OAAO;YACjC,oBAAoB;gBAClB,CAAA,MAAA,MAAA,OAAO,CAAC,OAAO,0CAAE,KAAK,0CAAE,QAAQ,MAAK,0BAA0B,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,IAAI,oBAAoB,EAAE;YACxB,IAAA,4CAAmB,EAAC,IAAI,CAAC,CAAC;SAC3B;IACH,CAAC;CAAA;AAjBD,yBAiBC"}
@@ -0,0 +1,48 @@
1
+ import { addProjectConfiguration, readJson, Tree } from '@nrwl/devkit';
2
+ import { createTreeWithEmptyWorkspace } from '@nrwl/devkit/testing';
3
+ import update from './add-babel-config-root-13-5-0';
4
+
5
+ describe('Add react-native-svg to dev dependencies', () => {
6
+ let tree: Tree;
7
+
8
+ beforeEach(async () => {
9
+ tree = createTreeWithEmptyWorkspace();
10
+ addProjectConfiguration(tree, 'products', {
11
+ root: 'apps/products',
12
+ sourceRoot: 'apps/products/src',
13
+ targets: {
14
+ start: {
15
+ executor: '@nrwl/react-native:start',
16
+ options: {
17
+ port: 8081,
18
+ },
19
+ },
20
+ test: {
21
+ executor: '@nrwl/jest:jest',
22
+ options: {
23
+ jestConfig: 'apps/products/jest.config.js',
24
+ passWithNoTests: true,
25
+ },
26
+ },
27
+ },
28
+ });
29
+ });
30
+
31
+ it(`should add babel.config.json at root`, async () => {
32
+ await update(tree);
33
+
34
+ const babelConfigJson = readJson(tree, 'babel.config.json');
35
+ expect(babelConfigJson).toEqual({
36
+ babelrcRoots: ['*'],
37
+ });
38
+ });
39
+
40
+ it(`should not change babel.config.json if it already exists`, async () => {
41
+ tree.write('babel.config.json', '{}');
42
+
43
+ await update(tree);
44
+
45
+ const babelConfigJson = readJson(tree, 'babel.config.json');
46
+ expect(babelConfigJson).toEqual({});
47
+ });
48
+ });
@@ -5,6 +5,7 @@ export declare const metroVersion = "0.66.2";
5
5
  export declare const reactNativeCommunityCli = "6.3.1";
6
6
  export declare const reactNativeCommunityCliIos = "6.2.0";
7
7
  export declare const reactNativeCommunityCliAndroid = "6.3.0";
8
+ export declare const reactNativeConfigVersion = "1.4.5";
8
9
  export declare const metroReactNativeBabelPresetVersion = "0.66.2";
9
10
  export declare const testingLibraryReactNativeVersion = "9.0.0";
10
11
  export declare const testingLibraryJestNativeVersion = "4.0.4";
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.reactTestRendererVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.metroReactNativeBabelPresetVersion = exports.reactNativeCommunityCliAndroid = exports.reactNativeCommunityCliIos = exports.reactNativeCommunityCli = exports.metroVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
4
- exports.nxVersion = '13.4.5-beta.3';
3
+ exports.babelRuntimeVersion = exports.reactNativeSvgVersion = exports.reactNativeSvgTransformerVersion = exports.reactTestRendererVersion = exports.jestReactNativeVersion = exports.testingLibraryJestNativeVersion = exports.testingLibraryReactNativeVersion = exports.metroReactNativeBabelPresetVersion = exports.reactNativeConfigVersion = exports.reactNativeCommunityCliAndroid = exports.reactNativeCommunityCliIos = exports.reactNativeCommunityCli = exports.metroVersion = exports.typesReactNativeVersion = exports.reactNativeVersion = exports.nxVersion = void 0;
4
+ exports.nxVersion = '13.4.5-beta.7';
5
5
  exports.reactNativeVersion = '0.66.4';
6
6
  exports.typesReactNativeVersion = '0.66.11';
7
7
  exports.metroVersion = '0.66.2';
8
8
  exports.reactNativeCommunityCli = '6.3.1';
9
9
  exports.reactNativeCommunityCliIos = '6.2.0';
10
10
  exports.reactNativeCommunityCliAndroid = '6.3.0';
11
+ exports.reactNativeConfigVersion = '1.4.5';
11
12
  exports.metroReactNativeBabelPresetVersion = '0.66.2';
12
13
  exports.testingLibraryReactNativeVersion = '9.0.0';
13
14
  exports.testingLibraryJestNativeVersion = '4.0.4';
@@ -1 +1 @@
1
- {"version":3,"file":"versions.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/versions.ts"],"names":[],"mappings":";;;AAAa,QAAA,S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