datagrok-tools 4.12.12 → 4.12.14

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,6 +1,14 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
- ## 4.12.12 (WIP)
3
+ ## 4.12.13 (2023-08-17)
4
+
5
+ ### Bug Fixes
6
+
7
+ * Datagrok API version check fix
8
+ * Check Changelog fix
9
+ * Sync --csv and --verbose flags
10
+
11
+ ## 4.12.12 (2023-08-07)
4
12
 
5
13
  ### Features
6
14
 
@@ -69,7 +69,7 @@ function runChecks(packagePath) {
69
69
  isWebpack: isWebpack,
70
70
  externals: externals
71
71
  })));
72
- if (!json.servicePackage) warnings.push.apply(warnings, (0, _toConsumableArray2["default"])(checkChangelog(packagePath, json)));
72
+ warnings.push.apply(warnings, (0, _toConsumableArray2["default"])(checkChangelog(packagePath, json)));
73
73
  if (warnings.length) {
74
74
  console.log("Checking package ".concat(_path["default"].basename(packagePath), "..."));
75
75
  warn(warnings);
@@ -374,7 +374,7 @@ function checkPackageFile(packagePath, json, options) {
374
374
  if (json.version.includes('beta') && isPublicPackage) warnings.push('File "package.json": public package cannot be beta version.');
375
375
  var api = (_json$dependencies = json.dependencies) === null || _json$dependencies === void 0 ? void 0 : _json$dependencies['datagrok-api'];
376
376
  if (api) {
377
- if (api === '../../js-api') {} else if (api === 'latest') warnings.push('File "package.json": you should specify Datagrok API version constraint.');else if (!(api.startsWith('^') || api.startsWith('>'))) warnings.push('File "package.json": Datagrok API version should contain "^" or ">" symbol, otherwise it is locked to the single Datagrok version.');
377
+ if (api === '../../js-api') {} else if (api === 'latest') warnings.push('File "package.json": you should specify Datagrok API version constraint (for example ^1.16.0, >=1.16.0).');else if (!/^(\^|>|<|~).+/.test(api)) warnings.push('File "package.json": Datagrok API version should starts with > | >= | ~ | ^ | < | <=');
378
378
  }
379
379
  var dt = (_json$devDependencies = (_json$devDependencies2 = json.devDependencies) === null || _json$devDependencies2 === void 0 ? void 0 : _json$devDependencies2['datagrok-tools']) !== null && _json$devDependencies !== void 0 ? _json$devDependencies : (_json$dependencies2 = json.dependencies) === null || _json$dependencies2 === void 0 ? void 0 : _json$dependencies2['datagrok-tools'];
380
380
  if (dt && dt !== 'latest') warnings.push('File "package.json": "datagrok-tools" dependency must be "latest" version.');
@@ -418,6 +418,7 @@ function checkPackageFile(packagePath, json, options) {
418
418
  }
419
419
  function checkChangelog(packagePath, json) {
420
420
  var _h2$0$match, _h2$, _h2$$match;
421
+ if (json.servicePackage) return [];
421
422
  var warnings = [];
422
423
  var clf;
423
424
  try {
@@ -425,18 +426,18 @@ function checkChangelog(packagePath, json) {
425
426
  encoding: 'utf-8'
426
427
  });
427
428
  } catch (e) {
428
- return ['CHANGELOG.md file does not exist'];
429
+ return ['CHANGELOG.md file does not exist\n'];
429
430
  }
430
431
  var regex = /^##[^#].*$/gm;
431
432
  var h2 = clf.match(regex);
432
- if (!h2) return ['No versions found in CHANGELOG.md'];
433
+ if (!h2) return ['No versions found in CHANGELOG.md\n'];
433
434
  regex = /^## \d+\.\d+\.\d+ \((\d{4}-\d{2}-\d{2}|WIP)\)$/;
434
435
  var _iterator7 = _createForOfIteratorHelper(h2),
435
436
  _step7;
436
437
  try {
437
438
  for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {
438
439
  var h = _step7.value;
439
- if (!regex.test(h)) warnings.push("CHANGELOG: '".concat(h, "' does not match the h2 format, expected: ## <version> (<release date> | WIP)"));
440
+ if (!regex.test(h)) warnings.push("CHANGELOG: '".concat(h, "' does not match the h2 format, expected: ## <version> (<release date> | WIP)\n"));
440
441
  }
441
442
  } catch (err) {
442
443
  _iterator7.e(err);
@@ -446,7 +447,7 @@ function checkChangelog(packagePath, json) {
446
447
  regex = /^## (\d+\.\d+\.\d+)/;
447
448
  var v1 = (_h2$0$match = h2[0].match(regex)) === null || _h2$0$match === void 0 ? void 0 : _h2$0$match[1];
448
449
  var v2 = (_h2$ = h2[1]) === null || _h2$ === void 0 ? void 0 : (_h2$$match = _h2$.match(regex)) === null || _h2$$match === void 0 ? void 0 : _h2$$match[1];
449
- if (v1 !== json.version && v2 !== json.version) warnings.push("Latest package version (".concat(json.version, ") is not in CHANGELOG"));
450
+ if (v1 !== json.version && v2 !== json.version) warnings.push("Latest package version (".concat(json.version, ") is not in CHANGELOG\n"));
450
451
  return warnings;
451
452
  }
452
453
  function warn(warnings) {
@@ -205,6 +205,8 @@ function test(args) {
205
205
  failReport += "Test result : Failed : ".concat(cTime.get(i), " : ").concat(targetPackage, ".").concat(cCat.get(i), ".").concat(cName.get(i), " : ").concat(cMessage.get(i), "\n");
206
206
  }
207
207
  }
208
+ // if (!options.verbose)
209
+ // df.rows.removeWhere((r: any) => r.get('success'));
208
210
  var csv = df.toCsv();
209
211
  resolve({
210
212
  failReport: failReport,
@@ -261,6 +263,7 @@ function test(args) {
261
263
  _context3.next = 12;
262
264
  return runTest(7200000, {
263
265
  category: args.category,
266
+ verbose: args.verbose,
264
267
  catchUnhandled: args.catchUnhandled,
265
268
  report: args.report,
266
269
  record: args.record
@@ -189,7 +189,7 @@ exports.queryExtension = queryExtension;
189
189
  var scriptExtensions = ['.jl', '.m', '.py', '.R'];
190
190
  exports.scriptExtensions = scriptExtensions;
191
191
  function checkScriptLocation(filepath) {
192
- if (!(filepath.startsWith('scripts/') || filepath.startsWith('projects/')) && scriptExtensions.some(function (ext) {
192
+ if (!(filepath.startsWith('scripts/') || filepath.startsWith('projects/') || filepath.startsWith('dockerfiles/')) && scriptExtensions.some(function (ext) {
193
193
  return filepath.endsWith(ext);
194
194
  })) {
195
195
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.12.12",
3
+ "version": "4.12.14",
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": {