datagrok-tools 6.2.1 → 6.2.3

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,13 @@
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
+
7
+ ## 6.2.2 (2026-05-05)
8
+
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.
10
+
3
11
  ## 6.2.1 (2026-05-05)
4
12
 
5
13
  * Reports: `grok report attach <ticket> <file>` — upload a file as a JIRA issue attachment via REST v2 multipart POST.
@@ -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);
@@ -246,6 +246,15 @@ async function runPlaywrightTests(pkgDir, testDir, args, hostKey) {
246
246
  verboseFailed += `${r.category}: ${r.name} (${r.ms} ms) : ${r.result}\n`;
247
247
  }
248
248
  }
249
+ const csv = rowsToCsv(rows);
250
+ // Persist a Playwright-only CSV so the pipeline can ship it to the Datlas
251
+ // 'playwright' bucket, separate from the merged Puppeteer+Playwright
252
+ // test-report.csv that feeds the legacy 'package' bucket and JUnit.
253
+ try {
254
+ _fs.default.writeFileSync(_path.default.join(pkgDir, 'test-report-playwright.csv'), csv, 'utf-8');
255
+ } catch (e) {
256
+ color.warn(`Playwright: failed to write test-report-playwright.csv: ${e.message || e}`);
257
+ }
249
258
  return {
250
259
  failed: failedAmount > 0,
251
260
  passedAmount: passedAmount,
@@ -254,6 +263,6 @@ async function runPlaywrightTests(pkgDir, testDir, args, hostKey) {
254
263
  verbosePassed: verbosePassed,
255
264
  verboseFailed: verboseFailed,
256
265
  verboseSkipped: verboseSkipped,
257
- csv: rowsToCsv(rows)
266
+ csv: csv
258
267
  };
259
268
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "6.2.1",
3
+ "version": "6.2.3",
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": {