datagrok-tools 4.14.15 → 4.14.16
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 -2
- 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)) {
|
|
@@ -40,6 +39,7 @@ function runChecks(packagePath, soft = false) {
|
|
|
40
39
|
path: packagePath,
|
|
41
40
|
ignoreFiles: ['.npmignore', '.gitignore']
|
|
42
41
|
});
|
|
42
|
+
console.log(files.filter(e => e.includes('node_modules')));
|
|
43
43
|
const jsTsFiles = files.filter(f => !f.startsWith('dist/') && (f.endsWith('.js') || f.endsWith('.ts') || f.endsWith('.sql') || f.endsWith('.py')));
|
|
44
44
|
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
45
|
// const funcFiles = jsTsFiles.filter((f) => packageFiles.includes(f));
|
|
@@ -467,7 +467,7 @@ function checkSourceMap(packagePath) {
|
|
|
467
467
|
}
|
|
468
468
|
function checkNpmIgnore(packagePath) {
|
|
469
469
|
const warnings = [];
|
|
470
|
-
if (_path.default.join(...[packagePath, '.npmignore'])) {
|
|
470
|
+
if (_fs.default.existsSync(_path.default.join(...[packagePath, '.npmignore']))) {
|
|
471
471
|
const npmIgnoreContent = _fs.default.readFileSync(_path.default.join(...[packagePath, '.npmignore']), {
|
|
472
472
|
encoding: 'utf-8'
|
|
473
473
|
});
|
package/package.json
CHANGED