qa-control 0.6.7 → 0.6.8
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/definition/definition.js +29 -0
- package/bin/qa-control.js +4 -0
- package/package.json +3 -2
|
@@ -679,6 +679,35 @@ module.exports = function(qaControl){
|
|
|
679
679
|
}
|
|
680
680
|
}]
|
|
681
681
|
},
|
|
682
|
+
qa_control_dev_dependency:{
|
|
683
|
+
checks:[{
|
|
684
|
+
warnings:function(info) {
|
|
685
|
+
var warns = [];
|
|
686
|
+
// Only check if project has qa-control section AND has gha configured (but not "skip")
|
|
687
|
+
var qaSection = info.packageJson && info.packageJson['qa-control'];
|
|
688
|
+
if(!qaSection || !qaSection.gha || qaSection.gha === 'skip') { return warns; }
|
|
689
|
+
var devDependencies = info.packageJson.devDependencies || {};
|
|
690
|
+
if(!('qa-control' in devDependencies)) {
|
|
691
|
+
warns.push({warning:'lack_of_qa_control_in_dev_dependencies', scoring:{dependencies:1}});
|
|
692
|
+
return warns;
|
|
693
|
+
}
|
|
694
|
+
var actualVersion = devDependencies['qa-control'];
|
|
695
|
+
var toolPkgPath = Path.join(__dirname, '../../package.json');
|
|
696
|
+
var toolVersion;
|
|
697
|
+
try {
|
|
698
|
+
toolVersion = fs.readJsonSync(toolPkgPath).version;
|
|
699
|
+
} catch(e) {
|
|
700
|
+
try { toolVersion = require('../../package.json').version; } catch(e2) { toolVersion = null; }
|
|
701
|
+
}
|
|
702
|
+
if(!toolVersion) { return warns; }
|
|
703
|
+
var expectedCaret = '^' + toolVersion;
|
|
704
|
+
if(actualVersion !== expectedCaret && actualVersion !== toolVersion && actualVersion !== '~' + toolVersion) {
|
|
705
|
+
warns.push({warning:'qa_control_version_mismatch_in_dev_dependencies_1_expected_2', params:[actualVersion, expectedCaret], scoring:{dependencies:1}});
|
|
706
|
+
}
|
|
707
|
+
return warns;
|
|
708
|
+
}
|
|
709
|
+
}]
|
|
710
|
+
},
|
|
682
711
|
workflows:{
|
|
683
712
|
checks:[{
|
|
684
713
|
warnings:function(info) {
|
package/bin/qa-control.js
CHANGED
|
@@ -27,6 +27,8 @@ qaControl.msgs={
|
|
|
27
27
|
en:{
|
|
28
28
|
lack_of_mandatory_section_1: 'lack of mandatory section "$1" in qa-control section of package.json',
|
|
29
29
|
repository_name_not_found: 'packageJson.repository must be in format /{[-a-zA-Z0-9_.]+}\/[-a-zA-Z0-9_.]+/',
|
|
30
|
+
lack_of_qa_control_in_dev_dependencies: 'qa-control must be in devDependencies with the same version as qa-control.package-version',
|
|
31
|
+
qa_control_version_mismatch_in_dev_dependencies_1_expected_2: 'qa-control version in devDependencies is "$1" but expected "$2"',
|
|
30
32
|
bailing_could_be_more: '--bail(ing)! There could be more issues'
|
|
31
33
|
},
|
|
32
34
|
es:{
|
|
@@ -63,6 +65,8 @@ qaControl.msgs={
|
|
|
63
65
|
non_recomended_dependency_1_in_package_json: 'Dependencia no recomendada "$1" en package.json',
|
|
64
66
|
lack_of_workflow_file_1: 'falta el archivo de workflow "$1"',
|
|
65
67
|
workflow_file_1_differs: 'el archivo de workflow "$1" difiere del template de qa-control',
|
|
68
|
+
lack_of_qa_control_in_dev_dependencies: 'qa-control debe estar en devDependencies con la misma versión que qa-control.package-version',
|
|
69
|
+
qa_control_version_mismatch_in_dev_dependencies_1_expected_2: 'La versión de qa-control en devDependencies es "$1" pero se esperaba "$2"',
|
|
66
70
|
bailing_could_be_more: '¡Qué --bail(e)! Podrían haber más problemas, correr de nuevo después de corregir estos'
|
|
67
71
|
}
|
|
68
72
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qa-control",
|
|
3
3
|
"description": "QA control of things that nobody controls",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.8",
|
|
5
5
|
"author": "Codenautas <codenautas@googlegroups.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": "codenautas/qa-control",
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"run-in": "server",
|
|
68
68
|
"stability": "extending",
|
|
69
69
|
"type": "cmd-tool",
|
|
70
|
-
"ecmaVersion": 6
|
|
70
|
+
"ecmaVersion": 6,
|
|
71
|
+
"gha": "all"
|
|
71
72
|
}
|
|
72
73
|
}
|