proby 0.13.3 → 0.14.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/Schema.d.ts CHANGED
@@ -1,7 +1,11 @@
1
- declare const Schema: import("pema").ObjectType<{
2
- monorepo: import("pema").DefaultType<import("pema").BooleanType, false>;
3
- packages: import("pema").DefaultType<import("pema").StringType, "packages">;
4
- include: import("pema").DefaultType<import("pema").ArrayType<import("pema").StringType>, string[]>;
5
- }>;
6
- export default Schema;
1
+ import type { Dict } from "@rcompat/type";
2
+ export type Config = {
3
+ monorepo: boolean;
4
+ packages: string;
5
+ include: string[];
6
+ };
7
+ declare const _default: {
8
+ parse(input?: Dict): Config;
9
+ };
10
+ export default _default;
7
11
  //# sourceMappingURL=Schema.d.ts.map
package/lib/Schema.js CHANGED
@@ -1,8 +1,17 @@
1
- import p from "pema";
2
- const Schema = p({
3
- monorepo: p.boolean.default(false),
4
- packages: p.string.default("packages"),
5
- include: p.array(p.string).default(["src"]),
6
- });
7
- export default Schema;
1
+ const defaults = {
2
+ monorepo: false,
3
+ packages: "packages",
4
+ include: ["src"],
5
+ };
6
+ export default {
7
+ parse(input = {}) {
8
+ return {
9
+ monorepo: typeof input.monorepo === "boolean" ? input.monorepo : defaults.monorepo,
10
+ packages: typeof input.packages === "string" ? input.packages : defaults.packages,
11
+ include: Array.isArray(input.include) && input.include.every((x) => typeof x === "string")
12
+ ? input.include
13
+ : defaults.include,
14
+ };
15
+ },
16
+ };
8
17
  //# sourceMappingURL=Schema.js.map
package/lib/bin.js CHANGED
@@ -13,10 +13,10 @@ async function read_conditions(file) {
13
13
  if (json.extends === undefined) {
14
14
  return [];
15
15
  }
16
- const next = await runtime.resolve(json.extends, file.directory.path);
16
+ const next = runtime.resolve(json.extends, file.directory.path);
17
17
  return read_conditions(fs.ref(next));
18
18
  }
19
- const root = await fs.project.root();
19
+ const root = await runtime.projectRoot();
20
20
  const ts_config_file = root.join("proby.config.ts");
21
21
  const js_config_file = root.join("proby.config.js");
22
22
  const user_config = await ts_config_file.exists()
package/lib/config.d.ts CHANGED
@@ -1,8 +1,4 @@
1
- import type Schema from "#Schema";
2
- declare const _default: (input: typeof Schema.input) => {
3
- monorepo?: boolean | undefined;
4
- packages?: string | undefined;
5
- include?: string[] | undefined;
6
- } | undefined;
1
+ import type { Config } from "#Schema";
2
+ declare const _default: (input: Partial<Config>) => Partial<Config>;
7
3
  export default _default;
8
4
  //# sourceMappingURL=config.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proby",
3
- "version": "0.13.3",
3
+ "version": "0.14.0",
4
4
  "description": "Standard library test runner",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",
@@ -16,17 +16,19 @@
16
16
  "directory": "packages/proby"
17
17
  },
18
18
  "dependencies": {
19
- "pema": "^0.5.0",
20
- "@rcompat/assert": "^0.8.1",
21
- "@rcompat/cli": "^0.18.1",
22
- "@rcompat/fs": "^0.28.1",
23
- "@rcompat/env": "^0.17.1",
24
- "@rcompat/io": "^0.5.1",
25
- "@rcompat/is": "^0.6.1",
26
- "@rcompat/runtime": "^0.11.1"
19
+ "@rcompat/assert": "^0.9.0",
20
+ "@rcompat/cli": "^0.19.0",
21
+ "@rcompat/env": "^0.18.0",
22
+ "@rcompat/fs": "^0.29.0",
23
+ "@rcompat/io": "^0.6.0",
24
+ "@rcompat/is": "^0.7.0",
25
+ "@rcompat/runtime": "^0.12.0"
26
+ },
27
+ "devDependencies": {
28
+ "@rcompat/type": "^0.13.0"
27
29
  },
28
30
  "peerDependencies": {
29
- "@rcompat/test": "^0.12.1"
31
+ "@rcompat/test": "^0.13.0"
30
32
  },
31
33
  "peerDependenciesMeta": {
32
34
  "@rcompat/test": {