@rnx-kit/cli 0.14.7 → 0.14.8
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/CHANGELOG.md +6 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/src/bundle/defaultPlugins.ts.html +1 -1
- package/coverage/lcov-report/src/bundle/index.html +1 -1
- package/coverage/lcov-report/src/bundle/kit-config.ts.html +1 -1
- package/coverage/lcov-report/src/bundle/metro.ts.html +1 -1
- package/coverage/lcov-report/src/bundle/overrides.ts.html +1 -1
- package/coverage/lcov-report/src/copy-assets.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/metro-config.ts.html +1 -1
- package/coverage/lcov-report/src/typescript/index.html +1 -1
- package/coverage/lcov-report/src/typescript/project-cache.ts.html +1 -1
- package/lib/test.d.ts.map +1 -1
- package/lib/test.js +12 -2
- package/lib/test.js.map +1 -1
- package/package.json +1 -1
- package/src/test.ts +11 -1
package/CHANGELOG.md
CHANGED
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1664453037926" clover="3.2.0">
|
|
3
|
+
<project timestamp="1664453037926" name="All files">
|
|
4
4
|
<metrics statements="284" coveredstatements="140" conditionals="170" coveredconditionals="82" methods="45" coveredmethods="24" elements="499" coveredelements="246" complexity="0" loc="284" ncloc="284" packages="3" files="7" classes="7"/>
|
|
5
5
|
<package name="src">
|
|
6
6
|
<metrics statements="208" coveredstatements="109" conditionals="131" coveredconditionals="61" methods="28" coveredmethods="16"/>
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
132
132
|
Code coverage generated by
|
|
133
133
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
134
|
-
at
|
|
134
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
135
135
|
</div>
|
|
136
136
|
<script src="prettify.js"></script>
|
|
137
137
|
<script>
|
|
@@ -100,7 +100,7 @@ export function getDefaultBundlerPlugins(): Required<BundlerPlugins> {
|
|
|
100
100
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
101
101
|
Code coverage generated by
|
|
102
102
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
103
|
-
at
|
|
103
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
104
104
|
</div>
|
|
105
105
|
<script src="../../prettify.js"></script>
|
|
106
106
|
<script>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at
|
|
149
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
150
150
|
</div>
|
|
151
151
|
<script src="../../prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -313,7 +313,7 @@ export function getCliPlatformBundleConfigs(
|
|
|
313
313
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
314
314
|
Code coverage generated by
|
|
315
315
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
316
|
-
at
|
|
316
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
317
317
|
</div>
|
|
318
318
|
<script src="../../prettify.js"></script>
|
|
319
319
|
<script>
|
|
@@ -211,7 +211,7 @@ export async function metroBundle(
|
|
|
211
211
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
212
212
|
Code coverage generated by
|
|
213
213
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
214
|
-
at
|
|
214
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
215
215
|
</div>
|
|
216
216
|
<script src="../../prettify.js"></script>
|
|
217
217
|
<script>
|
|
@@ -220,7 +220,7 @@ export function applyBundleConfigOverrides(
|
|
|
220
220
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
221
221
|
Code coverage generated by
|
|
222
222
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
223
|
-
at
|
|
223
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
224
224
|
</div>
|
|
225
225
|
<script src="../../prettify.js"></script>
|
|
226
226
|
<script>
|
|
@@ -1771,7 +1771,7 @@ export const rnxCopyAssetsCommand = {
|
|
|
1771
1771
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1772
1772
|
Code coverage generated by
|
|
1773
1773
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1774
|
-
at
|
|
1774
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
1775
1775
|
</div>
|
|
1776
1776
|
<script src="../prettify.js"></script>
|
|
1777
1777
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at
|
|
119
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -586,7 +586,7 @@ export function customizeMetroConfig(
|
|
|
586
586
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
587
587
|
Code coverage generated by
|
|
588
588
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
589
|
-
at
|
|
589
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
590
590
|
</div>
|
|
591
591
|
<script src="../prettify.js"></script>
|
|
592
592
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -697,7 +697,7 @@ export function createProjectCache(
|
|
|
697
697
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
698
698
|
Code coverage generated by
|
|
699
699
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
700
|
-
at
|
|
700
|
+
at Thu Sep 29 2022 12:03:57 GMT+0000 (Coordinated Universal Time)
|
|
701
701
|
</div>
|
|
702
702
|
<script src="../../prettify.js"></script>
|
|
703
703
|
<script>
|
package/lib/test.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAK7E,aAAK,IAAI,GAAG;IACV,QAAQ,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;CAC7D,CAAC;AAEF,aAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,OAAO,CAAC,EACJ,MAAM,GACN,OAAO,GACP,MAAM,GACN,CAAC,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;CACxD,CAAC;AAIF,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,SAAS,EAClB,EAAE,QAAQ,EAAE,EAAE,IAAI,GACjB,IAAI,
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAK7E,aAAK,IAAI,GAAG;IACV,QAAQ,EAAE,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;CAC7D,CAAC;AAEF,aAAK,OAAO,GAAG;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACjC,OAAO,CAAC,EACJ,MAAM,GACN,OAAO,GACP,MAAM,GACN,CAAC,CAAC,MAAM,EAAE,SAAS,KAAK,MAAM,GAAG,OAAO,GAAG,MAAM,CAAC,CAAC;CACxD,CAAC;AAIF,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,SAAS,EAClB,EAAE,QAAQ,EAAE,EAAE,IAAI,GACjB,IAAI,CA8BN;AAuBD,eAAO,MAAM,cAAc;;;;;CAY1B,CAAC"}
|
package/lib/test.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.rnxTestCommand = exports.rnxTest = void 0;
|
|
4
|
+
const console_1 = require("@rnx-kit/console");
|
|
4
5
|
const tools_node_1 = require("@rnx-kit/tools-node");
|
|
5
6
|
const platform_1 = require("@rnx-kit/tools-react-native/platform");
|
|
6
|
-
const jest_cli_1 = require("jest-cli");
|
|
7
7
|
const COMMAND_NAME = "rnx-test";
|
|
8
8
|
function rnxTest(_argv, _config, { platform }) {
|
|
9
|
+
const runJest = (() => {
|
|
10
|
+
try {
|
|
11
|
+
const { run } = require("jest-cli");
|
|
12
|
+
return run;
|
|
13
|
+
}
|
|
14
|
+
catch (e) {
|
|
15
|
+
(0, console_1.error)("'rnx-test' is unavailable because 'jest-cli' is not installed");
|
|
16
|
+
throw e;
|
|
17
|
+
}
|
|
18
|
+
})();
|
|
9
19
|
const commandIndex = process.argv.indexOf(COMMAND_NAME);
|
|
10
20
|
if (commandIndex < 0) {
|
|
11
21
|
throw new Error("Failed to parse command arguments");
|
|
@@ -20,7 +30,7 @@ function rnxTest(_argv, _config, { platform }) {
|
|
|
20
30
|
// option. We can pass the rest of the arguments to Jest as they are.
|
|
21
31
|
argv.splice(platformIndex, 2);
|
|
22
32
|
process.env["RN_TARGET_PLATFORM"] = platform;
|
|
23
|
-
(
|
|
33
|
+
runJest(argv);
|
|
24
34
|
}
|
|
25
35
|
exports.rnxTest = rnxTest;
|
|
26
36
|
function jestOptions() {
|
package/lib/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;;AACA,oDAA+D;AAC/D,mEAAqE;
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":";;;AACA,8CAAyC;AACzC,oDAA+D;AAC/D,mEAAqE;AAiBrE,MAAM,YAAY,GAAG,UAAU,CAAC;AAEhC,SAAgB,OAAO,CACrB,KAAe,EACf,OAAkB,EAClB,EAAE,QAAQ,EAAQ;IAElB,MAAM,OAAO,GAA6B,CAAC,GAAG,EAAE;QAC9C,IAAI;YACF,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;YACpC,OAAO,GAAG,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C,MAAM,CAAC,CAAC;QACrE,OAAO;YACL,IAAI,EAAE,KAAK,MAAM,KAAK,IAAI,GAAG;YAC7B,WAAW;YACX,OAAO,EAAE,YAAY;SACtB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,cAAc,GAAG;IAC5B,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,mCAAmC;IAChD,IAAI,EAAE,OAAO;IACb,OAAO,EAAE;QACP;YACE,IAAI,EAAE,8CAA8C;YACpD,WAAW,EAAE,oBAAoB;YACjC,KAAK,EAAE,wBAAa;SACrB;QACD,GAAG,WAAW,EAAE;KACjB;CACF,CAAC"}
|
package/package.json
CHANGED
package/src/test.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
|
+
import { error } from "@rnx-kit/console";
|
|
2
3
|
import { findPackageDependencyDir } from "@rnx-kit/tools-node";
|
|
3
4
|
import { parsePlatform } from "@rnx-kit/tools-react-native/platform";
|
|
4
|
-
import { run as runJest } from "jest-cli";
|
|
5
5
|
|
|
6
6
|
type Args = {
|
|
7
7
|
platform: "android" | "ios" | "macos" | "windows" | "win32";
|
|
@@ -25,6 +25,16 @@ export function rnxTest(
|
|
|
25
25
|
_config: CLIConfig,
|
|
26
26
|
{ platform }: Args
|
|
27
27
|
): void {
|
|
28
|
+
const runJest: (argv: string[]) => void = (() => {
|
|
29
|
+
try {
|
|
30
|
+
const { run } = require("jest-cli");
|
|
31
|
+
return run;
|
|
32
|
+
} catch (e) {
|
|
33
|
+
error("'rnx-test' is unavailable because 'jest-cli' is not installed");
|
|
34
|
+
throw e;
|
|
35
|
+
}
|
|
36
|
+
})();
|
|
37
|
+
|
|
28
38
|
const commandIndex = process.argv.indexOf(COMMAND_NAME);
|
|
29
39
|
if (commandIndex < 0) {
|
|
30
40
|
throw new Error("Failed to parse command arguments");
|