@nrwl/react-native 13.3.2 → 13.3.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/package.json +8 -7
- package/src/utils/add-jest.js +1 -1
- package/src/utils/add-jest.js.map +1 -1
- package/src/utils/ensure-node-modules-symlink.js +5 -5
- package/src/utils/ensure-node-modules-symlink.js.map +1 -1
- package/src/utils/ensure-node-modules-symlink.spec.ts +3 -5
- package/src/utils/versions.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nrwl/react-native",
|
|
3
|
-
"version": "13.3.
|
|
3
|
+
"version": "13.3.7",
|
|
4
4
|
"description": "React Native Plugin for Nx",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Monorepo",
|
|
@@ -24,14 +24,15 @@
|
|
|
24
24
|
"main": "index.js",
|
|
25
25
|
"types": "index.d.ts",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@nrwl/detox": "13.3.
|
|
28
|
-
"@nrwl/devkit": "13.3.
|
|
29
|
-
"@nrwl/jest": "13.3.
|
|
30
|
-
"@nrwl/linter": "13.3.
|
|
31
|
-
"@nrwl/react": "13.3.
|
|
32
|
-
"@nrwl/workspace": "13.3.
|
|
27
|
+
"@nrwl/detox": "13.3.7",
|
|
28
|
+
"@nrwl/devkit": "13.3.7",
|
|
29
|
+
"@nrwl/jest": "13.3.7",
|
|
30
|
+
"@nrwl/linter": "13.3.7",
|
|
31
|
+
"@nrwl/react": "13.3.7",
|
|
32
|
+
"@nrwl/workspace": "13.3.7",
|
|
33
33
|
"chalk": "^4.1.0",
|
|
34
34
|
"enhanced-resolve": "^5.8.3",
|
|
35
|
+
"fs-extra": "^9.1.0",
|
|
35
36
|
"ignore": "^5.0.4",
|
|
36
37
|
"metro-resolver": "^0.66.2",
|
|
37
38
|
"node-fetch": "^2.6.1",
|
package/src/utils/add-jest.js
CHANGED
|
@@ -13,7 +13,7 @@ function addJest(host, unitTestRunner, projectName, appProjectRoot, js) {
|
|
|
13
13
|
supportTsx: true,
|
|
14
14
|
skipSerializers: true,
|
|
15
15
|
setupFile: 'none',
|
|
16
|
-
|
|
16
|
+
compiler: 'babel',
|
|
17
17
|
});
|
|
18
18
|
// overwrite the jest.config.js file because react native needs to have special transform property
|
|
19
19
|
const configPath = `${appProjectRoot}/jest.config.js`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-jest.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-jest.ts"],"names":[],"mappings":";;;;AACA,qCAAkD;AAElD,SAAsB,OAAO,CAC3B,IAAU,EACV,cAA+B,EAC/B,WAAmB,EACnB,cAAsB,EACtB,EAAW;;QAEX,IAAI,cAAc,KAAK,MAAM,EAAE;YAC7B,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAoB,EAAC,IAAI,EAAE;YAChD,OAAO,EAAE,WAAW;YACpB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,MAAM;YACjB,
|
|
1
|
+
{"version":3,"file":"add-jest.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/add-jest.ts"],"names":[],"mappings":";;;;AACA,qCAAkD;AAElD,SAAsB,OAAO,CAC3B,IAAU,EACV,cAA+B,EAC/B,WAAmB,EACnB,cAAsB,EACtB,EAAW;;QAEX,IAAI,cAAc,KAAK,MAAM,EAAE;YAC7B,OAAO,GAAG,EAAE,GAAE,CAAC,CAAC;SACjB;QAED,MAAM,QAAQ,GAAG,MAAM,IAAA,2BAAoB,EAAC,IAAI,EAAE;YAChD,OAAO,EAAE,WAAW;YACpB,UAAU,EAAE,IAAI;YAChB,eAAe,EAAE,IAAI;YACrB,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC;QAEH,kGAAkG;QAClG,MAAM,UAAU,GAAG,GAAG,cAAc,iBAAiB,CAAC;QACtD,MAAM,OAAO,GAAG;kBACA,WAAW;;;;;+CAKkB,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;;;;;;;;;;GAU5D,CAAC;QACF,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;QAEhC,OAAO,QAAQ,CAAC;IAClB,CAAC;CAAA;AAzCD,0BAyCC"}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ensureNodeModulesSymlink = void 0;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
const os_1 = require("os");
|
|
6
|
-
const
|
|
6
|
+
const fs_extra_1 = require("fs-extra");
|
|
7
7
|
/**
|
|
8
8
|
* This function symlink workspace node_modules folder with app project's node_mdules folder.
|
|
9
9
|
* For yarn and npm, it will symlink the entire node_modules folder.
|
|
@@ -14,16 +14,16 @@ const fs = require("fs");
|
|
|
14
14
|
*/
|
|
15
15
|
function ensureNodeModulesSymlink(workspaceRoot, projectRoot) {
|
|
16
16
|
const worksapceNodeModulesPath = (0, path_1.join)(workspaceRoot, 'node_modules');
|
|
17
|
-
if (!
|
|
17
|
+
if (!(0, fs_extra_1.existsSync)(worksapceNodeModulesPath)) {
|
|
18
18
|
throw new Error(`Cannot find ${worksapceNodeModulesPath}`);
|
|
19
19
|
}
|
|
20
20
|
const appNodeModulesPath = (0, path_1.join)(workspaceRoot, projectRoot, 'node_modules');
|
|
21
21
|
// `mklink /D` requires admin privilege in Windows so we need to use junction
|
|
22
22
|
const symlinkType = (0, os_1.platform)() === 'win32' ? 'junction' : 'dir';
|
|
23
|
-
if (
|
|
24
|
-
|
|
23
|
+
if ((0, fs_extra_1.existsSync)(appNodeModulesPath)) {
|
|
24
|
+
(0, fs_extra_1.removeSync)(appNodeModulesPath);
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
(0, fs_extra_1.symlinkSync)(worksapceNodeModulesPath, appNodeModulesPath, symlinkType);
|
|
27
27
|
}
|
|
28
28
|
exports.ensureNodeModulesSymlink = ensureNodeModulesSymlink;
|
|
29
29
|
//# sourceMappingURL=ensure-node-modules-symlink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-node-modules-symlink.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/ensure-node-modules-symlink.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,2BAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"ensure-node-modules-symlink.js","sourceRoot":"","sources":["../../../../../packages/react-native/src/utils/ensure-node-modules-symlink.ts"],"names":[],"mappings":";;;AAAA,+BAA4B;AAC5B,2BAA8B;AAC9B,uCAA+D;AAE/D;;;;;;;GAOG;AACH,SAAgB,wBAAwB,CACtC,aAAqB,EACrB,WAAmB;IAEnB,MAAM,wBAAwB,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,cAAc,CAAC,CAAC;IACrE,IAAI,CAAC,IAAA,qBAAU,EAAC,wBAAwB,CAAC,EAAE;QACzC,MAAM,IAAI,KAAK,CAAC,eAAe,wBAAwB,EAAE,CAAC,CAAC;KAC5D;IAED,MAAM,kBAAkB,GAAG,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,EAAE,cAAc,CAAC,CAAC;IAC5E,6EAA6E;IAC7E,MAAM,WAAW,GAAG,IAAA,aAAQ,GAAE,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,CAAC;IAEhE,IAAI,IAAA,qBAAU,EAAC,kBAAkB,CAAC,EAAE;QAClC,IAAA,qBAAU,EAAC,kBAAkB,CAAC,CAAC;KAChC;IACD,IAAA,sBAAW,EAAC,wBAAwB,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC;AACzE,CAAC;AAjBD,4DAiBC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { tmpdir } from 'os';
|
|
2
2
|
import { join } from 'path';
|
|
3
|
-
import * as fs from 'fs';
|
|
3
|
+
import * as fs from 'fs-extra';
|
|
4
4
|
import { ensureNodeModulesSymlink } from './ensure-node-modules-symlink';
|
|
5
5
|
|
|
6
6
|
const workspaceDir = join(tmpdir(), 'nx-react-native-test');
|
|
@@ -9,8 +9,7 @@ const appDirAbsolutePath = join(workspaceDir, appDir);
|
|
|
9
9
|
|
|
10
10
|
describe('ensureNodeModulesSymlink', () => {
|
|
11
11
|
beforeEach(() => {
|
|
12
|
-
if (fs.existsSync(workspaceDir))
|
|
13
|
-
fs.rmdirSync(workspaceDir, { recursive: true });
|
|
12
|
+
if (fs.existsSync(workspaceDir)) fs.removeSync(workspaceDir);
|
|
14
13
|
fs.mkdirSync(workspaceDir);
|
|
15
14
|
fs.mkdirSync(appDirAbsolutePath, { recursive: true });
|
|
16
15
|
fs.mkdirSync(appDirAbsolutePath, { recursive: true });
|
|
@@ -36,8 +35,7 @@ describe('ensureNodeModulesSymlink', () => {
|
|
|
36
35
|
});
|
|
37
36
|
|
|
38
37
|
afterEach(() => {
|
|
39
|
-
if (fs.existsSync(workspaceDir))
|
|
40
|
-
fs.rmdirSync(workspaceDir, { recursive: true });
|
|
38
|
+
if (fs.existsSync(workspaceDir)) fs.removeSync(workspaceDir);
|
|
41
39
|
});
|
|
42
40
|
|
|
43
41
|
it('should create symlinks', () => {
|
package/src/utils/versions.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
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.3.
|
|
4
|
+
exports.nxVersion = '13.3.7';
|
|
5
5
|
exports.reactNativeVersion = '0.66.2';
|
|
6
6
|
exports.typesReactNativeVersion = '0.66.2';
|
|
7
7
|
exports.metroVersion = '0.66.2';
|