datagrok-tools 4.14.15 → 4.14.17
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/bin/commands/check.js +2 -3
- package/package.json +1 -1
package/bin/commands/check.js
CHANGED
|
@@ -25,7 +25,6 @@ const forbiddenNames = ['function', 'class', 'export'];
|
|
|
25
25
|
const namesInFiles = new Map();
|
|
26
26
|
function check(args) {
|
|
27
27
|
const nOptions = Object.keys(args).length - 1;
|
|
28
|
-
if (args['_'].length !== 1 || nOptions > 2) return false;
|
|
29
28
|
const curDir = process.cwd();
|
|
30
29
|
if (args.recursive) return runChecksRec(curDir, args.soft ?? false);else {
|
|
31
30
|
if (!utils.isPackageDir(curDir)) {
|
|
@@ -39,7 +38,7 @@ function runChecks(packagePath, soft = false) {
|
|
|
39
38
|
const files = _ignoreWalk.default.sync({
|
|
40
39
|
path: packagePath,
|
|
41
40
|
ignoreFiles: ['.npmignore', '.gitignore']
|
|
42
|
-
});
|
|
41
|
+
}).filter(e => !e.includes('node_modules'));
|
|
43
42
|
const jsTsFiles = files.filter(f => !f.startsWith('dist/') && (f.endsWith('.js') || f.endsWith('.ts') || f.endsWith('.sql') || f.endsWith('.py')));
|
|
44
43
|
const packageFiles = ['src/package.ts', 'src/detectors.ts', 'src/package.js', 'src/detectors.js', 'src/package-test.ts', 'src/package-test.js', 'package.js', 'detectors.js'];
|
|
45
44
|
// const funcFiles = jsTsFiles.filter((f) => packageFiles.includes(f));
|
|
@@ -467,7 +466,7 @@ function checkSourceMap(packagePath) {
|
|
|
467
466
|
}
|
|
468
467
|
function checkNpmIgnore(packagePath) {
|
|
469
468
|
const warnings = [];
|
|
470
|
-
if (_path.default.join(...[packagePath, '.npmignore'])) {
|
|
469
|
+
if (_fs.default.existsSync(_path.default.join(...[packagePath, '.npmignore']))) {
|
|
471
470
|
const npmIgnoreContent = _fs.default.readFileSync(_path.default.join(...[packagePath, '.npmignore']), {
|
|
472
471
|
encoding: 'utf-8'
|
|
473
472
|
});
|
package/package.json
CHANGED