@genesislcap/uvu-playwright-builder 14.165.3-alpha-da317ad.0 → 14.167.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;8BAEhC,YAAY;AAAvC,wBAsEE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;8BAEhC,YAAY;AAAvC,wBA2EE"}
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ const build_kit_1 = require("@genesislcap/build-kit");
6
6
  exports.default = (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
7
7
  var _a;
8
8
  const { dirs: { cwd }, cli: { isTest, options }, pkg, } = ctx;
9
- const { coverage, watch, debug, e2e, interactive, browser } = options;
9
+ const { coverage, watch, debug, e2e, interactive, browser, match, rawMatch } = options;
10
10
  if (!isTest) {
11
11
  throw new Error(`Unrecognized command: ${JSON.stringify(options)}`);
12
12
  }
@@ -31,7 +31,11 @@ exports.default = (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* (
31
31
  const debugParam = debug ? '--debug' : '';
32
32
  const watchParam = watch ? '--watch' : '';
33
33
  const covParam = coverage ? '--cov' : '';
34
- const command = `${playwrightTest} "./**/*.test.ts" --runner uvu ${debugParam} ${watchParam} ${covParam}`;
34
+ let matchParam = './**/*.test.ts';
35
+ if (match) {
36
+ matchParam = rawMatch ? match : `./**/${match}`;
37
+ }
38
+ const command = `${playwrightTest} "${matchParam}" --runner uvu ${debugParam} ${watchParam} ${covParam}`;
35
39
  (0, build_kit_1.run)(cwd, command);
36
40
  if (coverage) {
37
41
  const nyc = yield (0, build_kit_1.resolveBin)('nyc');
@@ -42,13 +46,14 @@ exports.default = (ctx) => tslib_1.__awaiter(void 0, void 0, void 0, function* (
42
46
  else {
43
47
  // node target - executing using uvu/jsdom
44
48
  const nodeArgs = debug ? '--inspect-brk' : '';
49
+ const matchParam = match ? match : 'test.ts';
45
50
  // tsm expects a relative path to config file incl. extension
46
51
  const tsmJS = (0, node_path_1.resolve)(__dirname, './config/tsm.js');
47
52
  const tsmJSRelative = (0, node_path_1.relative)(cwd, tsmJS);
48
53
  const jsdomSetupPath = (0, node_path_1.resolve)(__dirname, './config/jsdom.setup.ts');
49
54
  const uvu = yield (0, build_kit_1.resolveBin)('uvu');
50
55
  const ignore = ['dist', 'e2e', 'docs', 'temp', 'coverage']; // .git, node_modules are ignored by default
51
- const unitTestCommand = `${uvu} -r tsm --tsmconfig ${tsmJSRelative} -r @esbuild-kit/cjs-loader -r ${jsdomSetupPath} . "test.ts" ${ignore.map((i) => ' -i ' + i)}`;
56
+ const unitTestCommand = `${uvu} -r tsm --tsmconfig ${tsmJSRelative} -r @esbuild-kit/cjs-loader -r ${jsdomSetupPath} . "${matchParam}" ${ignore.map((i) => ' -i ' + i)}`;
52
57
  if (coverage) {
53
58
  const c8 = yield (0, build_kit_1.resolveBin)('c8');
54
59
  const command = `${c8} --include=src --all --reporter=text --reporter=lcov node ${unitTestCommand}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/uvu-playwright-builder",
3
3
  "description": "UVU/Playwright builder",
4
- "version": "14.165.3-alpha-da317ad.0",
4
+ "version": "14.167.0",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -15,8 +15,8 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@esbuild-kit/cjs-loader": "2.4.2",
18
- "@genesislcap/build-kit": "14.165.3-alpha-da317ad.0",
19
- "@genesislcap/foundation-testing": "14.165.3-alpha-da317ad.0",
18
+ "@genesislcap/build-kit": "14.167.0",
19
+ "@genesislcap/foundation-testing": "14.167.0",
20
20
  "c8": "^7.11.0",
21
21
  "nyc": "^15.1.0",
22
22
  "playwright-test": "^8.4.0",
@@ -37,5 +37,5 @@
37
37
  "publishConfig": {
38
38
  "access": "public"
39
39
  },
40
- "gitHead": "3201162bd7a3329e086dde7c2bec345a18f4b798"
40
+ "gitHead": "8a6557d767463d7bcb7b3ca4d209a951766481e3"
41
41
  }
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ export default async (ctx: BuildContext) => {
8
8
  cli: { isTest, options },
9
9
  pkg,
10
10
  } = ctx;
11
- const { coverage, watch, debug, e2e, interactive, browser } = options;
11
+ const { coverage, watch, debug, e2e, interactive, browser, match, rawMatch } = options;
12
12
 
13
13
  if (!isTest) {
14
14
  throw new Error(`Unrecognized command: ${JSON.stringify(options)}`);
@@ -39,7 +39,11 @@ export default async (ctx: BuildContext) => {
39
39
  const debugParam = debug ? '--debug' : '';
40
40
  const watchParam = watch ? '--watch' : '';
41
41
  const covParam = coverage ? '--cov' : '';
42
- const command = `${playwrightTest} "./**/*.test.ts" --runner uvu ${debugParam} ${watchParam} ${covParam}`;
42
+ let matchParam = './**/*.test.ts';
43
+ if (match) {
44
+ matchParam = rawMatch ? match : `./**/${match}`;
45
+ }
46
+ const command = `${playwrightTest} "${matchParam}" --runner uvu ${debugParam} ${watchParam} ${covParam}`;
43
47
  run(cwd, command);
44
48
 
45
49
  if (coverage) {
@@ -50,13 +54,14 @@ export default async (ctx: BuildContext) => {
50
54
  } else {
51
55
  // node target - executing using uvu/jsdom
52
56
  const nodeArgs = debug ? '--inspect-brk' : '';
57
+ const matchParam = match ? match : 'test.ts';
53
58
  // tsm expects a relative path to config file incl. extension
54
59
  const tsmJS = resolve(__dirname, './config/tsm.js');
55
60
  const tsmJSRelative = relative(cwd, tsmJS);
56
61
  const jsdomSetupPath = resolve(__dirname, './config/jsdom.setup.ts');
57
62
  const uvu = await resolveBin('uvu');
58
63
  const ignore = ['dist', 'e2e', 'docs', 'temp', 'coverage']; // .git, node_modules are ignored by default
59
- const unitTestCommand = `${uvu} -r tsm --tsmconfig ${tsmJSRelative} -r @esbuild-kit/cjs-loader -r ${jsdomSetupPath} . "test.ts" ${ignore.map(
64
+ const unitTestCommand = `${uvu} -r tsm --tsmconfig ${tsmJSRelative} -r @esbuild-kit/cjs-loader -r ${jsdomSetupPath} . "${matchParam}" ${ignore.map(
60
65
  (i) => ' -i ' + i,
61
66
  )}`;
62
67