proby 0.18.0 → 0.19.1

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
@@ -3,6 +3,7 @@ export type Config = {
3
3
  monorepo: boolean;
4
4
  packages: string;
5
5
  include: string[];
6
+ loaders: string[];
6
7
  };
7
8
  declare const _default: {
8
9
  parse(input?: Dict): Config;
package/lib/Schema.js CHANGED
@@ -3,6 +3,7 @@ const defaults = {
3
3
  monorepo: false,
4
4
  packages: "packages",
5
5
  include: ["src", "test"],
6
+ loaders: [],
6
7
  };
7
8
  export default {
8
9
  parse(input = {}) {
@@ -12,6 +13,9 @@ export default {
12
13
  include: is.array(input.include) && input.include.every(is.string)
13
14
  ? input.include
14
15
  : defaults.include,
16
+ loaders: is.array(input.loaders) && input.loaders.every(is.string)
17
+ ? input.loaders
18
+ : defaults.loaders,
15
19
  };
16
20
  },
17
21
  };
package/lib/bin.js CHANGED
@@ -12,15 +12,19 @@ const user_config = await ts_config_file.exists()
12
12
  : await js_config_file.exists()
13
13
  ? (await js_config_file.import("default"))
14
14
  : {};
15
- const { include, packages, monorepo } = Schema.parse(user_config);
15
+ const { include, packages, monorepo, loaders } = Schema.parse(user_config);
16
16
  const conditions = await runtime.conditions(root);
17
17
  const conditions_flags = conditions
18
18
  .map(c => ` --conditions="${c}"`)
19
19
  .join("");
20
20
  const script = runtime.script;
21
21
  const args = runtime.args.join(" ");
22
+ const loaders_flags = loaders
23
+ .map(l => ` --import="${root.join(l).path}"`)
24
+ .join("");
25
+ const flags = `${conditions_flags}${loaders_flags}`;
22
26
  if (!is.defined(env.try("PROBY_RELAUNCHED"))) {
23
- await io.spawn(`${runtime.bin}${conditions_flags} ${script} ${args}`, {
27
+ await io.spawn(`${runtime.bin}${flags} ${script} ${args}`, {
24
28
  inherit: true,
25
29
  env: { ...process.env, PROBY_RELAUNCHED: "1" },
26
30
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "proby",
3
- "version": "0.18.0",
3
+ "version": "0.19.1",
4
4
  "description": "Standard library test runner",
5
5
  "bugs": "https://github.com/rcompat/rcompat/issues",
6
6
  "license": "MIT",
@@ -9,26 +9,25 @@
9
9
  "/lib/**/*.d.ts",
10
10
  "!/**/*.spec.*"
11
11
  ],
12
- "bin": "lib/bin.js",
13
12
  "repository": {
14
13
  "type": "git",
15
14
  "url": "https://github.com/rcompat/rcompat",
16
15
  "directory": "packages/proby"
17
16
  },
18
17
  "dependencies": {
19
- "@rcompat/cli": "^0.23.0",
20
- "@rcompat/env": "^0.21.0",
21
- "@rcompat/assert": "^0.12.0",
22
- "@rcompat/is": "^0.10.1",
23
- "@rcompat/fs": "^0.32.0",
24
- "@rcompat/io": "^0.9.0",
25
- "@rcompat/runtime": "^0.15.0"
18
+ "@rcompat/assert": "^0.13.0",
19
+ "@rcompat/cli": "^0.24.0",
20
+ "@rcompat/env": "^0.22.1",
21
+ "@rcompat/fs": "^0.33.2",
22
+ "@rcompat/io": "^0.10.0",
23
+ "@rcompat/runtime": "^0.16.0",
24
+ "@rcompat/is": "^0.11.0"
26
25
  },
27
26
  "devDependencies": {
28
- "@rcompat/type": "^0.16.0"
27
+ "@rcompat/type": "^0.17.0"
29
28
  },
30
29
  "peerDependencies": {
31
- "@rcompat/test": "^0.16.0"
30
+ "@rcompat/test": "^0.17.0"
32
31
  },
33
32
  "peerDependenciesMeta": {
34
33
  "@rcompat/test": {
@@ -49,8 +48,12 @@
49
48
  }
50
49
  },
51
50
  "scripts": {
52
- "build": "npm run clean && tsc",
51
+ "build": "npm run clean && tsgo",
53
52
  "clean": "rm -rf ./lib",
53
+ "lint": "eslint .",
54
54
  "test": "npx proby"
55
+ },
56
+ "bin": {
57
+ "proby": "lib/bin.js"
55
58
  }
56
59
  }