@featurevisor/cli
Advanced tools
Comparing version 1.18.1 to 1.19.0
@@ -6,2 +6,13 @@ # Change Log | ||
# [1.19.0](https://github.com/featurevisor/featurevisor/compare/v1.18.1...v1.19.0) (2024-04-26) | ||
### Features | ||
* find duplicate segments with authors info ([#299](https://github.com/featurevisor/featurevisor/issues/299)) ([5008066](https://github.com/featurevisor/featurevisor/commit/5008066128fb7c732b633856dcffcb768f52c88c)) | ||
## [1.18.1](https://github.com/featurevisor/featurevisor/compare/v1.18.0...v1.18.1) (2024-04-23) | ||
@@ -8,0 +19,0 @@ |
@@ -41,4 +41,4 @@ "use strict"; | ||
var path = require("path"); | ||
var yargs = require("yargs"); | ||
var core_1 = require("@featurevisor/core"); | ||
var yargs = require("yargs"); // eslint-disable-line @typescript-eslint/no-var-requires | ||
process.on("unhandledRejection", function (reason) { | ||
@@ -62,8 +62,9 @@ console.error(reason); | ||
return __awaiter(this, void 0, void 0, function () { | ||
var projectConfig, datasource; | ||
var useRootDirectoryPath, projectConfig, datasource; | ||
return __generator(this, function (_a) { | ||
projectConfig = requireAndGetProjectConfig(rootDirectoryPath); | ||
datasource = new core_1.Datasource(projectConfig, rootDirectoryPath); | ||
useRootDirectoryPath = options.rootDirectoryPath || rootDirectoryPath; | ||
projectConfig = requireAndGetProjectConfig(useRootDirectoryPath); | ||
datasource = new core_1.Datasource(projectConfig, useRootDirectoryPath); | ||
return [2 /*return*/, { | ||
rootDirectoryPath: rootDirectoryPath, | ||
rootDirectoryPath: useRootDirectoryPath, | ||
projectConfig: projectConfig, | ||
@@ -322,3 +323,5 @@ datasource: datasource, | ||
_a.trys.push([2, 4, , 5]); | ||
return [4 /*yield*/, (0, core_1.findDuplicateSegmentsInProject)(deps)]; | ||
return [4 /*yield*/, (0, core_1.findDuplicateSegmentsInProject)(deps, { | ||
authors: options.authors, | ||
})]; | ||
case 3: | ||
@@ -339,2 +342,3 @@ _a.sent(); | ||
.example("$0 find-duplicate-segments", "list segments with same conditions") | ||
.example("$0 find-duplicate-segments --authors", "show the duplicates along with author names") | ||
/** | ||
@@ -341,0 +345,0 @@ * Find usage |
{ | ||
"name": "@featurevisor/cli", | ||
"version": "1.18.1", | ||
"version": "1.19.0", | ||
"description": "CLI package of Featurevisor", | ||
@@ -50,3 +50,3 @@ "main": "bin.js", | ||
"dependencies": { | ||
"@featurevisor/core": "^1.18.1", | ||
"@featurevisor/core": "^1.19.0", | ||
"yargs": "^17.6.2" | ||
@@ -57,3 +57,3 @@ }, | ||
}, | ||
"gitHead": "5a1572d908a0aa9fcdcb5fe208cee8c0f17f7b4f" | ||
"gitHead": "7164b8bdd056f9302ead794acf7424df98345f45" | ||
} |
import * as fs from "fs"; | ||
import * as path from "path"; | ||
import * as yargs from "yargs"; | ||
import { | ||
@@ -31,2 +29,4 @@ CONFIG_MODULE_NAME, | ||
const yargs = require("yargs"); // eslint-disable-line @typescript-eslint/no-var-requires | ||
process.on("unhandledRejection", (reason) => { | ||
@@ -56,7 +56,9 @@ console.error(reason); | ||
async function getDependencies(options): Promise<Dependencies> { | ||
const projectConfig = requireAndGetProjectConfig(rootDirectoryPath); | ||
const datasource = new Datasource(projectConfig, rootDirectoryPath); | ||
const useRootDirectoryPath = options.rootDirectoryPath || rootDirectoryPath; | ||
const projectConfig = requireAndGetProjectConfig(useRootDirectoryPath); | ||
const datasource = new Datasource(projectConfig, useRootDirectoryPath); | ||
return { | ||
rootDirectoryPath, | ||
rootDirectoryPath: useRootDirectoryPath, | ||
projectConfig, | ||
@@ -233,3 +235,5 @@ datasource, | ||
try { | ||
await findDuplicateSegmentsInProject(deps); | ||
await findDuplicateSegmentsInProject(deps, { | ||
authors: options.authors, | ||
}); | ||
} catch (e) { | ||
@@ -242,2 +246,3 @@ console.error(e.message); | ||
.example("$0 find-duplicate-segments", "list segments with same conditions") | ||
.example("$0 find-duplicate-segments --authors", "show the duplicates along with author names") | ||
@@ -244,0 +249,0 @@ /** |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
86136
970
Updated@featurevisor/core@^1.19.0