proby 0.11.0 → 0.12.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/lib/bin.js +4 -2
- package/lib/run.d.ts +1 -1
- package/lib/run.js +3 -1
- package/package.json +5 -4
package/lib/bin.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import args from "@rcompat/args";
|
|
2
3
|
import color from "@rcompat/cli/color";
|
|
3
4
|
import print from "@rcompat/cli/print";
|
|
4
5
|
import fs from "@rcompat/fs";
|
|
@@ -11,6 +12,7 @@ if (await spec_json.exists()) {
|
|
|
11
12
|
else {
|
|
12
13
|
// console.log(`spec.json missing, continuing with defaults`);
|
|
13
14
|
}
|
|
15
|
+
const [file] = args;
|
|
14
16
|
const type = await (async (base) => {
|
|
15
17
|
if (await base.join("packages").exists()) {
|
|
16
18
|
return "monorepo";
|
|
@@ -23,11 +25,11 @@ if (type === "monorepo") {
|
|
|
23
25
|
for (const repo of await root.join("packages").list({
|
|
24
26
|
filter: info => info.kind === "directory",
|
|
25
27
|
})) {
|
|
26
|
-
await run(repo.join("src"), repo.name);
|
|
28
|
+
await run(repo.join("src"), repo.name, file);
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
else if (type === "repo") {
|
|
30
|
-
await run(root.join("src"));
|
|
32
|
+
await run(root.join("src"), undefined, file);
|
|
31
33
|
}
|
|
32
34
|
else {
|
|
33
35
|
print(`${color.red("src")} or ${color.red("packages")} not found\n`);
|
package/lib/run.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { FileRef } from "@rcompat/fs";
|
|
2
|
-
declare const _default: (root: FileRef, subrepo?: string) => Promise<void>;
|
|
2
|
+
declare const _default: (root: FileRef, subrepo?: string, target?: string) => Promise<void>;
|
|
3
3
|
export default _default;
|
|
4
4
|
//# sourceMappingURL=run.d.ts.map
|
package/lib/run.js
CHANGED
|
@@ -72,7 +72,7 @@ async function run_in_worker(spec, env) {
|
|
|
72
72
|
});
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
export default async (root, subrepo) => {
|
|
75
|
+
export default async (root, subrepo, target) => {
|
|
76
76
|
const files = await root.list({
|
|
77
77
|
recursive: true,
|
|
78
78
|
filter: info => extensions.some(extension => info.path.endsWith(extension)),
|
|
@@ -82,6 +82,8 @@ export default async (root, subrepo) => {
|
|
|
82
82
|
if (subrepo !== undefined)
|
|
83
83
|
print(`${color.blue(subrepo)}\n`);
|
|
84
84
|
for (const file of files) {
|
|
85
|
+
if (target !== undefined && !file.path.endsWith(target))
|
|
86
|
+
continue;
|
|
85
87
|
const env_file = await file.sibling(file.name.replace(/\.spec\.(ts|js)$/, ".env.ts")).or(() => null);
|
|
86
88
|
if (env_file !== null) {
|
|
87
89
|
await run_in_worker(file, env_file);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proby",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Standard library test runner",
|
|
5
5
|
"bugs": "https://github.com/rcompat/rcompat/issues",
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
"directory": "packages/proby"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@rcompat/
|
|
19
|
+
"@rcompat/args": "^0.12.0",
|
|
20
20
|
"@rcompat/cli": "^0.17.0",
|
|
21
|
-
"@rcompat/fs": "^0.27.1"
|
|
21
|
+
"@rcompat/fs": "^0.27.1",
|
|
22
|
+
"@rcompat/assert": "^0.7.0"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
|
-
"@rcompat/test": "^0.11.
|
|
25
|
+
"@rcompat/test": "^0.11.2"
|
|
25
26
|
},
|
|
26
27
|
"peerDependenciesMeta": {
|
|
27
28
|
"@rcompat/test": {
|