@featurevisor/core 1.7.2 → 1.8.0
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/.eslintcache +1 -1
- package/CHANGELOG.md +22 -0
- package/coverage/clover.xml +2 -2
- package/coverage/lcov-report/index.html +1 -1
- package/coverage/lcov-report/lib/builder/allocator.js.html +1 -1
- package/coverage/lcov-report/lib/builder/index.html +1 -1
- package/coverage/lcov-report/lib/builder/traffic.js.html +1 -1
- package/coverage/lcov-report/lib/tester/checkIfObjectsAreEqual.js.html +1 -1
- package/coverage/lcov-report/lib/tester/index.html +1 -1
- package/coverage/lcov-report/lib/tester/matrix.js.html +1 -1
- package/coverage/lcov-report/src/builder/allocator.ts.html +1 -1
- package/coverage/lcov-report/src/builder/index.html +1 -1
- package/coverage/lcov-report/src/builder/traffic.ts.html +1 -1
- package/coverage/lcov-report/src/tester/checkIfObjectsAreEqual.ts.html +1 -1
- package/coverage/lcov-report/src/tester/index.html +1 -1
- package/coverage/lcov-report/src/tester/matrix.ts.html +1 -1
- package/lib/linter/lintProject.js +37 -0
- package/lib/linter/lintProject.js.map +1 -1
- package/lib/tester/testFeature.d.ts +3 -1
- package/lib/tester/testFeature.js +16 -9
- package/lib/tester/testFeature.js.map +1 -1
- package/lib/tester/testProject.d.ts +6 -1
- package/lib/tester/testProject.js +43 -18
- package/lib/tester/testProject.js.map +1 -1
- package/package.json +2 -2
- package/src/linter/lintProject.ts +45 -0
- package/src/tester/testFeature.ts +10 -6
- package/src/tester/testProject.ts +44 -3
package/.eslintcache
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"58"},{"size":3214,"mtime":1708539864012,"results":"59","hashOfConfig":"60"},{"size":1014,"mtime":1708539864012,"results":"61","hashOfConfig":"60"},{"size":9170,"mtime":1708539864012,"results":"62","hashOfConfig":"60"},{"size":2410,"mtime":1708539864012,"results":"63","hashOfConfig":"60"},{"size":1755,"mtime":1708539864012,"results":"64","hashOfConfig":"60"},{"size":65,"mtime":1708539864012,"results":"65","hashOfConfig":"60"},{"size":12889,"mtime":1708539864012,"results":"66","hashOfConfig":"60"},{"size":5052,"mtime":1708539864012,"results":"67","hashOfConfig":"60"},{"size":60,"mtime":1708539864012,"results":"68","hashOfConfig":"60"},{"size":1035,"mtime":1708539864012,"results":"69","hashOfConfig":"60"},{"size":3464,"mtime":1708539864012,"results":"70","hashOfConfig":"60"},{"size":1305,"mtime":1708539864012,"results":"71","hashOfConfig":"60"},{"size":5028,"mtime":1708539864012,"results":"72","hashOfConfig":"60"},{"size":9261,"mtime":1708539864012,"results":"73","hashOfConfig":"60"},{"size":94,"mtime":1708539864012,"results":"74","hashOfConfig":"60"},{"size":279,"mtime":1708539864012,"results":"75","hashOfConfig":"60"},{"size":1033,"mtime":1708539864012,"results":"76","hashOfConfig":"60"},{"size":540,"mtime":1708539864012,"results":"77","hashOfConfig":"60"},{"size":1476,"mtime":1708539864012,"results":"78","hashOfConfig":"60"},{"size":6250,"mtime":1708539864012,"results":"79","hashOfConfig":"60"},{"size":318,"mtime":1708539864012,"results":"80","hashOfConfig":"60"},{"size":1308,"mtime":1708539864012,"results":"81","hashOfConfig":"60"},{"size":359,"mtime":1708539864012,"results":"82","hashOfConfig":"60"},{"size":1119,"mtime":1708539864012,"results":"83","hashOfConfig":"60"},{"size":1464,"mtime":1708539864012,"results":"84","hashOfConfig":"60"},{"size":4007,"mtime":1708539864012,"results":"85","hashOfConfig":"60"},{"size":7758,"mtime":1708539864012,"results":"86","hashOfConfig":"60"},{"size":1221,"mtime":1708539864012,"results":"87","hashOfConfig":"60"},{"size":31,"mtime":1708539864012,"results":"88","hashOfConfig":"60"},{"size":8340,"mtime":1708539864012,"results":"89","hashOfConfig":"60"},{"size":982,"mtime":1708539864012,"results":"90","hashOfConfig":"60"},{"size":364,"mtime":1708539864012,"results":"91","hashOfConfig":"60"},{"size":2432,"mtime":1708539864012,"results":"92","hashOfConfig":"60"},{"size":641,"mtime":1708539864016,"results":"93","hashOfConfig":"60"},{"size":1481,"mtime":1708539864016,"results":"94","hashOfConfig":"60"},{"size":1178,"mtime":1708539864016,"results":"95","hashOfConfig":"60"},{"size":6187,"mtime":1708539864016,"results":"96","hashOfConfig":"60"},{"size":516,"mtime":1708539864016,"results":"97","hashOfConfig":"60"},{"size":496,"mtime":1708539864016,"results":"98","hashOfConfig":"60"},{"size":607,"mtime":1708539864016,"results":"99","hashOfConfig":"60"},{"size":1560,"mtime":1708539864016,"results":"100","hashOfConfig":"60"},{"size":59,"mtime":1708539864016,"results":"101","hashOfConfig":"60"},{"size":1681,"mtime":1708539864016,"results":"102","hashOfConfig":"60"},{"size":298,"mtime":1708539864016,"results":"103","hashOfConfig":"60"},{"size":932,"mtime":1708539864016,"results":"104","hashOfConfig":"60"},{"size":468,"mtime":1708539864016,"results":"105","hashOfConfig":"60"},{"size":212,"mtime":1708539864016,"results":"106","hashOfConfig":"60"},{"size":62,"mtime":1708539864016,"results":"107","hashOfConfig":"60"},{"size":1188,"mtime":1708539864016,"results":"108","hashOfConfig":"60"},{"size":5021,"mtime":1708539864016,"results":"109","hashOfConfig":"60"},{"size":516,"mtime":1708539864016,"results":"110","hashOfConfig":"60"},{"size":1691,"mtime":1708539864016,"results":"111","hashOfConfig":"60"},{"size":7394,"mtime":1708539864016,"results":"112","hashOfConfig":"60"},{"size":4420,"mtime":1708539864016,"results":"113","hashOfConfig":"60"},{"size":2273,"mtime":1708539864016,"results":"114","hashOfConfig":"60"},{"size":1993,"mtime":1708539864016,"results":"115","hashOfConfig":"60"},{"size":3641,"mtime":1708539864016,"results":"116","hashOfConfig":"60"},{"size":54,"mtime":1708539864016,"results":"117","hashOfConfig":"60"},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2syfed",{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","suppressedMessages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","suppressedMessages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","suppressedMessages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","suppressedMessages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","suppressedMessages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","suppressedMessages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","suppressedMessages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","suppressedMessages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","suppressedMessages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","suppressedMessages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","suppressedMessages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","suppressedMessages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","suppressedMessages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","suppressedMessages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","suppressedMessages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","suppressedMessages":"174","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","suppressedMessages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","suppressedMessages":"180","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","suppressedMessages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","suppressedMessages":"186","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","suppressedMessages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","suppressedMessages":"192","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","suppressedMessages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","suppressedMessages":"198","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"199","messages":"200","suppressedMessages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","suppressedMessages":"204","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"205","messages":"206","suppressedMessages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","suppressedMessages":"210","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"211","messages":"212","suppressedMessages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","suppressedMessages":"216","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","suppressedMessages":"219","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","suppressedMessages":"222","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"223","messages":"224","suppressedMessages":"225","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"226","messages":"227","suppressedMessages":"228","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"229","messages":"230","suppressedMessages":"231","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"232","messages":"233","suppressedMessages":"234","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"235","messages":"236","suppressedMessages":"237","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","suppressedMessages":"240","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"241","messages":"242","suppressedMessages":"243","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"244","messages":"245","suppressedMessages":"246","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"247","messages":"248","suppressedMessages":"249","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","suppressedMessages":"252","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"253","messages":"254","suppressedMessages":"255","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"256","messages":"257","suppressedMessages":"258","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"259","messages":"260","suppressedMessages":"261","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","suppressedMessages":"264","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"265","messages":"266","suppressedMessages":"267","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","suppressedMessages":"270","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"271","messages":"272","suppressedMessages":"273","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","suppressedMessages":"276","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"277","messages":"278","suppressedMessages":"279","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","suppressedMessages":"282","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"283","messages":"284","suppressedMessages":"285","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","suppressedMessages":"288","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"289","messages":"290","suppressedMessages":"291","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts",[],["292","293"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["294"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts",[],[],{"ruleId":"295","severity":2,"message":"296","line":22,"column":7,"nodeType":"297","messageId":"298","endLine":22,"endColumn":18,"suppressions":"299"},{"ruleId":"300","severity":2,"message":"301","line":22,"column":21,"nodeType":"302","messageId":"303","endLine":22,"endColumn":81,"fix":"304","suppressions":"305"},{"ruleId":"295","severity":2,"message":"306","line":51,"column":10,"nodeType":"297","messageId":"298","endLine":51,"endColumn":38,"suppressions":"307"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["308"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"309","text":"310"},["311"],"'getFeaturevisorTypeFromValue' is defined but never used.",["312"],{"kind":"313","justification":"314"},[515,518]," {3}",{"kind":"313","justification":"314"},{"kind":"313","justification":"314"},"directive",""]
|
|
1
|
+
[{"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts":"1","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts":"2","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts":"3","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts":"4","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts":"5","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts":"6","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts":"7","/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts":"8","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts":"9","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts":"10","/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts":"11","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts":"12","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts":"13","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts":"14","/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts":"15","/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts":"16","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts":"17","/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts":"18","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts":"19","/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts":"20","/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts":"21","/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts":"22","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts":"23","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts":"24","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts":"25","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts":"26","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts":"27","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts":"28","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts":"29","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts":"30","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts":"31","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts":"32","/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts":"33","/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts":"34","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts":"35","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts":"36","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts":"37","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts":"38","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts":"39","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts":"40","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts":"41","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts":"42","/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts":"43","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts":"44","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts":"45","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts":"46","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts":"47","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts":"48","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts":"49","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts":"50","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts":"51","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts":"52","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts":"53","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts":"54","/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts":"55","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts":"56","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts":"57","/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts":"58"},{"size":3214,"mtime":1708970146312,"results":"59","hashOfConfig":"60"},{"size":1014,"mtime":1708970146312,"results":"61","hashOfConfig":"60"},{"size":9170,"mtime":1708970146312,"results":"62","hashOfConfig":"60"},{"size":2410,"mtime":1708970146312,"results":"63","hashOfConfig":"60"},{"size":1755,"mtime":1708970146312,"results":"64","hashOfConfig":"60"},{"size":65,"mtime":1708970146312,"results":"65","hashOfConfig":"60"},{"size":12889,"mtime":1708970146312,"results":"66","hashOfConfig":"60"},{"size":5052,"mtime":1708970146312,"results":"67","hashOfConfig":"60"},{"size":60,"mtime":1708970146312,"results":"68","hashOfConfig":"60"},{"size":1035,"mtime":1708970146312,"results":"69","hashOfConfig":"60"},{"size":3464,"mtime":1708970146312,"results":"70","hashOfConfig":"60"},{"size":1305,"mtime":1708970146312,"results":"71","hashOfConfig":"60"},{"size":5028,"mtime":1708970146312,"results":"72","hashOfConfig":"60"},{"size":9261,"mtime":1708970146312,"results":"73","hashOfConfig":"60"},{"size":94,"mtime":1708970146312,"results":"74","hashOfConfig":"60"},{"size":279,"mtime":1708970146312,"results":"75","hashOfConfig":"60"},{"size":1033,"mtime":1708970146312,"results":"76","hashOfConfig":"60"},{"size":540,"mtime":1708970146312,"results":"77","hashOfConfig":"60"},{"size":1476,"mtime":1708970146312,"results":"78","hashOfConfig":"60"},{"size":6250,"mtime":1708970146312,"results":"79","hashOfConfig":"60"},{"size":318,"mtime":1708970146312,"results":"80","hashOfConfig":"60"},{"size":1308,"mtime":1708970146312,"results":"81","hashOfConfig":"60"},{"size":359,"mtime":1708970146312,"results":"82","hashOfConfig":"60"},{"size":1119,"mtime":1708970146312,"results":"83","hashOfConfig":"60"},{"size":1464,"mtime":1708970146312,"results":"84","hashOfConfig":"60"},{"size":4007,"mtime":1708970146312,"results":"85","hashOfConfig":"60"},{"size":7758,"mtime":1708970146316,"results":"86","hashOfConfig":"60"},{"size":1221,"mtime":1708970146316,"results":"87","hashOfConfig":"60"},{"size":31,"mtime":1708970146316,"results":"88","hashOfConfig":"60"},{"size":9986,"mtime":1708970146316,"results":"89","hashOfConfig":"60"},{"size":982,"mtime":1708970146316,"results":"90","hashOfConfig":"60"},{"size":364,"mtime":1708970146316,"results":"91","hashOfConfig":"60"},{"size":2432,"mtime":1708970146316,"results":"92","hashOfConfig":"60"},{"size":641,"mtime":1708970146316,"results":"93","hashOfConfig":"60"},{"size":1481,"mtime":1708970146316,"results":"94","hashOfConfig":"60"},{"size":1178,"mtime":1708970146316,"results":"95","hashOfConfig":"60"},{"size":6187,"mtime":1708970146316,"results":"96","hashOfConfig":"60"},{"size":516,"mtime":1708970146316,"results":"97","hashOfConfig":"60"},{"size":496,"mtime":1708970146316,"results":"98","hashOfConfig":"60"},{"size":607,"mtime":1708970146316,"results":"99","hashOfConfig":"60"},{"size":1560,"mtime":1708970146316,"results":"100","hashOfConfig":"60"},{"size":59,"mtime":1708970146316,"results":"101","hashOfConfig":"60"},{"size":1681,"mtime":1708970146316,"results":"102","hashOfConfig":"60"},{"size":298,"mtime":1708970146316,"results":"103","hashOfConfig":"60"},{"size":932,"mtime":1708970146316,"results":"104","hashOfConfig":"60"},{"size":468,"mtime":1708970146316,"results":"105","hashOfConfig":"60"},{"size":212,"mtime":1708970146316,"results":"106","hashOfConfig":"60"},{"size":62,"mtime":1708970146316,"results":"107","hashOfConfig":"60"},{"size":1188,"mtime":1708970146316,"results":"108","hashOfConfig":"60"},{"size":5021,"mtime":1708970146316,"results":"109","hashOfConfig":"60"},{"size":516,"mtime":1708970146316,"results":"110","hashOfConfig":"60"},{"size":1691,"mtime":1708970146316,"results":"111","hashOfConfig":"60"},{"size":7664,"mtime":1708970146316,"results":"112","hashOfConfig":"60"},{"size":5410,"mtime":1708970146316,"results":"113","hashOfConfig":"60"},{"size":2273,"mtime":1708970146316,"results":"114","hashOfConfig":"60"},{"size":1993,"mtime":1708970146316,"results":"115","hashOfConfig":"60"},{"size":3641,"mtime":1708970146316,"results":"116","hashOfConfig":"60"},{"size":54,"mtime":1708970146316,"results":"117","hashOfConfig":"60"},{"filePath":"118","messages":"119","suppressedMessages":"120","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"2syfed",{"filePath":"121","messages":"122","suppressedMessages":"123","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"124","messages":"125","suppressedMessages":"126","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"127","messages":"128","suppressedMessages":"129","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"130","messages":"131","suppressedMessages":"132","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"133","messages":"134","suppressedMessages":"135","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"136","messages":"137","suppressedMessages":"138","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"139","messages":"140","suppressedMessages":"141","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"142","messages":"143","suppressedMessages":"144","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"145","messages":"146","suppressedMessages":"147","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"148","messages":"149","suppressedMessages":"150","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"151","messages":"152","suppressedMessages":"153","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"154","messages":"155","suppressedMessages":"156","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"157","messages":"158","suppressedMessages":"159","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"160","messages":"161","suppressedMessages":"162","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"163","messages":"164","suppressedMessages":"165","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"166","messages":"167","suppressedMessages":"168","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"169","messages":"170","suppressedMessages":"171","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"172","messages":"173","suppressedMessages":"174","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"175","messages":"176","suppressedMessages":"177","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"178","messages":"179","suppressedMessages":"180","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"181","messages":"182","suppressedMessages":"183","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"184","messages":"185","suppressedMessages":"186","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"187","messages":"188","suppressedMessages":"189","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"190","messages":"191","suppressedMessages":"192","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"193","messages":"194","suppressedMessages":"195","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"196","messages":"197","suppressedMessages":"198","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"199","messages":"200","suppressedMessages":"201","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"202","messages":"203","suppressedMessages":"204","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"205","messages":"206","suppressedMessages":"207","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"208","messages":"209","suppressedMessages":"210","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"211","messages":"212","suppressedMessages":"213","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"214","messages":"215","suppressedMessages":"216","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"217","messages":"218","suppressedMessages":"219","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"220","messages":"221","suppressedMessages":"222","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"223","messages":"224","suppressedMessages":"225","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"226","messages":"227","suppressedMessages":"228","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"229","messages":"230","suppressedMessages":"231","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"232","messages":"233","suppressedMessages":"234","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"235","messages":"236","suppressedMessages":"237","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"238","messages":"239","suppressedMessages":"240","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"241","messages":"242","suppressedMessages":"243","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"244","messages":"245","suppressedMessages":"246","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"247","messages":"248","suppressedMessages":"249","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"250","messages":"251","suppressedMessages":"252","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"253","messages":"254","suppressedMessages":"255","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"256","messages":"257","suppressedMessages":"258","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"259","messages":"260","suppressedMessages":"261","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"262","messages":"263","suppressedMessages":"264","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"265","messages":"266","suppressedMessages":"267","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"268","messages":"269","suppressedMessages":"270","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"271","messages":"272","suppressedMessages":"273","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"274","messages":"275","suppressedMessages":"276","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"277","messages":"278","suppressedMessages":"279","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"280","messages":"281","suppressedMessages":"282","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"283","messages":"284","suppressedMessages":"285","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"286","messages":"287","suppressedMessages":"288","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"289","messages":"290","suppressedMessages":"291","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/allocator.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildDatafile.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/buildProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/getFeatureRanges.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/builder/traffic.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/parsers.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/config/projectConfig.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/adapter.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/datasource.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/filesystemAdapter.ts",[],["292","293"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/datasource/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/dependencies.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/findDuplicateSegments.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/find-duplicate-segments/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/generate-code/typescript.ts",[],["294"],"/home/runner/work/featurevisor/featurevisor/packages/core/src/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/init/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/attributeSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkCircularDependency.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/checkPercentageExceedingSlot.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/conditionSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/featureSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/groupSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/lintProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/printError.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/segmentSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/linter/testSchema.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/restore/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/exportSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/generateSiteSearchIndex.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getLastModifiedFromHistory.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getOwnerAndRepoFromUrl.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRelativePaths.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/getRepoDetails.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/site/serveSite.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfArraysAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/checkIfObjectsAreEqual.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/cliFormat.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/index.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.spec.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/matrix.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/prettyDuration.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/printTestResult.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testFeature.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testProject.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/tester/testSegment.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/extractKeys.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/git.ts",[],[],"/home/runner/work/featurevisor/featurevisor/packages/core/src/utils/index.ts",[],[],{"ruleId":"295","severity":2,"message":"296","line":22,"column":7,"nodeType":"297","messageId":"298","endLine":22,"endColumn":18,"suppressions":"299"},{"ruleId":"300","severity":2,"message":"301","line":22,"column":21,"nodeType":"302","messageId":"303","endLine":22,"endColumn":81,"fix":"304","suppressions":"305"},{"ruleId":"295","severity":2,"message":"306","line":51,"column":10,"nodeType":"297","messageId":"298","endLine":51,"endColumn":38,"suppressions":"307"},"@typescript-eslint/no-unused-vars","'commitRegex' is assigned a value but never used.","Identifier","unusedVar",["308"],"no-regex-spaces","Spaces are hard to count. Use {3}.","Literal","multipleSpaces",{"range":"309","text":"310"},["311"],"'getFeaturevisorTypeFromValue' is defined but never used.",["312"],{"kind":"313","justification":"314"},[515,518]," {3}",{"kind":"313","justification":"314"},{"kind":"313","justification":"314"},"directive",""]
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,28 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [1.8.0](https://github.com/featurevisor/featurevisor/compare/v1.7.3...v1.8.0) (2024-02-26)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* allow option to test by generating datafiles early ([#267](https://github.com/featurevisor/featurevisor/issues/267)) ([d2104ff](https://github.com/featurevisor/featurevisor/commit/d2104ffe25787e2d6deda18b632ad4830139061c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.7.3](https://github.com/featurevisor/featurevisor/compare/v1.7.2...v1.7.3) (2024-02-24)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* lint entity names ([#266](https://github.com/featurevisor/featurevisor/issues/266)) ([7e63137](https://github.com/featurevisor/featurevisor/commit/7e63137fa2821605362c742475d78c8256f89fcd))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
6
28
|
## [1.7.2](https://github.com/featurevisor/featurevisor/compare/v1.7.1...v1.7.2) (2024-02-21)
|
|
7
29
|
|
|
8
30
|
|
package/coverage/clover.xml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<coverage generated="
|
|
3
|
-
<project timestamp="
|
|
2
|
+
<coverage generated="1708970285122" clover="3.2.0">
|
|
3
|
+
<project timestamp="1708970285122" name="All files">
|
|
4
4
|
<metrics statements="355" coveredstatements="236" conditionals="181" coveredconditionals="109" methods="52" coveredmethods="35" elements="588" coveredelements="380" complexity="0" loc="355" ncloc="355" packages="4" files="8" classes="8"/>
|
|
5
5
|
<package name="lib.builder">
|
|
6
6
|
<metrics statements="92" coveredstatements="87" conditionals="52" coveredconditionals="42" methods="14" coveredmethods="14"/>
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
147
147
|
Code coverage generated by
|
|
148
148
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
149
|
-
at 2024-02-
|
|
149
|
+
at 2024-02-26T17:58:05.082Z
|
|
150
150
|
</div>
|
|
151
151
|
<script src="prettify.js"></script>
|
|
152
152
|
<script>
|
|
@@ -175,7 +175,7 @@ exports.getUpdatedAvailableRangesAfterFilling = getUpdatedAvailableRangesAfterFi
|
|
|
175
175
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
176
176
|
Code coverage generated by
|
|
177
177
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
178
|
-
at 2024-02-
|
|
178
|
+
at 2024-02-26T17:58:05.082Z
|
|
179
179
|
</div>
|
|
180
180
|
<script src="../../prettify.js"></script>
|
|
181
181
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-02-
|
|
119
|
+
at 2024-02-26T17:58:05.082Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -460,7 +460,7 @@ exports.getTraffic = getTraffic;
|
|
|
460
460
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
461
461
|
Code coverage generated by
|
|
462
462
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
463
|
-
at 2024-02-
|
|
463
|
+
at 2024-02-26T17:58:05.082Z
|
|
464
464
|
</div>
|
|
465
465
|
<script src="../../prettify.js"></script>
|
|
466
466
|
<script>
|
|
@@ -139,7 +139,7 @@ exports.checkIfObjectsAreEqual = checkIfObjectsAreEqual;
|
|
|
139
139
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
140
140
|
Code coverage generated by
|
|
141
141
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
142
|
-
at 2024-02-
|
|
142
|
+
at 2024-02-26T17:58:05.082Z
|
|
143
143
|
</div>
|
|
144
144
|
<script src="../../prettify.js"></script>
|
|
145
145
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-02-
|
|
119
|
+
at 2024-02-26T17:58:05.082Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -472,7 +472,7 @@ exports.getSegmentAssertionsFromMatrix = getSegmentAssertionsFromMatrix;
|
|
|
472
472
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
473
473
|
Code coverage generated by
|
|
474
474
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
475
|
-
at 2024-02-
|
|
475
|
+
at 2024-02-26T17:58:05.082Z
|
|
476
476
|
</div>
|
|
477
477
|
<script src="../../prettify.js"></script>
|
|
478
478
|
<script>
|
|
@@ -193,7 +193,7 @@ export function getUpdatedAvailableRangesAfterFilling(
|
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
195
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
-
at 2024-02-
|
|
196
|
+
at 2024-02-26T17:58:05.082Z
|
|
197
197
|
</div>
|
|
198
198
|
<script src="../../prettify.js"></script>
|
|
199
199
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-02-
|
|
119
|
+
at 2024-02-26T17:58:05.082Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -574,7 +574,7 @@ export function getTraffic(
|
|
|
574
574
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
575
575
|
Code coverage generated by
|
|
576
576
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
577
|
-
at 2024-02-
|
|
577
|
+
at 2024-02-26T17:58:05.082Z
|
|
578
578
|
</div>
|
|
579
579
|
<script src="../../prettify.js"></script>
|
|
580
580
|
<script>
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
143
143
|
Code coverage generated by
|
|
144
144
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
145
|
-
at 2024-02-
|
|
145
|
+
at 2024-02-26T17:58:05.082Z
|
|
146
146
|
</div>
|
|
147
147
|
<script src="../../prettify.js"></script>
|
|
148
148
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2024-02-
|
|
119
|
+
at 2024-02-26T17:58:05.082Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -625,7 +625,7 @@ export function <span class="fstat-no" title="function not covered" >getSegmentA
|
|
|
625
625
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
626
626
|
Code coverage generated by
|
|
627
627
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
628
|
-
at 2024-02-
|
|
628
|
+
at 2024-02-26T17:58:05.082Z
|
|
629
629
|
</div>
|
|
630
630
|
<script src="../../prettify.js"></script>
|
|
631
631
|
<script>
|
|
@@ -49,6 +49,8 @@ var checkCircularDependency_1 = require("./checkCircularDependency");
|
|
|
49
49
|
var checkPercentageExceedingSlot_1 = require("./checkPercentageExceedingSlot");
|
|
50
50
|
var printError_1 = require("./printError");
|
|
51
51
|
var cliFormat_1 = require("../tester/cliFormat");
|
|
52
|
+
var ENTITY_NAME_REGEX = /^[a-zA-Z0-9_\-.]+$/;
|
|
53
|
+
var ENTITY_NAME_REGEX_ERROR = "Names must be alphanumeric and can contain _, -, and .";
|
|
52
54
|
function lintProject(deps, options) {
|
|
53
55
|
if (options === void 0) { options = {}; }
|
|
54
56
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -108,6 +110,13 @@ function lintProject(deps, options) {
|
|
|
108
110
|
if (!(_i < filteredKeys_1.length)) return [3 /*break*/, 7];
|
|
109
111
|
key = filteredKeys_1[_i];
|
|
110
112
|
fullPath = getFullPathFromKey("attribute", key);
|
|
113
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
114
|
+
console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
|
|
115
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " => Error: Invalid name: \"".concat(key, "\""));
|
|
116
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " ".concat(ENTITY_NAME_REGEX_ERROR));
|
|
117
|
+
console.log("");
|
|
118
|
+
hasError = true;
|
|
119
|
+
}
|
|
111
120
|
_e.label = 3;
|
|
112
121
|
case 3:
|
|
113
122
|
_e.trys.push([3, 5, , 6]);
|
|
@@ -149,6 +158,13 @@ function lintProject(deps, options) {
|
|
|
149
158
|
if (!(_a < filteredKeys_2.length)) return [3 /*break*/, 14];
|
|
150
159
|
key = filteredKeys_2[_a];
|
|
151
160
|
fullPath = getFullPathFromKey("segment", key);
|
|
161
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
162
|
+
console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
|
|
163
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " => Error: Invalid name: \"".concat(key, "\""));
|
|
164
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " ".concat(ENTITY_NAME_REGEX_ERROR));
|
|
165
|
+
console.log("");
|
|
166
|
+
hasError = true;
|
|
167
|
+
}
|
|
152
168
|
_e.label = 10;
|
|
153
169
|
case 10:
|
|
154
170
|
_e.trys.push([10, 12, , 13]);
|
|
@@ -189,6 +205,13 @@ function lintProject(deps, options) {
|
|
|
189
205
|
if (!(_b < filteredKeys_3.length)) return [3 /*break*/, 25];
|
|
190
206
|
key = filteredKeys_3[_b];
|
|
191
207
|
fullPath = getFullPathFromKey("feature", key);
|
|
208
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
209
|
+
console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
|
|
210
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " => Error: Invalid name: \"".concat(key, "\""));
|
|
211
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " ".concat(ENTITY_NAME_REGEX_ERROR));
|
|
212
|
+
console.log("");
|
|
213
|
+
hasError = true;
|
|
214
|
+
}
|
|
192
215
|
parsed = void 0;
|
|
193
216
|
_e.label = 17;
|
|
194
217
|
case 17:
|
|
@@ -245,6 +268,13 @@ function lintProject(deps, options) {
|
|
|
245
268
|
if (!(_c < filteredKeys_4.length)) return [3 /*break*/, 36];
|
|
246
269
|
key = filteredKeys_4[_c];
|
|
247
270
|
fullPath = getFullPathFromKey("group", key);
|
|
271
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
272
|
+
console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
|
|
273
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " => Error: Invalid name: \"".concat(key, "\""));
|
|
274
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " ".concat(ENTITY_NAME_REGEX_ERROR));
|
|
275
|
+
console.log("");
|
|
276
|
+
hasError = true;
|
|
277
|
+
}
|
|
248
278
|
parsed = void 0;
|
|
249
279
|
_e.label = 28;
|
|
250
280
|
case 28:
|
|
@@ -301,6 +331,13 @@ function lintProject(deps, options) {
|
|
|
301
331
|
if (!(_d < filteredKeys_5.length)) return [3 /*break*/, 43];
|
|
302
332
|
key = filteredKeys_5[_d];
|
|
303
333
|
fullPath = getFullPathFromKey("test", key);
|
|
334
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
335
|
+
console.log(cliFormat_1.CLI_FORMAT_UNDERLINE, fullPath);
|
|
336
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " => Error: Invalid name: \"".concat(key, "\""));
|
|
337
|
+
console.log(cliFormat_1.CLI_FORMAT_RED, " ".concat(ENTITY_NAME_REGEX_ERROR));
|
|
338
|
+
console.log("");
|
|
339
|
+
hasError = true;
|
|
340
|
+
}
|
|
304
341
|
_e.label = 39;
|
|
305
342
|
case 39:
|
|
306
343
|
_e.trys.push([39, 41, , 42]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lintProject.js","sourceRoot":"","sources":["../../src/linter/lintProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAuB;AACvB,2BAA6B;AAE7B,qDAA0D;AAC1D,qDAA2D;AAC3D,iDAAsD;AACtD,6CAAkD;AAClD,iDAAsD;AAC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AC;yBACjB;wBAED,QAAQ,GAAG,IAAI,CAAC;qBACjB;;;;oBAED,OAAO,CAAC,GAAG,CAAC,gCAAoB,EAAE,QAAQ,CAAC,CAAC;oBAC5C,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,OAAO,CAAC,GAAG,CAAC,GAAC,CAAC,CAAC;oBAEf,QAAQ,GAAG,IAAI,CAAC;;;oBAhCF,IAAY,CAAA;;yBAqChC,sBAAO,QAAQ,EAAC;;;;CACjB;AA7TD,kCA6TC"}
|
|
@@ -5,4 +5,6 @@ export declare function getDatafileForFeature(featureKey: string, environment: s
|
|
|
5
5
|
export declare function testFeature(datasource: Datasource, projectConfig: ProjectConfig, test: TestFeature, options: {
|
|
6
6
|
verbose?: boolean;
|
|
7
7
|
showDatafile?: boolean;
|
|
8
|
-
}, patterns: any
|
|
8
|
+
}, patterns: any, datafileContentByEnvironment?: {
|
|
9
|
+
[environment: string]: DatafileContent;
|
|
10
|
+
}): Promise<TestResult>;
|
|
@@ -70,8 +70,9 @@ function getDatafileForFeature(featureKey, environment, projectConfig, datasourc
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
exports.getDatafileForFeature = getDatafileForFeature;
|
|
73
|
-
function testFeature(datasource, projectConfig, test, options, patterns) {
|
|
73
|
+
function testFeature(datasource, projectConfig, test, options, patterns, datafileContentByEnvironment) {
|
|
74
74
|
if (options === void 0) { options = {}; }
|
|
75
|
+
if (datafileContentByEnvironment === void 0) { datafileContentByEnvironment = {}; }
|
|
75
76
|
return __awaiter(this, void 0, void 0, function () {
|
|
76
77
|
var testStartTime, featureKey, testResult, aIndex, assertions, _loop_1, bIndex, state_1;
|
|
77
78
|
return __generator(this, function (_a) {
|
|
@@ -94,9 +95,9 @@ function testFeature(datasource, projectConfig, test, options, patterns) {
|
|
|
94
95
|
if (!(aIndex < test.assertions.length)) return [3 /*break*/, 6];
|
|
95
96
|
assertions = (0, matrix_1.getFeatureAssertionsFromMatrix)(aIndex, test.assertions[aIndex]);
|
|
96
97
|
_loop_1 = function (bIndex) {
|
|
97
|
-
var assertionStartTime, assertion, testResultAssertion, datafileContent, sdk, feature, isEnabled, variation;
|
|
98
|
-
return __generator(this, function (
|
|
99
|
-
switch (
|
|
98
|
+
var assertionStartTime, assertion, testResultAssertion, datafileContent, _b, sdk, feature, isEnabled, variation;
|
|
99
|
+
return __generator(this, function (_c) {
|
|
100
|
+
switch (_c.label) {
|
|
100
101
|
case 0:
|
|
101
102
|
assertionStartTime = Date.now();
|
|
102
103
|
assertion = assertions[bIndex];
|
|
@@ -109,9 +110,15 @@ function testFeature(datasource, projectConfig, test, options, patterns) {
|
|
|
109
110
|
if (patterns.assertionPattern && !patterns.assertionPattern.test(assertion.description)) {
|
|
110
111
|
return [2 /*return*/, "continue"];
|
|
111
112
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
if (!(typeof datafileContentByEnvironment[assertion.environment] !== "undefined")) return [3 /*break*/, 1];
|
|
114
|
+
_b = datafileContentByEnvironment[assertion.environment];
|
|
115
|
+
return [3 /*break*/, 3];
|
|
116
|
+
case 1: return [4 /*yield*/, getDatafileForFeature(test.feature, assertion.environment, projectConfig, datasource)];
|
|
117
|
+
case 2:
|
|
118
|
+
_b = _c.sent();
|
|
119
|
+
_c.label = 3;
|
|
120
|
+
case 3:
|
|
121
|
+
datafileContent = _b;
|
|
115
122
|
if (options.showDatafile) {
|
|
116
123
|
console.log("");
|
|
117
124
|
console.log(JSON.stringify(datafileContent, null, 2));
|
|
@@ -127,8 +134,8 @@ function testFeature(datasource, projectConfig, test, options, patterns) {
|
|
|
127
134
|
sdk.setLogLevels(["debug", "info", "warn", "error"]);
|
|
128
135
|
}
|
|
129
136
|
return [4 /*yield*/, datasource.readFeature(featureKey)];
|
|
130
|
-
case
|
|
131
|
-
feature =
|
|
137
|
+
case 4:
|
|
138
|
+
feature = _c.sent();
|
|
132
139
|
if (!feature) {
|
|
133
140
|
testResult.notFound = true;
|
|
134
141
|
testResult.passed = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testFeature.js","sourceRoot":"","sources":["../../src/tester/testFeature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAAwE;AAIxE,sCAA2C;AAC3C,oCAA2C;AAE3C,iEAAgE;AAChE,mEAAkE;AAClE,mCAA0D;AAE1D,SAAsB,qBAAqB,CACzC,UAAkB,EAClB,WAAmB,EACnB,aAA4B,EAC5B,UAAsB,EACtB,QAA4B;IAA5B,yBAAA,EAAA,oBAA4B;;;;;wBAEN,qBAAM,UAAU,CAAC,wBAAwB,CAAC,UAAU,CAAC,EAAA;;oBAArE,aAAa,GAAG,SAAqD;oBACrE,iBAAiB,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;oBAE9B,qBAAM,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,EAAA;;oBAAvD,aAAa,GAAG,SAAuC;oBACrC,qBAAM,IAAA,uBAAa,EACzC,aAAa,EACb,UAAU,EACV;4BACE,aAAa,EAAE,uBAAc;4BAC7B,QAAQ,UAAA;4BACR,WAAW,EAAE,WAAW;4BACxB,QAAQ,EAAE,iBAAiB;yBAC5B,EACD,aAAa,CACd,EAAA;;oBAVK,eAAe,GAAG,SAUvB;oBAED,sBAAO,eAAe,EAAC;;;;CACxB;AAxBD,sDAwBC;AAED,SAAsB,WAAW,CAC/B,UAAsB,EACtB,aAA4B,EAC5B,IAAiB,EACjB,OAA2D,EAC3D,QAAQ;
|
|
1
|
+
{"version":3,"file":"testFeature.js","sourceRoot":"","sources":["../../src/tester/testFeature.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,yCAAwE;AAIxE,sCAA2C;AAC3C,oCAA2C;AAE3C,iEAAgE;AAChE,mEAAkE;AAClE,mCAA0D;AAE1D,SAAsB,qBAAqB,CACzC,UAAkB,EACl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Q,EAAE,aAAuB;wDACjC,MAAM,EAAE,WAAqB;wDAC7B,OAAO,EAAE;4DACP,WAAW,aAAA;yDACZ;qDACF,CAAC,CAAC;iDACJ;6CACF;wCACH,CAAC,CAAC,CAAC;qCACJ;oCAED,mBAAmB,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,kBAAkB,CAAC;oCAC/D,UAAU,CAAC,UAAU,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;;;;;oBApKzC,MAAM,GAAG,CAAC;;;yBAAE,CAAA,MAAM,GAAG,UAAU,CAAC,MAAM,CAAA;kDAAtC,MAAM;;;;;;;oBAAkC,MAAM,EAAE,CAAA;;;oBAHL,MAAM,EAAE,CAAA;;;oBA2K9D,UAAU,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,aAAa,CAAC;oBAEjD,sBAAO,UAAU,EAAC;;;;CACnB;AApMD,kCAoMC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { DatafileContent } from "@featurevisor/types";
|
|
1
2
|
import { Dependencies } from "../dependencies";
|
|
2
3
|
export interface TestProjectOptions {
|
|
3
4
|
keyPattern?: string;
|
|
4
5
|
assertionPattern?: string;
|
|
5
6
|
verbose?: boolean;
|
|
6
7
|
showDatafile?: boolean;
|
|
8
|
+
fast?: boolean;
|
|
7
9
|
}
|
|
8
10
|
export interface TestPatterns {
|
|
9
11
|
keyPattern?: RegExp;
|
|
@@ -16,5 +18,8 @@ export interface ExecutionResult {
|
|
|
16
18
|
failed: number;
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
|
-
export
|
|
21
|
+
export interface DatafileContentByEnvironment {
|
|
22
|
+
[environment: string]: DatafileContent;
|
|
23
|
+
}
|
|
24
|
+
export declare function executeTest(testFile: string, deps: Dependencies, options: TestProjectOptions, patterns: TestPatterns, datafileContentByEnvironment: DatafileContentByEnvironment): Promise<ExecutionResult | undefined>;
|
|
20
25
|
export declare function testProject(deps: Dependencies, options?: TestProjectOptions): Promise<boolean>;
|
|
@@ -43,7 +43,9 @@ var testFeature_1 = require("./testFeature");
|
|
|
43
43
|
var cliFormat_1 = require("./cliFormat");
|
|
44
44
|
var prettyDuration_1 = require("./prettyDuration");
|
|
45
45
|
var printTestResult_1 = require("./printTestResult");
|
|
46
|
-
|
|
46
|
+
var builder_1 = require("../builder");
|
|
47
|
+
var config_1 = require("../config");
|
|
48
|
+
function executeTest(testFile, deps, options, patterns, datafileContentByEnvironment) {
|
|
47
49
|
return __awaiter(this, void 0, void 0, function () {
|
|
48
50
|
var datasource, projectConfig, rootDirectoryPath, testFilePath, t, tAsSegment, tAsFeature, key, type, executionResult, testResult;
|
|
49
51
|
return __generator(this, function (_a) {
|
|
@@ -78,7 +80,7 @@ function executeTest(testFile, deps, options, patterns) {
|
|
|
78
80
|
case 2:
|
|
79
81
|
testResult = _a.sent();
|
|
80
82
|
return [3 /*break*/, 5];
|
|
81
|
-
case 3: return [4 /*yield*/, (0, testFeature_1.testFeature)(datasource, projectConfig, tAsFeature, options, patterns)];
|
|
83
|
+
case 3: return [4 /*yield*/, (0, testFeature_1.testFeature)(datasource, projectConfig, tAsFeature, options, patterns, datafileContentByEnvironment)];
|
|
82
84
|
case 4:
|
|
83
85
|
testResult = _a.sent();
|
|
84
86
|
_a.label = 5;
|
|
@@ -102,9 +104,9 @@ exports.executeTest = executeTest;
|
|
|
102
104
|
function testProject(deps, options) {
|
|
103
105
|
if (options === void 0) { options = {}; }
|
|
104
106
|
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var projectConfig, datasource, hasError, testFiles, startTime, patterns, passedTestsCount, failedTestsCount, passedAssertionsCount, failedAssertionsCount, _i, testFiles_1, testFile, executionResult, diffInMs, testSpecsMessage, testAssertionsMessage;
|
|
106
|
-
return __generator(this, function (
|
|
107
|
-
switch (
|
|
107
|
+
var projectConfig, datasource, hasError, testFiles, startTime, patterns, passedTestsCount, failedTestsCount, passedAssertionsCount, failedAssertionsCount, datafileContentByEnvironment, _i, _a, environment, existingState, datafileContent, _b, testFiles_1, testFile, executionResult, diffInMs, testSpecsMessage, testAssertionsMessage;
|
|
108
|
+
return __generator(this, function (_c) {
|
|
109
|
+
switch (_c.label) {
|
|
108
110
|
case 0:
|
|
109
111
|
projectConfig = deps.projectConfig, datasource = deps.datasource;
|
|
110
112
|
hasError = false;
|
|
@@ -115,7 +117,7 @@ function testProject(deps, options) {
|
|
|
115
117
|
}
|
|
116
118
|
return [4 /*yield*/, datasource.listTests()];
|
|
117
119
|
case 1:
|
|
118
|
-
testFiles =
|
|
120
|
+
testFiles = _c.sent();
|
|
119
121
|
if (testFiles.length === 0) {
|
|
120
122
|
console.error("No tests found in: ".concat(projectConfig.testsDirectoryPath));
|
|
121
123
|
hasError = true;
|
|
@@ -130,16 +132,39 @@ function testProject(deps, options) {
|
|
|
130
132
|
failedTestsCount = 0;
|
|
131
133
|
passedAssertionsCount = 0;
|
|
132
134
|
failedAssertionsCount = 0;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
datafileContentByEnvironment = {};
|
|
136
|
+
if (!options.fast) return [3 /*break*/, 6];
|
|
137
|
+
_i = 0, _a = projectConfig.environments;
|
|
138
|
+
_c.label = 2;
|
|
135
139
|
case 2:
|
|
136
|
-
if (!(_i <
|
|
137
|
-
|
|
138
|
-
return [4 /*yield*/,
|
|
140
|
+
if (!(_i < _a.length)) return [3 /*break*/, 6];
|
|
141
|
+
environment = _a[_i];
|
|
142
|
+
return [4 /*yield*/, datasource.readState(environment)];
|
|
139
143
|
case 3:
|
|
140
|
-
|
|
144
|
+
existingState = _c.sent();
|
|
145
|
+
return [4 /*yield*/, (0, builder_1.buildDatafile)(projectConfig, datasource, {
|
|
146
|
+
schemaVersion: config_1.SCHEMA_VERSION,
|
|
147
|
+
revision: "include-all-features",
|
|
148
|
+
environment: environment,
|
|
149
|
+
}, existingState)];
|
|
150
|
+
case 4:
|
|
151
|
+
datafileContent = _c.sent();
|
|
152
|
+
datafileContentByEnvironment[environment] = datafileContent;
|
|
153
|
+
_c.label = 5;
|
|
154
|
+
case 5:
|
|
155
|
+
_i++;
|
|
156
|
+
return [3 /*break*/, 2];
|
|
157
|
+
case 6:
|
|
158
|
+
_b = 0, testFiles_1 = testFiles;
|
|
159
|
+
_c.label = 7;
|
|
160
|
+
case 7:
|
|
161
|
+
if (!(_b < testFiles_1.length)) return [3 /*break*/, 10];
|
|
162
|
+
testFile = testFiles_1[_b];
|
|
163
|
+
return [4 /*yield*/, executeTest(testFile, deps, options, patterns, datafileContentByEnvironment)];
|
|
164
|
+
case 8:
|
|
165
|
+
executionResult = _c.sent();
|
|
141
166
|
if (!executionResult) {
|
|
142
|
-
return [3 /*break*/,
|
|
167
|
+
return [3 /*break*/, 9];
|
|
143
168
|
}
|
|
144
169
|
if (executionResult.passed) {
|
|
145
170
|
passedTestsCount += 1;
|
|
@@ -150,11 +175,11 @@ function testProject(deps, options) {
|
|
|
150
175
|
}
|
|
151
176
|
passedAssertionsCount += executionResult.assertionsCount.passed;
|
|
152
177
|
failedAssertionsCount += executionResult.assertionsCount.failed;
|
|
153
|
-
|
|
154
|
-
case
|
|
155
|
-
|
|
156
|
-
return [3 /*break*/,
|
|
157
|
-
case
|
|
178
|
+
_c.label = 9;
|
|
179
|
+
case 9:
|
|
180
|
+
_b++;
|
|
181
|
+
return [3 /*break*/, 7];
|
|
182
|
+
case 10:
|
|
158
183
|
diffInMs = Date.now() - startTime;
|
|
159
184
|
console.log("\n---\n");
|
|
160
185
|
testSpecsMessage = "Test specs: ".concat(passedTestsCount, " passed, ").concat(failedTestsCount, " failed");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testProject.js","sourceRoot":"","sources":["../../src/tester/testProject.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uBAAyB;AAIzB,6CAA4C;AAC5C,6CAA4C;AAC5C,yCAAgF;AAEhF,mDAAkD;AAClD,qDAAoD;
|
|
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;qBACtD;oBAED,OAAO,CAAC,GAAG,CAAC,2BAAe,EAAE,sBAAe,IAAA,+BAAc,EAAC,QAAQ,CAAC,CAAE,CAAC,CAAC;oBAExE,sBAAO,QAAQ,EAAC;;;;CACjB;AAjGD,kCAiGC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.0",
|
|
4
4
|
"description": "Core package of Featurevisor for Node.js usage",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"@types/js-yaml": "^4.0.5",
|
|
58
58
|
"@types/tar": "^6.1.4"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "723416cb585bad943be391e7ee03731ea268b255"
|
|
61
61
|
}
|
|
@@ -19,6 +19,9 @@ export interface LintProjectOptions {
|
|
|
19
19
|
entityType?: string;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
const ENTITY_NAME_REGEX = /^[a-zA-Z0-9_\-.]+$/;
|
|
23
|
+
const ENTITY_NAME_REGEX_ERROR = "Names must be alphanumeric and can contain _, -, and .";
|
|
24
|
+
|
|
22
25
|
export async function lintProject(
|
|
23
26
|
deps: Dependencies,
|
|
24
27
|
options: LintProjectOptions = {},
|
|
@@ -76,6 +79,14 @@ export async function lintProject(
|
|
|
76
79
|
for (const key of filteredKeys) {
|
|
77
80
|
const fullPath = getFullPathFromKey("attribute", key);
|
|
78
81
|
|
|
82
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
83
|
+
console.log(CLI_FORMAT_UNDERLINE, fullPath);
|
|
84
|
+
console.log(CLI_FORMAT_RED, ` => Error: Invalid name: "${key}"`);
|
|
85
|
+
console.log(CLI_FORMAT_RED, ` ${ENTITY_NAME_REGEX_ERROR}`);
|
|
86
|
+
console.log("");
|
|
87
|
+
hasError = true;
|
|
88
|
+
}
|
|
89
|
+
|
|
79
90
|
try {
|
|
80
91
|
const parsed = await datasource.readAttribute(key);
|
|
81
92
|
|
|
@@ -118,6 +129,14 @@ export async function lintProject(
|
|
|
118
129
|
for (const key of filteredKeys) {
|
|
119
130
|
const fullPath = getFullPathFromKey("segment", key);
|
|
120
131
|
|
|
132
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
133
|
+
console.log(CLI_FORMAT_UNDERLINE, fullPath);
|
|
134
|
+
console.log(CLI_FORMAT_RED, ` => Error: Invalid name: "${key}"`);
|
|
135
|
+
console.log(CLI_FORMAT_RED, ` ${ENTITY_NAME_REGEX_ERROR}`);
|
|
136
|
+
console.log("");
|
|
137
|
+
hasError = true;
|
|
138
|
+
}
|
|
139
|
+
|
|
121
140
|
try {
|
|
122
141
|
const parsed = await datasource.readSegment(key);
|
|
123
142
|
|
|
@@ -161,6 +180,15 @@ export async function lintProject(
|
|
|
161
180
|
|
|
162
181
|
for (const key of filteredKeys) {
|
|
163
182
|
const fullPath = getFullPathFromKey("feature", key);
|
|
183
|
+
|
|
184
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
185
|
+
console.log(CLI_FORMAT_UNDERLINE, fullPath);
|
|
186
|
+
console.log(CLI_FORMAT_RED, ` => Error: Invalid name: "${key}"`);
|
|
187
|
+
console.log(CLI_FORMAT_RED, ` ${ENTITY_NAME_REGEX_ERROR}`);
|
|
188
|
+
console.log("");
|
|
189
|
+
hasError = true;
|
|
190
|
+
}
|
|
191
|
+
|
|
164
192
|
let parsed;
|
|
165
193
|
|
|
166
194
|
try {
|
|
@@ -210,6 +238,15 @@ export async function lintProject(
|
|
|
210
238
|
|
|
211
239
|
for (const key of filteredKeys) {
|
|
212
240
|
const fullPath = getFullPathFromKey("group", key);
|
|
241
|
+
|
|
242
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
243
|
+
console.log(CLI_FORMAT_UNDERLINE, fullPath);
|
|
244
|
+
console.log(CLI_FORMAT_RED, ` => Error: Invalid name: "${key}"`);
|
|
245
|
+
console.log(CLI_FORMAT_RED, ` ${ENTITY_NAME_REGEX_ERROR}`);
|
|
246
|
+
console.log("");
|
|
247
|
+
hasError = true;
|
|
248
|
+
}
|
|
249
|
+
|
|
213
250
|
let parsed;
|
|
214
251
|
|
|
215
252
|
try {
|
|
@@ -267,6 +304,14 @@ export async function lintProject(
|
|
|
267
304
|
for (const key of filteredKeys) {
|
|
268
305
|
const fullPath = getFullPathFromKey("test", key);
|
|
269
306
|
|
|
307
|
+
if (!ENTITY_NAME_REGEX.test(key)) {
|
|
308
|
+
console.log(CLI_FORMAT_UNDERLINE, fullPath);
|
|
309
|
+
console.log(CLI_FORMAT_RED, ` => Error: Invalid name: "${key}"`);
|
|
310
|
+
console.log(CLI_FORMAT_RED, ` ${ENTITY_NAME_REGEX_ERROR}`);
|
|
311
|
+
console.log("");
|
|
312
|
+
hasError = true;
|
|
313
|
+
}
|
|
314
|
+
|
|
270
315
|
try {
|
|
271
316
|
const parsed = await datasource.readTest(key);
|
|
272
317
|
|
|
@@ -48,6 +48,7 @@ export async function testFeature(
|
|
|
48
48
|
test: TestFeature,
|
|
49
49
|
options: { verbose?: boolean; showDatafile?: boolean } = {},
|
|
50
50
|
patterns,
|
|
51
|
+
datafileContentByEnvironment: { [environment: string]: DatafileContent } = {},
|
|
51
52
|
): Promise<TestResult> {
|
|
52
53
|
const testStartTime = Date.now();
|
|
53
54
|
const featureKey = test.feature;
|
|
@@ -81,12 +82,15 @@ export async function testFeature(
|
|
|
81
82
|
continue;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
|
-
const datafileContent =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
const datafileContent =
|
|
86
|
+
typeof datafileContentByEnvironment[assertion.environment] !== "undefined"
|
|
87
|
+
? datafileContentByEnvironment[assertion.environment]
|
|
88
|
+
: await getDatafileForFeature(
|
|
89
|
+
test.feature,
|
|
90
|
+
assertion.environment,
|
|
91
|
+
projectConfig,
|
|
92
|
+
datasource,
|
|
93
|
+
);
|
|
90
94
|
|
|
91
95
|
if (options.showDatafile) {
|
|
92
96
|
console.log("");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as fs from "fs";
|
|
2
2
|
|
|
3
|
-
import { TestSegment, TestFeature } from "@featurevisor/types";
|
|
3
|
+
import { TestSegment, TestFeature, DatafileContent } from "@featurevisor/types";
|
|
4
4
|
|
|
5
5
|
import { testSegment } from "./testSegment";
|
|
6
6
|
import { testFeature } from "./testFeature";
|
|
@@ -9,11 +9,15 @@ import { Dependencies } from "../dependencies";
|
|
|
9
9
|
import { prettyDuration } from "./prettyDuration";
|
|
10
10
|
import { printTestResult } from "./printTestResult";
|
|
11
11
|
|
|
12
|
+
import { buildDatafile } from "../builder";
|
|
13
|
+
import { SCHEMA_VERSION } from "../config";
|
|
14
|
+
|
|
12
15
|
export interface TestProjectOptions {
|
|
13
16
|
keyPattern?: string;
|
|
14
17
|
assertionPattern?: string;
|
|
15
18
|
verbose?: boolean;
|
|
16
19
|
showDatafile?: boolean;
|
|
20
|
+
fast?: boolean;
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
export interface TestPatterns {
|
|
@@ -29,11 +33,16 @@ export interface ExecutionResult {
|
|
|
29
33
|
};
|
|
30
34
|
}
|
|
31
35
|
|
|
36
|
+
export interface DatafileContentByEnvironment {
|
|
37
|
+
[environment: string]: DatafileContent;
|
|
38
|
+
}
|
|
39
|
+
|
|
32
40
|
export async function executeTest(
|
|
33
41
|
testFile: string,
|
|
34
42
|
deps: Dependencies,
|
|
35
43
|
options: TestProjectOptions,
|
|
36
44
|
patterns: TestPatterns,
|
|
45
|
+
datafileContentByEnvironment: DatafileContentByEnvironment,
|
|
37
46
|
): Promise<ExecutionResult | undefined> {
|
|
38
47
|
const { datasource, projectConfig, rootDirectoryPath } = deps;
|
|
39
48
|
|
|
@@ -69,7 +78,14 @@ export async function executeTest(
|
|
|
69
78
|
if (type === "segment") {
|
|
70
79
|
testResult = await testSegment(datasource, tAsSegment, patterns);
|
|
71
80
|
} else {
|
|
72
|
-
testResult = await testFeature(
|
|
81
|
+
testResult = await testFeature(
|
|
82
|
+
datasource,
|
|
83
|
+
projectConfig,
|
|
84
|
+
tAsFeature,
|
|
85
|
+
options,
|
|
86
|
+
patterns,
|
|
87
|
+
datafileContentByEnvironment,
|
|
88
|
+
);
|
|
73
89
|
}
|
|
74
90
|
|
|
75
91
|
printTestResult(testResult, testFilePath, rootDirectoryPath);
|
|
@@ -124,8 +140,33 @@ export async function testProject(
|
|
|
124
140
|
let passedAssertionsCount = 0;
|
|
125
141
|
let failedAssertionsCount = 0;
|
|
126
142
|
|
|
143
|
+
const datafileContentByEnvironment: DatafileContentByEnvironment = {};
|
|
144
|
+
if (options.fast) {
|
|
145
|
+
for (const environment of projectConfig.environments) {
|
|
146
|
+
const existingState = await datasource.readState(environment);
|
|
147
|
+
const datafileContent = await buildDatafile(
|
|
148
|
+
projectConfig,
|
|
149
|
+
datasource,
|
|
150
|
+
{
|
|
151
|
+
schemaVersion: SCHEMA_VERSION,
|
|
152
|
+
revision: "include-all-features",
|
|
153
|
+
environment: environment,
|
|
154
|
+
},
|
|
155
|
+
existingState,
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
datafileContentByEnvironment[environment] = datafileContent;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
127
162
|
for (const testFile of testFiles) {
|
|
128
|
-
const executionResult = await executeTest(
|
|
163
|
+
const executionResult = await executeTest(
|
|
164
|
+
testFile,
|
|
165
|
+
deps,
|
|
166
|
+
options,
|
|
167
|
+
patterns,
|
|
168
|
+
datafileContentByEnvironment,
|
|
169
|
+
);
|
|
129
170
|
|
|
130
171
|
if (!executionResult) {
|
|
131
172
|
continue;
|