proby 0.6.0 → 0.7.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 CHANGED
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import color from "@rcompat/cli/color";
3
3
  import print from "@rcompat/cli/print";
4
- import root from "@rcompat/fs/project/root";
4
+ import fs from "@rcompat/fs";
5
5
  import run from "./run.js";
6
- const $root = await root();
7
- const spec_json = $root.join("spec.json");
6
+ const root = await fs.project.root();
7
+ const spec_json = root.join("spec.json");
8
8
  if (await spec_json.exists()) {
9
9
  // console.log(`spec.json exists, reading`);
10
10
  }
@@ -18,14 +18,16 @@ const type = await (async (base) => {
18
18
  if (await base.join("src").exists()) {
19
19
  return "repo";
20
20
  }
21
- })($root);
21
+ })(root);
22
22
  if (type === "monorepo") {
23
- for (const repo of await $root.join("packages").list()) {
23
+ for (const repo of await root.join("packages").list({
24
+ filter: info => info.kind === "directory",
25
+ })) {
24
26
  await run(repo.join("src"), repo.name);
25
27
  }
26
28
  }
27
29
  else if (type === "repo") {
28
- await run($root.join("src"));
30
+ await run(root.join("src"));
29
31
  }
30
32
  else {
31
33
  print(`${color.red("src")} or ${color.red("packages")} not found\n`);
package/lib/run.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type FileRef from "@rcompat/fs/FileRef";
1
+ import type { FileRef } from "@rcompat/fs";
2
2
  declare const _default: (root: FileRef, subrepo?: string) => Promise<void>;
3
3
  export default _default;
4
4
  //# sourceMappingURL=run.d.ts.map
package/lib/run.js CHANGED
@@ -37,7 +37,7 @@ function stringify(value) {
37
37
  export default async (root, subrepo) => {
38
38
  const files = await root.list({
39
39
  recursive: true,
40
- filter: file => extensions.some(extension => file.path.endsWith(extension)),
40
+ filter: info => extensions.some(extension => info.path.endsWith(extension)),
41
41
  });
42
42
  if (files.length === 0)
43
43
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proby",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Standard library test runner",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",
@@ -16,11 +16,11 @@
16
16
  "directory": "packages/proby"
17
17
  },
18
18
  "dependencies": {
19
- "@rcompat/cli": "^0.13.0",
20
- "@rcompat/fs": "^0.24.0"
19
+ "@rcompat/cli": "^0.14.0",
20
+ "@rcompat/fs": "^0.25.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@rcompat/test": "^0.7.0"
23
+ "@rcompat/test": "^0.8.0"
24
24
  },
25
25
  "peerDependenciesMeta": {
26
26
  "@rcompat/test": {