datagrok-tools 4.14.9 → 4.14.10

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,12 @@
1
1
  # Datagrok-tools changelog
2
2
 
3
+ ## 4.14.10 (2025-06-08)
4
+
5
+ ### Features
6
+
7
+ * Grok Check checks update
8
+
9
+
3
10
  ## 4.14.9 (2025-06-06)
4
11
 
5
12
  ### Features
@@ -64,7 +64,9 @@ function runChecks(packagePath, soft = false) {
64
64
  errors.push(...checkSourceMap(packagePath));
65
65
  errors.push(...checkNpmIgnore(packagePath));
66
66
  warnings.push(...checkScriptNames(packagePath));
67
- errors.push(...checkFuncSignatures(packagePath, jsTsFiles));
67
+ const [signatureWarnings, signatureErrors] = checkFuncSignatures(packagePath, jsTsFiles);
68
+ warnings.push(...signatureWarnings);
69
+ errors.push(...signatureErrors);
68
70
  errors.push(...checkPackageFile(packagePath, json, {
69
71
  isWebpack,
70
72
  externals,
@@ -145,6 +147,7 @@ function checkImportStatements(packagePath, files, externals) {
145
147
  }
146
148
  function checkFuncSignatures(packagePath, files) {
147
149
  const warnings = [];
150
+ const errors = [];
148
151
  const checkFunctions = {
149
152
  app: ({
150
153
  name
@@ -317,19 +320,19 @@ function checkFuncSignatures(packagePath, files) {
317
320
  }
318
321
  }
319
322
  let wrongInputNames = f.inputs.filter(e => forbiddenNames.includes(e?.name ?? ''));
320
- if (f.name) {
323
+ if (f.name && f.name !== 'postprocess') {
321
324
  if (namesInFiles.has(f.name)) namesInFiles.get(f.name)?.push(file);else namesInFiles.set(f.name, [file]);
322
325
  }
323
- if (wrongInputNames.length > 0) warnings.push(`File ${file}, function ${f.name}: Wrong input names: (${wrongInputNames.map(e => e.name).join(', ')})`);
324
- if (f.isInvalidateOnWithoutCache) warnings.push(`File ${file}, function ${f.name}: Can't use invalidateOn without cache, please follow this example: 'meta.cache.invalidateOn'`);
325
- if (f.cache) if (!utils.cacheValues.includes(f.cache)) warnings.push(`File ${file}, function ${f.name}: unsupposed variable for cache : ${f.cache}`);
326
- if (f.invalidateOn) if (!utils.isValidCron(f.invalidateOn)) warnings.push(`File ${file}, function ${f.name}: unsupposed variable for invalidateOn : ${f.invalidateOn}`);
326
+ if (wrongInputNames.length > 0) errors.push(`File ${file}, function ${f.name}: Wrong input names: (${wrongInputNames.map(e => e.name).join(', ')})`);
327
+ if (f.isInvalidateOnWithoutCache) errors.push(`File ${file}, function ${f.name}: Can't use invalidateOn without cache, please follow this example: 'meta.cache.invalidateOn'`);
328
+ if (f.cache) if (!utils.cacheValues.includes(f.cache)) errors.push(`File ${file}, function ${f.name}: unsupposed variable for cache : ${f.cache}`);
329
+ if (f.invalidateOn) if (!utils.isValidCron(f.invalidateOn)) errors.push(`File ${file}, function ${f.name}: unsupposed variable for invalidateOn : ${f.invalidateOn}`);
327
330
  }
328
331
  }
329
332
  for (const [name, files] of namesInFiles) {
330
- if (files.length > 1) warnings.push(`Duplicate names ('${name}'): \n ${files.join('\n ')}`);
333
+ if (files.length > 1) errors.push(`Duplicate names ('${name}'): \n ${files.join('\n ')}`);
331
334
  }
332
- return warnings;
335
+ return [warnings, errors];
333
336
  }
334
337
  const sharedLibExternals = {
335
338
  'common/html2canvas.min.js': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "datagrok-tools",
3
- "version": "4.14.9",
3
+ "version": "4.14.10",
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": {