datagrok-tools 6.2.2 → 6.2.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
+ ## 6.2.3 (2026-05-06)
4
+
5
+ * `grok test` — added `--skip-puppeteer` flag (symmetric counterpart of `--skip-playwright`). Bypasses `loadPackages()` and the Puppeteer/`DG.Test` runner so Playwright-only test directories (e.g. `public/playwright-public`) can run end-to-end via `grok test --skip-puppeteer` without tripping the Dart/JS package loader.
6
+
3
7
  ## 6.2.2 (2026-05-05)
4
8
 
5
9
  * `grok test` — Playwright runner now writes `test-report-playwright.csv` next to the existing merged `test-report.csv`, so CI can ship Playwright rows to a dedicated Datlas reporting bucket without disturbing the legacy `package` flow.
@@ -205,6 +205,8 @@ Options:
205
205
  --report Report failed tests to audit, notifies package author (default=false)
206
206
  --skip-build Skip the package build step
207
207
  --skip-publish Skip the package publication step
208
+ --skip-puppeteer Skip the Puppeteer/DG.Test pass; only run Playwright (for playwright-only test directories)
209
+ --skip-playwright Skip the Playwright pass; only run Puppeteer/DG.Test
208
210
  --link Link the package to local utils
209
211
  --record Records the test execution process in mp4 format
210
212
  --platform Runs only platform tests (applicable for ApiTests package only)
@@ -26,7 +26,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
26
26
  const execAsync = (0, _util.promisify)(_child_process.exec);
27
27
  const execFileAsync = (0, _util.promisify)(_child_process.execFile);
28
28
  const testInvocationTimeout = 3600000;
29
- const availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag', 'ci-cd', 'debug', 'no-retry', 'dartium', 'f', 'params', 'logfailed', 'skip-playwright'];
29
+ const availableCommandOptions = ['host', 'package', 'csv', 'gui', 'catchUnhandled', 'platform', 'core', 'report', 'skip-build', 'skip-publish', 'path', 'record', 'verbose', 'benchmark', 'category', 'test', 'stress-test', 'link', 'tag', 'ci-cd', 'debug', 'no-retry', 'dartium', 'f', 'params', 'logfailed', 'skip-playwright', 'skip-puppeteer'];
30
30
  const curDir = process.cwd();
31
31
 
32
32
  /** Expands camelCase to space-separated lowercase: "dataManipulation" → "data manipulation" */
@@ -216,7 +216,7 @@ async function test(args) {
216
216
  // if (args.core && packageName !== 'DevTools')
217
217
  // color.warn('--core flag can only be used in the DevTools package');
218
218
 
219
- if (!args.package) {
219
+ if (!args.package && !args['skip-puppeteer']) {
220
220
  try {
221
221
  await testUtils.loadPackages(packagesDir, packageName, args.host, args['skip-publish'], args['skip-build'], args.link);
222
222
  } catch (e) {
@@ -226,24 +226,41 @@ async function test(args) {
226
226
  }
227
227
  process.env.TARGET_PACKAGE = packageName;
228
228
  let res;
229
- try {
230
- res = await runTesting(args);
231
- } catch (e) {
232
- // Don't let Puppeteer-side failures (login error, browser crash) skip the
233
- // Playwright pass the two suites have independent auth and runtime paths,
234
- // and we want at least one half of the run reported.
235
- color.error(`Puppeteer pass failed: ${e?.message || e}`);
229
+ if (args['skip-puppeteer']) {
230
+ // Playwright-only mode: skip the Puppeteer browser launch + DG.Test runner.
231
+ // Used by Playwright-only test directories (e.g. public/playwright-public)
232
+ // that have a `playwrightTests` field in package.json but no Dart/JS package
233
+ // tests on the server.
236
234
  res = {
237
- failed: true,
235
+ failed: false,
238
236
  verbosePassed: '',
239
237
  verboseSkipped: '',
240
- verboseFailed: `Puppeteer pass failed: ${e?.message || e}\n`,
238
+ verboseFailed: '',
241
239
  passedAmount: 0,
242
240
  skippedAmount: 0,
243
- failedAmount: 1,
244
- csv: '',
245
- error: String(e?.message || e)
241
+ failedAmount: 0,
242
+ csv: ''
246
243
  };
244
+ } else {
245
+ try {
246
+ res = await runTesting(args);
247
+ } catch (e) {
248
+ // Don't let Puppeteer-side failures (login error, browser crash) skip the
249
+ // Playwright pass — the two suites have independent auth and runtime paths,
250
+ // and we want at least one half of the run reported.
251
+ color.error(`Puppeteer pass failed: ${e?.message || e}`);
252
+ res = {
253
+ failed: true,
254
+ verbosePassed: '',
255
+ verboseSkipped: '',
256
+ verboseFailed: `Puppeteer pass failed: ${e?.message || e}\n`,
257
+ passedAmount: 0,
258
+ skippedAmount: 0,
259
+ failedAmount: 1,
260
+ csv: '',
261
+ error: String(e?.message || e)
262
+ };
263
+ }
247
264
  }
248
265
  if (!args['skip-playwright']) {
249
266
  const ptDir = playwrightRunner.hasPlaywrightTests(curDir);
@@ -43,7 +43,7 @@
43
43
  // "noPropertyAccessFromIndexSignature": true, /* Require undeclared properties from index signatures to use element accesses. */
44
44
 
45
45
  /* Module Resolution Options */
46
- "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ "moduleResolution": "bundler", /* Specify how TypeScript looks up a file from a given module specifier. Use 'bundler' for webpack/rollup/etc. */
47
47
  // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
48
48
  // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
49
49
  // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "6.2.2",
3
+ "version": "6.2.4",
4
4
  "description": "Utility to upload and publish packages to Datagrok",
5
5
  "homepage": "https://github.com/datagrok-ai/public/tree/master/tools#readme",
6
6
  "dependencies": {