@rnx-kit/cli 0.14.9 → 0.15.0
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 +16 -0
- package/README.md +3 -3
- 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/{dep-check.d.ts → align-deps.d.ts} +4 -4
- package/lib/align-deps.d.ts.map +1 -0
- package/lib/align-deps.js +68 -0
- package/lib/align-deps.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -4
- package/lib/index.js.map +1 -1
- package/lib/test.d.ts.map +1 -1
- package/lib/test.js +44 -11
- package/lib/test.js.map +1 -1
- package/package.json +6 -3
- package/react-native.config.js +4 -4
- package/src/align-deps.ts +73 -0
- package/src/index.ts +1 -1
- package/src/test.ts +22 -11
- package/lib/dep-check.d.ts.map +0 -1
- package/lib/dep-check.js +0 -56
- package/lib/dep-check.js.map +0 -1
- package/src/dep-check.ts +0 -69
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Change Log - @rnx-kit/cli
|
|
2
2
|
|
|
3
|
+
## 0.15.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- d563e22f: Migrate from `@rnx-kit/dep-check` to `@rnx-kit/align-deps`
|
|
8
|
+
|
|
9
|
+
## 0.14.10
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 80f823df: Fail gracefully if `jest-cli` is not installed (part 2)
|
|
14
|
+
- Updated dependencies [c14e998e]
|
|
15
|
+
- Updated dependencies [a5810bb8]
|
|
16
|
+
- @rnx-kit/dep-check@1.13.5
|
|
17
|
+
- @rnx-kit/tools-language@1.4.1
|
|
18
|
+
|
|
3
19
|
## 0.14.9
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -171,14 +171,14 @@ from the bundle configuration (or its [defaults](#bundle-defaults)).
|
|
|
171
171
|
|
|
172
172
|
## Manage Dependencies
|
|
173
173
|
|
|
174
|
-
Manage
|
|
174
|
+
Manage dependencies within a repository and across many repositories.
|
|
175
175
|
|
|
176
176
|
```
|
|
177
|
-
$ yarn react-native rnx-
|
|
177
|
+
$ yarn react-native rnx-align-deps [options] [/path/to/package.json]
|
|
178
178
|
```
|
|
179
179
|
|
|
180
180
|
Refer to
|
|
181
|
-
[@rnx-kit/
|
|
181
|
+
[@rnx-kit/align-deps](https://github.com/microsoft/rnx-kit/tree/main/packages/align-deps)
|
|
182
182
|
for details.
|
|
183
183
|
|
|
184
184
|
## Generate a Third-Party Notice for a Package
|
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="1668157416226" clover="3.2.0">
|
|
3
|
+
<project timestamp="1668157416226" name="All files">
|
|
4
4
|
<metrics statements="283" coveredstatements="139" conditionals="168" coveredconditionals="81" methods="44" coveredmethods="23" elements="495" coveredelements="243" complexity="0" loc="283" ncloc="283" packages="3" files="7" classes="7"/>
|
|
5
5
|
<package name="src">
|
|
6
6
|
<metrics statements="207" coveredstatements="108" conditionals="129" coveredconditionals="60" methods="27" coveredmethods="15"/>
|
|
@@ -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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 GMT+0000 (Coordinated Universal Time)
|
|
224
224
|
</div>
|
|
225
225
|
<script src="../../prettify.js"></script>
|
|
226
226
|
<script>
|
|
@@ -1762,7 +1762,7 @@ export const rnxCopyAssetsCommand = {
|
|
|
1762
1762
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1763
1763
|
Code coverage generated by
|
|
1764
1764
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1765
|
-
at
|
|
1765
|
+
at Fri Nov 11 2022 09:03:36 GMT+0000 (Coordinated Universal Time)
|
|
1766
1766
|
</div>
|
|
1767
1767
|
<script src="../prettify.js"></script>
|
|
1768
1768
|
<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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 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 Fri Nov 11 2022 09:03:36 GMT+0000 (Coordinated Universal Time)
|
|
701
701
|
</div>
|
|
702
702
|
<script src="../../prettify.js"></script>
|
|
703
703
|
<script>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
2
|
declare type CLIArgs = Record<string, string | number | boolean | undefined>;
|
|
3
|
-
export declare function
|
|
4
|
-
export declare const
|
|
3
|
+
export declare function rnxAlignDeps(argv: string[], _config: CLIConfig, args: CLIArgs): void;
|
|
4
|
+
export declare const rnxAlignDepsCommand: {
|
|
5
5
|
name: string;
|
|
6
6
|
description: string;
|
|
7
|
-
func: typeof
|
|
7
|
+
func: typeof rnxAlignDeps;
|
|
8
8
|
options: {
|
|
9
9
|
name: string;
|
|
10
10
|
description: string;
|
|
11
11
|
}[];
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
14
|
-
//# sourceMappingURL=
|
|
14
|
+
//# sourceMappingURL=align-deps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"align-deps.d.ts","sourceRoot":"","sources":["../src/align-deps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI7E,aAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAUrE,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,OAAO,GACZ,IAAI,CASN;AAED,eAAO,MAAM,mBAAmB;;;;;;;;CA2C/B,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a;
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.rnxAlignDepsCommand = exports.rnxAlignDeps = void 0;
|
|
5
|
+
const align_deps_1 = require("@rnx-kit/align-deps");
|
|
6
|
+
const properties_1 = require("@rnx-kit/tools-language/properties");
|
|
7
|
+
const optionsMap = {
|
|
8
|
+
"exclude-packages": "excludePackages",
|
|
9
|
+
init: "init",
|
|
10
|
+
presets: "presets",
|
|
11
|
+
requirements: "requirements",
|
|
12
|
+
"set-version": "setVersion",
|
|
13
|
+
};
|
|
14
|
+
function rnxAlignDeps(argv, _config, args) {
|
|
15
|
+
(0, align_deps_1.cli)({
|
|
16
|
+
...(0, properties_1.pickValues)(args, Object.values(optionsMap), Object.keys(optionsMap)),
|
|
17
|
+
loose: Boolean(args.loose),
|
|
18
|
+
"migrate-config": Boolean(args.migrateConfig),
|
|
19
|
+
verbose: Boolean(args.verbose),
|
|
20
|
+
write: Boolean(args.write),
|
|
21
|
+
packages: argv,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
exports.rnxAlignDeps = rnxAlignDeps;
|
|
25
|
+
exports.rnxAlignDepsCommand = {
|
|
26
|
+
name: "rnx-align-deps",
|
|
27
|
+
description: "Manage dependencies within a repository and across many repositories",
|
|
28
|
+
func: rnxAlignDeps,
|
|
29
|
+
options: [
|
|
30
|
+
{
|
|
31
|
+
name: "--exclude-packages [packages]",
|
|
32
|
+
description: align_deps_1.cliOptions["exclude-packages"].description,
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: `--init [${(_a = align_deps_1.cliOptions.init.choices) === null || _a === void 0 ? void 0 : _a.join("|")}]`,
|
|
36
|
+
description: align_deps_1.cliOptions.init.description,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "--loose",
|
|
40
|
+
description: align_deps_1.cliOptions.loose.description,
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: "--migrate-config",
|
|
44
|
+
description: align_deps_1.cliOptions["migrate-config"].description,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: "--presets [presets]",
|
|
48
|
+
description: align_deps_1.cliOptions.presets.description,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "--requirements [requirements]",
|
|
52
|
+
description: align_deps_1.cliOptions.requirements.description,
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: "--set-version [versions]",
|
|
56
|
+
description: align_deps_1.cliOptions["set-version"].description,
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: "--verbose",
|
|
60
|
+
description: align_deps_1.cliOptions.verbose.description,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "--write",
|
|
64
|
+
description: align_deps_1.cliOptions.write.description,
|
|
65
|
+
},
|
|
66
|
+
],
|
|
67
|
+
};
|
|
68
|
+
//# sourceMappingURL=align-deps.js.map
|
|
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WAAW;SAC1C;QACD;YACE,IAAI,EAAE,kBAAkB;YACxB,WAAW,EAAE,uBAAU,CAAC,gBAAgB,CAAC,CAAC,WAAW;SACtD;QACD;YACE,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,uBAAU,CAAC,OAAO,CAAC,WAAW;SAC5C;QACD;YACE,IAAI,EAAE,+BAA+B;YACrC,WAAW,EAAE,uBAAU,CAAC,YAAY,CAAC,WAAW;SACjD;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,uBAAU,CAAC,aAAa,CAAC,CAAC,WAAW;SACnD;QACD;YACE,IAAI,EAAE,WAAW;YACjB,WAAW,EAAE,uBAAU,CAAC,OAAO,CAAC,WAAW;SAC5C;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,uBAAU,CAAC,KAAK,CAAC,WAAW;SAC1C;KACF;CACF,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export { rnxAlignDeps, rnxAlignDepsCommand } from "./align-deps";
|
|
1
2
|
export { rnxBundle, rnxBundleCommand } from "./bundle";
|
|
2
3
|
export { rnxClean } from "./clean";
|
|
3
4
|
export { copyProjectAssets, rnxCopyAssetsCommand } from "./copy-assets";
|
|
4
|
-
export { rnxDepCheck, rnxDepCheckCommand } from "./dep-check";
|
|
5
5
|
export { parseBoolean, parseInt, parseTransformProfile } from "./parsers";
|
|
6
6
|
export { rnxRamBundle, rnxRamBundleCommand } from "./ram-bundle";
|
|
7
7
|
export { rnxStart } from "./start";
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACxE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rnxWriteThirdPartyNotices = exports.rnxTestCommand = exports.rnxTest = exports.rnxStart = exports.rnxRamBundleCommand = exports.rnxRamBundle = exports.parseTransformProfile = exports.parseInt = exports.parseBoolean = exports.
|
|
3
|
+
exports.rnxWriteThirdPartyNotices = exports.rnxTestCommand = exports.rnxTest = exports.rnxStart = exports.rnxRamBundleCommand = exports.rnxRamBundle = exports.parseTransformProfile = exports.parseInt = exports.parseBoolean = exports.rnxCopyAssetsCommand = exports.copyProjectAssets = exports.rnxClean = exports.rnxBundleCommand = exports.rnxBundle = exports.rnxAlignDepsCommand = exports.rnxAlignDeps = void 0;
|
|
4
|
+
var align_deps_1 = require("./align-deps");
|
|
5
|
+
Object.defineProperty(exports, "rnxAlignDeps", { enumerable: true, get: function () { return align_deps_1.rnxAlignDeps; } });
|
|
6
|
+
Object.defineProperty(exports, "rnxAlignDepsCommand", { enumerable: true, get: function () { return align_deps_1.rnxAlignDepsCommand; } });
|
|
4
7
|
var bundle_1 = require("./bundle");
|
|
5
8
|
Object.defineProperty(exports, "rnxBundle", { enumerable: true, get: function () { return bundle_1.rnxBundle; } });
|
|
6
9
|
Object.defineProperty(exports, "rnxBundleCommand", { enumerable: true, get: function () { return bundle_1.rnxBundleCommand; } });
|
|
@@ -9,9 +12,6 @@ Object.defineProperty(exports, "rnxClean", { enumerable: true, get: function ()
|
|
|
9
12
|
var copy_assets_1 = require("./copy-assets");
|
|
10
13
|
Object.defineProperty(exports, "copyProjectAssets", { enumerable: true, get: function () { return copy_assets_1.copyProjectAssets; } });
|
|
11
14
|
Object.defineProperty(exports, "rnxCopyAssetsCommand", { enumerable: true, get: function () { return copy_assets_1.rnxCopyAssetsCommand; } });
|
|
12
|
-
var dep_check_1 = require("./dep-check");
|
|
13
|
-
Object.defineProperty(exports, "rnxDepCheck", { enumerable: true, get: function () { return dep_check_1.rnxDepCheck; } });
|
|
14
|
-
Object.defineProperty(exports, "rnxDepCheckCommand", { enumerable: true, get: function () { return dep_check_1.rnxDepCheckCommand; } });
|
|
15
15
|
var parsers_1 = require("./parsers");
|
|
16
16
|
Object.defineProperty(exports, "parseBoolean", { enumerable: true, get: function () { return parsers_1.parseBoolean; } });
|
|
17
17
|
Object.defineProperty(exports, "parseInt", { enumerable: true, get: function () { return parsers_1.parseInt; } });
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,mCAAuD;AAA9C,mGAAA,SAAS,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AACpC,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA;AACjB,6CAAwE;AAA/D,gHAAA,iBAAiB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAChD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,2CAAiE;AAAxD,0GAAA,YAAY,OAAA;AAAE,iHAAA,mBAAmB,OAAA;AAC1C,mCAAuD;AAA9C,mGAAA,SAAS,OAAA;AAAE,0GAAA,gBAAgB,OAAA;AACpC,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA;AACjB,6CAAwE;AAA/D,gHAAA,iBAAiB,OAAA;AAAE,mHAAA,oBAAoB,OAAA;AAChD,qCAA0E;AAAjE,uGAAA,YAAY,OAAA;AAAE,mGAAA,QAAQ,OAAA;AAAE,gHAAA,qBAAqB,OAAA;AACtD,2CAAiE;AAAxD,0GAAA,YAAY,OAAA;AAAE,iHAAA,mBAAmB,OAAA;AAC1C,iCAAmC;AAA1B,iGAAA,QAAQ,OAAA;AACjB,+BAAiD;AAAxC,+FAAA,OAAO,OAAA;AAAE,sGAAA,cAAc,OAAA;AAChC,yEAAwE;AAA/D,sIAAA,yBAAyB,OAAA"}
|
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;
|
|
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;AAM7E,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;AASF,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,EAAE,EACf,OAAO,EAAE,SAAS,EAClB,EAAE,QAAQ,EAAE,EAAE,IAAI,GACjB,IAAI,CA8BN;AA4BD,eAAO,MAAM,cAAc;;;;;CAY1B,CAAC"}
|
package/lib/test.js
CHANGED
|
@@ -1,14 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
26
|
exports.rnxTestCommand = exports.rnxTest = void 0;
|
|
4
27
|
const console_1 = require("@rnx-kit/console");
|
|
5
28
|
const tools_node_1 = require("@rnx-kit/tools-node");
|
|
6
29
|
const platform_1 = require("@rnx-kit/tools-react-native/platform");
|
|
30
|
+
const path = __importStar(require("path"));
|
|
7
31
|
const COMMAND_NAME = "rnx-test";
|
|
32
|
+
function resolveJestCli() {
|
|
33
|
+
const jestPath = path.dirname(require.resolve("jest/package.json"));
|
|
34
|
+
return require.resolve("jest-cli", { paths: [jestPath] });
|
|
35
|
+
}
|
|
8
36
|
function rnxTest(_argv, _config, { platform }) {
|
|
9
37
|
const runJest = (() => {
|
|
10
38
|
try {
|
|
11
|
-
const { run } = require(
|
|
39
|
+
const { run } = require(resolveJestCli());
|
|
12
40
|
return run;
|
|
13
41
|
}
|
|
14
42
|
catch (e) {
|
|
@@ -41,16 +69,21 @@ function jestOptions() {
|
|
|
41
69
|
//
|
|
42
70
|
// To work around this, resolve `jest-cli` first, then use the resolved path
|
|
43
71
|
// to import `./build/cli/args`.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
72
|
+
try {
|
|
73
|
+
const jestPath = (0, tools_node_1.findPackageDependencyDir)(resolveJestCli()) || "jest-cli";
|
|
74
|
+
const { options } = require(`${jestPath}/build/cli/args`);
|
|
75
|
+
return Object.keys(options).map((option) => {
|
|
76
|
+
const { default: defaultValue, description, type } = options[option];
|
|
77
|
+
return {
|
|
78
|
+
name: `--${option} [${type}]`,
|
|
79
|
+
description,
|
|
80
|
+
default: defaultValue,
|
|
81
|
+
};
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
catch (_) {
|
|
85
|
+
return [];
|
|
86
|
+
}
|
|
54
87
|
}
|
|
55
88
|
exports.rnxTestCommand = {
|
|
56
89
|
name: COMMAND_NAME,
|
package/lib/test.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../src/test.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"test.js","sourceRo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|
|
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",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"test": "rnx-kit-scripts test"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@rnx-kit/align-deps": "^2.0.1",
|
|
22
23
|
"@rnx-kit/config": "^0.5.2",
|
|
23
24
|
"@rnx-kit/console": "^1.0.11",
|
|
24
|
-
"@rnx-kit/dep-check": "^1.13.4",
|
|
25
25
|
"@rnx-kit/metro-plugin-cyclic-dependencies-detector": "^1.0.21",
|
|
26
26
|
"@rnx-kit/metro-plugin-duplicates-checker": "^2.0.0",
|
|
27
27
|
"@rnx-kit/metro-serializer": "^1.0.11",
|
|
28
28
|
"@rnx-kit/metro-serializer-esbuild": "^0.1.0",
|
|
29
29
|
"@rnx-kit/metro-service": "^3.0.2",
|
|
30
30
|
"@rnx-kit/third-party-notices": "^1.2.13",
|
|
31
|
-
"@rnx-kit/tools-language": "^1.4.
|
|
31
|
+
"@rnx-kit/tools-language": "^1.4.1",
|
|
32
32
|
"@rnx-kit/tools-node": "^1.2.7",
|
|
33
33
|
"@rnx-kit/tools-react-native": "^1.2.0",
|
|
34
34
|
"@rnx-kit/typescript-react-native-resolver": "^0.2.0",
|
|
@@ -47,6 +47,9 @@
|
|
|
47
47
|
"peerDependenciesMeta": {
|
|
48
48
|
"@react-native-community/cli-server-api": {
|
|
49
49
|
"optional": true
|
|
50
|
+
},
|
|
51
|
+
"jest-cli": {
|
|
52
|
+
"optional": true
|
|
50
53
|
}
|
|
51
54
|
},
|
|
52
55
|
"devDependencies": {
|
package/react-native.config.js
CHANGED
|
@@ -2,14 +2,14 @@ const path = require("path");
|
|
|
2
2
|
const {
|
|
3
3
|
parseBoolean,
|
|
4
4
|
parseInt,
|
|
5
|
+
rnxAlignDepsCommand,
|
|
5
6
|
rnxBundleCommand,
|
|
7
|
+
rnxClean,
|
|
6
8
|
rnxCopyAssetsCommand,
|
|
7
|
-
rnxStart,
|
|
8
|
-
rnxDepCheckCommand,
|
|
9
9
|
rnxRamBundleCommand,
|
|
10
|
+
rnxStart,
|
|
10
11
|
rnxTestCommand,
|
|
11
12
|
rnxWriteThirdPartyNotices,
|
|
12
|
-
rnxClean,
|
|
13
13
|
} = require("./lib/index");
|
|
14
14
|
|
|
15
15
|
module.exports = {
|
|
@@ -101,7 +101,7 @@ module.exports = {
|
|
|
101
101
|
],
|
|
102
102
|
},
|
|
103
103
|
rnxCopyAssetsCommand,
|
|
104
|
-
|
|
104
|
+
rnxAlignDepsCommand,
|
|
105
105
|
rnxTestCommand,
|
|
106
106
|
{
|
|
107
107
|
name: "rnx-write-third-party-notices",
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
|
+
import { cli, cliOptions } from "@rnx-kit/align-deps";
|
|
3
|
+
import { pickValues } from "@rnx-kit/tools-language/properties";
|
|
4
|
+
|
|
5
|
+
type CLIArgs = Record<string, string | number | boolean | undefined>;
|
|
6
|
+
|
|
7
|
+
const optionsMap: Partial<Record<keyof typeof cliOptions, string>> = {
|
|
8
|
+
"exclude-packages": "excludePackages",
|
|
9
|
+
init: "init",
|
|
10
|
+
presets: "presets",
|
|
11
|
+
requirements: "requirements",
|
|
12
|
+
"set-version": "setVersion",
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export function rnxAlignDeps(
|
|
16
|
+
argv: string[],
|
|
17
|
+
_config: CLIConfig,
|
|
18
|
+
args: CLIArgs
|
|
19
|
+
): void {
|
|
20
|
+
cli({
|
|
21
|
+
...pickValues(args, Object.values(optionsMap), Object.keys(optionsMap)),
|
|
22
|
+
loose: Boolean(args.loose),
|
|
23
|
+
"migrate-config": Boolean(args.migrateConfig),
|
|
24
|
+
verbose: Boolean(args.verbose),
|
|
25
|
+
write: Boolean(args.write),
|
|
26
|
+
packages: argv,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const rnxAlignDepsCommand = {
|
|
31
|
+
name: "rnx-align-deps",
|
|
32
|
+
description:
|
|
33
|
+
"Manage dependencies within a repository and across many repositories",
|
|
34
|
+
func: rnxAlignDeps,
|
|
35
|
+
options: [
|
|
36
|
+
{
|
|
37
|
+
name: "--exclude-packages [packages]",
|
|
38
|
+
description: cliOptions["exclude-packages"].description,
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: `--init [${cliOptions.init.choices?.join("|")}]`,
|
|
42
|
+
description: cliOptions.init.description,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "--loose",
|
|
46
|
+
description: cliOptions.loose.description,
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "--migrate-config",
|
|
50
|
+
description: cliOptions["migrate-config"].description,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "--presets [presets]",
|
|
54
|
+
description: cliOptions.presets.description,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "--requirements [requirements]",
|
|
58
|
+
description: cliOptions.requirements.description,
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: "--set-version [versions]",
|
|
62
|
+
description: cliOptions["set-version"].description,
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "--verbose",
|
|
66
|
+
description: cliOptions.verbose.description,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "--write",
|
|
70
|
+
description: cliOptions.write.description,
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
};
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export { rnxAlignDeps, rnxAlignDepsCommand } from "./align-deps";
|
|
1
2
|
export { rnxBundle, rnxBundleCommand } from "./bundle";
|
|
2
3
|
export { rnxClean } from "./clean";
|
|
3
4
|
export { copyProjectAssets, rnxCopyAssetsCommand } from "./copy-assets";
|
|
4
|
-
export { rnxDepCheck, rnxDepCheckCommand } from "./dep-check";
|
|
5
5
|
export { parseBoolean, parseInt, parseTransformProfile } from "./parsers";
|
|
6
6
|
export { rnxRamBundle, rnxRamBundleCommand } from "./ram-bundle";
|
|
7
7
|
export { rnxStart } from "./start";
|
package/src/test.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
|
2
2
|
import { error } from "@rnx-kit/console";
|
|
3
3
|
import { findPackageDependencyDir } from "@rnx-kit/tools-node";
|
|
4
4
|
import { parsePlatform } from "@rnx-kit/tools-react-native/platform";
|
|
5
|
+
import * as path from "path";
|
|
5
6
|
|
|
6
7
|
type Args = {
|
|
7
8
|
platform: "android" | "ios" | "macos" | "windows" | "win32";
|
|
@@ -20,6 +21,11 @@ type Options = {
|
|
|
20
21
|
|
|
21
22
|
const COMMAND_NAME = "rnx-test";
|
|
22
23
|
|
|
24
|
+
function resolveJestCli(): string {
|
|
25
|
+
const jestPath = path.dirname(require.resolve("jest/package.json"));
|
|
26
|
+
return require.resolve("jest-cli", { paths: [jestPath] });
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
export function rnxTest(
|
|
24
30
|
_argv: string[],
|
|
25
31
|
_config: CLIConfig,
|
|
@@ -27,7 +33,7 @@ export function rnxTest(
|
|
|
27
33
|
): void {
|
|
28
34
|
const runJest: (argv: string[]) => void = (() => {
|
|
29
35
|
try {
|
|
30
|
-
const { run } = require(
|
|
36
|
+
const { run } = require(resolveJestCli());
|
|
31
37
|
return run;
|
|
32
38
|
} catch (e) {
|
|
33
39
|
error("'rnx-test' is unavailable because 'jest-cli' is not installed");
|
|
@@ -64,17 +70,22 @@ function jestOptions(): Options[] {
|
|
|
64
70
|
//
|
|
65
71
|
// To work around this, resolve `jest-cli` first, then use the resolved path
|
|
66
72
|
// to import `./build/cli/args`.
|
|
67
|
-
|
|
68
|
-
|
|
73
|
+
try {
|
|
74
|
+
const jestPath = findPackageDependencyDir(resolveJestCli()) || "jest-cli";
|
|
69
75
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
return {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
const { options } = require(`${jestPath}/build/cli/args`);
|
|
77
|
+
|
|
78
|
+
return Object.keys(options).map((option) => {
|
|
79
|
+
const { default: defaultValue, description, type } = options[option];
|
|
80
|
+
return {
|
|
81
|
+
name: `--${option} [${type}]`,
|
|
82
|
+
description,
|
|
83
|
+
default: defaultValue,
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
} catch (_) {
|
|
87
|
+
return [];
|
|
88
|
+
}
|
|
78
89
|
}
|
|
79
90
|
|
|
80
91
|
export const rnxTestCommand = {
|
package/lib/dep-check.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dep-check.d.ts","sourceRoot":"","sources":["../src/dep-check.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAI7E,aAAK,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAC;AAErE,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,OAAO,GACZ,IAAI,CAiBN;AAED,eAAO,MAAM,kBAAkB;;;;;;;;CAuC9B,CAAC"}
|
package/lib/dep-check.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rnxDepCheckCommand = exports.rnxDepCheck = void 0;
|
|
4
|
-
const dep_check_1 = require("@rnx-kit/dep-check");
|
|
5
|
-
const properties_1 = require("@rnx-kit/tools-language/properties");
|
|
6
|
-
function rnxDepCheck(argv, _config, args) {
|
|
7
|
-
(0, dep_check_1.cli)({
|
|
8
|
-
...(0, properties_1.pickValues)(args, [
|
|
9
|
-
"custom-profiles",
|
|
10
|
-
"exclude-packages",
|
|
11
|
-
"init",
|
|
12
|
-
"set-version",
|
|
13
|
-
"vigilant",
|
|
14
|
-
], ["customProfiles", "excludePackages", "init", "setVersion", "vigilant"]),
|
|
15
|
-
loose: Boolean(args.loose),
|
|
16
|
-
write: Boolean(args.write),
|
|
17
|
-
packages: argv,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
exports.rnxDepCheck = rnxDepCheck;
|
|
21
|
-
exports.rnxDepCheckCommand = {
|
|
22
|
-
name: "rnx-dep-check",
|
|
23
|
-
description: "Dependency checker for React Native apps",
|
|
24
|
-
func: rnxDepCheck,
|
|
25
|
-
options: [
|
|
26
|
-
{
|
|
27
|
-
name: "--custom-profiles [module]",
|
|
28
|
-
description: "Path to custom profiles. This can be a path to a JSON file, a `.js` file, or a module name.",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "--exclude-packages [packages]",
|
|
32
|
-
description: "Comma-separated list of package names to exclude from inspection.",
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
name: "--init [app|library]",
|
|
36
|
-
description: "Writes an initial kit config",
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
name: "--loose",
|
|
40
|
-
description: "Determines how strict the React Native version requirement should be. Useful for apps that depend on a newer React Native version than their dependencies declare support for.",
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
name: "--set-version [versions]",
|
|
44
|
-
description: "Sets `reactNativeVersion` and `reactNativeDevVersion` for any configured package. The value should be a comma-separated list of `react-native` versions to set. The first number specifies the development version. Example: `0.64,0.63`",
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
name: "--vigilant [versions]",
|
|
48
|
-
description: "Inspects packages regardless of whether they've been configured. Specify a comma-separated list of profile versions to compare against, e.g. `0.63,0.64`. The first number specifies the target version.",
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
name: "--write",
|
|
52
|
-
description: "Writes all changes to the specified `package.json`",
|
|
53
|
-
},
|
|
54
|
-
],
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=dep-check.js.map
|
package/lib/dep-check.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"dep-check.js","sourceRoot":"","sources":["../src/dep-check.ts"],"names":[],"mappings":";;;AACA,kDAAyC;AACzC,mEAAgE;AAIhE,SAAgB,WAAW,CACzB,IAAc,EACd,OAAkB,EAClB,IAAa;IAEb,IAAA,eAAG,EAAC;QACF,GAAG,IAAA,uBAAU,EACX,IAAI,EACJ;YACE,iBAAiB;YACjB,kBAAkB;YAClB,MAAM;YACN,aAAa;YACb,UAAU;SACX,EACD,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,CACxE;QACD,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC1B,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAC1B,QAAQ,EAAE,IAAI;KACf,CAAC,CAAC;AACL,CAAC;AArBD,kCAqBC;AAEY,QAAA,kBAAkB,GAAG;IAChC,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,0CAA0C;IACvD,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE;QACP;YACE,IAAI,EAAE,4BAA4B;YAClC,WAAW,EACT,6FAA6F;SAChG;QACD;YACE,IAAI,EAAE,+BAA+B;YACrC,WAAW,EACT,mEAAmE;SACtE;QACD;YACE,IAAI,EAAE,sBAAsB;YAC5B,WAAW,EAAE,8BAA8B;SAC5C;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EACT,gLAAgL;SACnL;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EACT,0OAA0O;SAC7O;QACD;YACE,IAAI,EAAE,uBAAuB;YAC7B,WAAW,EACT,0MAA0M;SAC7M;QACD;YACE,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,oDAAoD;SAClE;KACF;CACF,CAAC"}
|
package/src/dep-check.ts
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import type { Config as CLIConfig } from "@react-native-community/cli-types";
|
|
2
|
-
import { cli } from "@rnx-kit/dep-check";
|
|
3
|
-
import { pickValues } from "@rnx-kit/tools-language/properties";
|
|
4
|
-
|
|
5
|
-
type CLIArgs = Record<string, string | number | boolean | undefined>;
|
|
6
|
-
|
|
7
|
-
export function rnxDepCheck(
|
|
8
|
-
argv: string[],
|
|
9
|
-
_config: CLIConfig,
|
|
10
|
-
args: CLIArgs
|
|
11
|
-
): void {
|
|
12
|
-
cli({
|
|
13
|
-
...pickValues(
|
|
14
|
-
args,
|
|
15
|
-
[
|
|
16
|
-
"custom-profiles",
|
|
17
|
-
"exclude-packages",
|
|
18
|
-
"init",
|
|
19
|
-
"set-version",
|
|
20
|
-
"vigilant",
|
|
21
|
-
],
|
|
22
|
-
["customProfiles", "excludePackages", "init", "setVersion", "vigilant"]
|
|
23
|
-
),
|
|
24
|
-
loose: Boolean(args.loose),
|
|
25
|
-
write: Boolean(args.write),
|
|
26
|
-
packages: argv,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export const rnxDepCheckCommand = {
|
|
31
|
-
name: "rnx-dep-check",
|
|
32
|
-
description: "Dependency checker for React Native apps",
|
|
33
|
-
func: rnxDepCheck,
|
|
34
|
-
options: [
|
|
35
|
-
{
|
|
36
|
-
name: "--custom-profiles [module]",
|
|
37
|
-
description:
|
|
38
|
-
"Path to custom profiles. This can be a path to a JSON file, a `.js` file, or a module name.",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
name: "--exclude-packages [packages]",
|
|
42
|
-
description:
|
|
43
|
-
"Comma-separated list of package names to exclude from inspection.",
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
name: "--init [app|library]",
|
|
47
|
-
description: "Writes an initial kit config",
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
name: "--loose",
|
|
51
|
-
description:
|
|
52
|
-
"Determines how strict the React Native version requirement should be. Useful for apps that depend on a newer React Native version than their dependencies declare support for.",
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
name: "--set-version [versions]",
|
|
56
|
-
description:
|
|
57
|
-
"Sets `reactNativeVersion` and `reactNativeDevVersion` for any configured package. The value should be a comma-separated list of `react-native` versions to set. The first number specifies the development version. Example: `0.64,0.63`",
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: "--vigilant [versions]",
|
|
61
|
-
description:
|
|
62
|
-
"Inspects packages regardless of whether they've been configured. Specify a comma-separated list of profile versions to compare against, e.g. `0.63,0.64`. The first number specifies the target version.",
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
name: "--write",
|
|
66
|
-
description: "Writes all changes to the specified `package.json`",
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
};
|