datagrok-tools 4.13.0 → 4.13.2
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 +7 -0
- package/bin/commands/check.js +20 -0
- package/bin/commands/test.js +2 -2
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/bin/commands/check.js
CHANGED
|
@@ -10,6 +10,7 @@ exports.checkChangelog = checkChangelog;
|
|
|
10
10
|
exports.checkFuncSignatures = checkFuncSignatures;
|
|
11
11
|
exports.checkImportStatements = checkImportStatements;
|
|
12
12
|
exports.checkPackageFile = checkPackageFile;
|
|
13
|
+
exports.checkSourceMap = checkSourceMap;
|
|
13
14
|
exports.extractExternals = extractExternals;
|
|
14
15
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
16
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
@@ -64,6 +65,7 @@ function runChecks(packagePath) {
|
|
|
64
65
|
externals = extractExternals(content);
|
|
65
66
|
if (externals) warnings.push.apply(warnings, (0, _toConsumableArray2["default"])(checkImportStatements(packagePath, jsTsFiles, externals)));
|
|
66
67
|
}
|
|
68
|
+
checkSourceMap(packagePath);
|
|
67
69
|
warnings.push.apply(warnings, (0, _toConsumableArray2["default"])(checkFuncSignatures(packagePath, funcFiles)));
|
|
68
70
|
warnings.push.apply(warnings, (0, _toConsumableArray2["default"])(checkPackageFile(packagePath, json, {
|
|
69
71
|
isWebpack: isWebpack,
|
|
@@ -491,6 +493,24 @@ function checkChangelog(packagePath, json) {
|
|
|
491
493
|
if (warnings.length) warnings.push('Changelog guideline: https://datagrok.ai/help/develop/dev-process/changelog-policy#changelog-guideline');
|
|
492
494
|
return warnings;
|
|
493
495
|
}
|
|
496
|
+
function checkSourceMap(packagePath) {
|
|
497
|
+
var warnings = [];
|
|
498
|
+
var tsconfigFilePath = _path["default"].join(packagePath, 'tsconfig.json');
|
|
499
|
+
var configJson = _fs["default"].readFileSync(tsconfigFilePath, {
|
|
500
|
+
encoding: 'utf-8'
|
|
501
|
+
}); // cant convert to json because file contains comments
|
|
502
|
+
|
|
503
|
+
if (!new RegExp('"sourceMap"\\s*:\\s*true').test(configJson)) warnings.push('ts config doesnt contain source map');
|
|
504
|
+
var webpackconfigFilePath = _path["default"].join(packagePath, 'webpack.config.js');
|
|
505
|
+
var webpackconfigJson = _fs["default"].readFileSync(webpackconfigFilePath, {
|
|
506
|
+
encoding: 'utf-8'
|
|
507
|
+
}); // cant convert to json because file contains comments
|
|
508
|
+
|
|
509
|
+
if (!new RegExp("devtools*:s*'source-map'").test(webpackconfigJson)) warnings.push('webpack config doesnt contain source map');
|
|
510
|
+
if (!_fs["default"].existsSync(packagePath + 'dist\\package.js')) warnings.push('dist\\package.js file doesnt exists');
|
|
511
|
+
if (!_fs["default"].existsSync(packagePath + 'dist\\package-test.js')) warnings.push('dist\\package-test.js file doesnt exists');
|
|
512
|
+
return warnings;
|
|
513
|
+
}
|
|
494
514
|
function warn(warnings) {
|
|
495
515
|
warnings.forEach(function (w) {
|
|
496
516
|
return color.warn(w);
|
package/bin/commands/test.js
CHANGED
|
@@ -62,7 +62,7 @@ function test(args) {
|
|
|
62
62
|
encoding: 'utf-8'
|
|
63
63
|
}));
|
|
64
64
|
if (packageData.name) {
|
|
65
|
-
process.env.TARGET_PACKAGE = utils.kebabToCamelCase(packageData.name);
|
|
65
|
+
process.env.TARGET_PACKAGE = utils.kebabToCamelCase(utils.removeScope(packageData.name));
|
|
66
66
|
} else {
|
|
67
67
|
color.error('Invalid package name. Set the `name` field in `package.json`');
|
|
68
68
|
return false;
|
|
@@ -114,7 +114,7 @@ function test(args) {
|
|
|
114
114
|
}
|
|
115
115
|
function test() {
|
|
116
116
|
color.info('Starting tests...');
|
|
117
|
-
var P_START_TIMEOUT =
|
|
117
|
+
var P_START_TIMEOUT = 900000;
|
|
118
118
|
var browser;
|
|
119
119
|
var page;
|
|
120
120
|
var recorder;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "datagrok-tools",
|
|
3
|
-
"version": "4.13.
|
|
3
|
+
"version": "4.13.2",
|
|
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": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"node-recursive-directory": "^1.2.0",
|
|
19
19
|
"os": "^0.1.2",
|
|
20
20
|
"path": "^0.12.7",
|
|
21
|
-
"puppeteer": "^22.
|
|
22
|
-
"puppeteer-screen-recorder": "^
|
|
21
|
+
"puppeteer": "^22.10.0",
|
|
22
|
+
"puppeteer-screen-recorder": "^3.0.3"
|
|
23
23
|
},
|
|
24
24
|
"scripts": {
|
|
25
25
|
"link": "npm link",
|