virmator 6.4.3 → 6.5.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.
@@ -51,10 +51,15 @@ function createScreenshotsPlugin(extraOptions, repoDir) {
51
51
  ];
52
52
  }
53
53
 
54
+ export function createPlaywrightBrowserContextWithTimezoneId({browser, timezoneId = 'GMT'}) {
55
+ return browser.newContext({timezoneId});
56
+ }
57
+
54
58
  export function getWebTestRunnerConfigWithCoveragePercent({
55
59
  coveragePercent = 0,
56
60
  packageRootDirPath = '',
57
61
  extraScreenshotOptions,
62
+ timezoneId = 'GMT',
58
63
  }) {
59
64
  /** @type {import('@web/test-runner').TestRunnerConfig} */
60
65
  const webTestRunnerConfig = {
@@ -62,14 +67,26 @@ export function getWebTestRunnerConfigWithCoveragePercent({
62
67
  ...(process.argv.includes('--only-one-browser')
63
68
  ? []
64
69
  : [
65
- playwrightLauncher({product: 'chromium'}),
66
- playwrightLauncher({product: 'firefox'}),
70
+ playwrightLauncher({
71
+ product: 'chromium',
72
+ createPlaywrightBrowserContext: (browser) =>
73
+ createPlaywrightBrowserContextWithTimezoneId({browser, timezoneId}),
74
+ }),
75
+ playwrightLauncher({
76
+ product: 'firefox',
77
+ createPlaywrightBrowserContext: (browser) =>
78
+ createPlaywrightBrowserContextWithTimezoneId({browser, timezoneId}),
79
+ }),
67
80
  ]),
68
- playwrightLauncher({product: 'webkit'}),
81
+ playwrightLauncher({
82
+ product: 'webkit',
83
+ createPlaywrightBrowserContext: (browser) =>
84
+ createPlaywrightBrowserContextWithTimezoneId({browser, timezoneId}),
85
+ }),
69
86
  ],
70
87
  reporters: [
71
- defaultReporter({reportTestResults: true, reportTestProgress: false}),
72
88
  summaryReporter(),
89
+ defaultReporter({reportTestResults: true, reportTestProgress: false}),
73
90
  ],
74
91
  browserStartTimeout: minutesTwenty,
75
92
  concurrentBrowsers: 3,
@@ -11,7 +11,7 @@
11
11
  "publish": "virmator publish \"npm run compile && npm run test:all\"",
12
12
  "start": "npm install && virmator frontend",
13
13
  "test": "virmator test",
14
- "test:all": "npm run test:types && npm run test:coverage && npm run test:spelling && npm run test:format && npm run test:docs",
14
+ "test:all": "concurrently --kill-others-on-fail \"npm run test:types\" \"npm run test:coverage\" \"npm run test:spelling\" \"npm run test:format\" \"npm run test:docs\"",
15
15
  "test:coverage": "npm run test coverage",
16
16
  "test:docs": "virmator code-in-markdown check",
17
17
  "test:format": "virmator format check",
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createVirmator = void 0;
4
+ const common_1 = require("@augment-vir/common");
4
5
  const command_configs_1 = require("./command/command-configs");
5
6
  const command_mapping_1 = require("./command/command-mapping");
6
7
  const command_to_help_message_1 = require("./command/command-to-help-message");
@@ -37,6 +38,9 @@ function createVirmator(inputs) {
37
38
  if (process.env.INCLUDE_VIRMATOR_STACK_TRACE) {
38
39
  console.error(error);
39
40
  }
41
+ else {
42
+ console.error((0, common_1.extractErrorMessage)(error));
43
+ }
40
44
  process.exit(1);
41
45
  }
42
46
  }
@@ -48,7 +48,6 @@ async function runExtendedVirmator({ allArgs, allConfigs, commandMapping, packag
48
48
  console.info(resultMessage);
49
49
  }
50
50
  else {
51
- console.error(resultMessage);
52
51
  throw new Error(resultMessage);
53
52
  }
54
53
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "virmator",
3
- "version": "6.4.3",
3
+ "version": "6.5.0",
4
4
  "description": "Handle common package configs, commands, and dependencies.",
5
5
  "keywords": [
6
6
  "automation",
@@ -36,47 +36,48 @@
36
36
  "format:base": "prettier \"./**/*.+(ts|json|html|css|md|js)\"",
37
37
  "publish": "virmator publish \"npm run test:all\"",
38
38
  "test": "npm run compile && test-as-package mocha --config mocha.config.js",
39
- "test:all": "npm ci && npm run compile && npm run test && npm ci && npm run test:spelling -- --no-progress && npm run test:format && npm run docs:check",
39
+ "test:all": "npm ci && concurrently --kill-others-on-fail \"npm run compile && npm run test\" \"npm run test:spelling -- --no-progress\" \"npm run test:format\" \"npm run docs:check\"",
40
40
  "test:format": "npm run format:base -- --check",
41
41
  "test:help": "ts-node src/cli/cli.ts --help",
42
42
  "test:spelling": "cspell \"{*,.*,**/{.*,*}/**/{.*,*}}\" --exclude \"test-files/spellcheck/invalid-spellcheck-repo/**/*\" --exclude \"extender-configs\"",
43
43
  "test:types": "tsc --noEmit"
44
44
  },
45
45
  "dependencies": {
46
- "@augment-vir/common": "^13.2.4",
47
- "@augment-vir/node-js": "^13.2.4",
46
+ "@augment-vir/common": "^13.3.0",
47
+ "@augment-vir/node-js": "^13.3.0",
48
48
  "ansi-colors": "^4.1.3",
49
+ "concurrently": "^8.0.1",
49
50
  "glob": "^8.1.0",
50
51
  "glob-promise": "^6.0.2",
51
- "semver": "^7.4.0",
52
- "simple-git": "^3.17.0",
53
- "type-fest": "^3.8.0"
52
+ "semver": "^7.5.0",
53
+ "simple-git": "^3.18.0",
54
+ "type-fest": "^3.9.0"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@electrovir/nyc": "15.1.0-fix0",
57
58
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
58
59
  "@open-wc/testing": "^3.1.8",
59
- "@types/chai": "^4.3.4",
60
+ "@types/chai": "^4.3.5",
60
61
  "@types/fs-extra": "^11.0.1",
61
62
  "@types/glob": "^8.1.0",
62
63
  "@types/mocha": "^10.0.1",
63
- "@types/node": "^18.15.11",
64
+ "@types/node": "^18.16.3",
64
65
  "@types/semver": "^7.3.13",
65
- "@web/dev-server-esbuild": "^0.3.6",
66
- "@web/test-runner": "^0.15.3",
67
- "@web/test-runner-commands": "^0.6.6",
68
- "@web/test-runner-playwright": "^0.9.0",
69
- "@web/test-runner-visual-regression": "^0.7.1",
66
+ "@web/dev-server-esbuild": "^0.4.1",
67
+ "@web/test-runner": "^0.16.1",
68
+ "@web/test-runner-commands": "^0.7.0",
69
+ "@web/test-runner-playwright": "^0.10.0",
70
+ "@web/test-runner-visual-regression": "^0.8.0",
70
71
  "chai": "^4.3.7",
71
72
  "cspell": "^6.31.1",
72
- "esbuild": "^0.17.17",
73
+ "esbuild": "^0.17.18",
73
74
  "fs-extra": "^11.1.1",
74
75
  "istanbul-smart-text-reporter": "^1.1.1",
75
76
  "markdown-code-example-inserter": "^0.3.0",
76
77
  "mocha": "^10.2.0",
77
78
  "mocha-spec-reporter-with-file-names": "^0.0.3",
78
- "npm-check-updates": "^16.10.8",
79
- "prettier": "^2.8.7",
79
+ "npm-check-updates": "^16.10.9",
80
+ "prettier": "^2.8.8",
80
81
  "prettier-plugin-interpolated-html-tags": "^0.0.3",
81
82
  "prettier-plugin-jsdoc": "^0.4.2",
82
83
  "prettier-plugin-multiline-arrays": "^1.1.3",
@@ -89,8 +90,8 @@
89
90
  "ts-node": "^10.9.1",
90
91
  "tsconfig-paths": "^4.2.0",
91
92
  "typescript": "^5.0.4",
92
- "virmator": "^6.4.2",
93
- "vite": "^4.2.1",
93
+ "virmator": "^6.4.4",
94
+ "vite": "^4.3.3",
94
95
  "vite-tsconfig-paths": "^4.2.0"
95
96
  },
96
97
  "engines": {