@toptal/davinci-ci 2.0.5-alpha-SP-2753-add-danger-file-command-option.14 → 2.0.5-alpha-SP-2753-add-danger-file-command-option.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-ci",
3
- "version": "2.0.5-alpha-SP-2753-add-danger-file-command-option.14+317c7dd3",
3
+ "version": "2.0.5-alpha-SP-2753-add-danger-file-command-option.16+a3ebeace",
4
4
  "description": "Continuos integrations tools for frontend projects",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -32,9 +32,9 @@
32
32
  "dependencies": {
33
33
  "@commitlint/cli": "^17.0.2",
34
34
  "@commitlint/config-conventional": "^17.0.2",
35
- "@toptal/davinci-cli-shared": "1.5.5-alpha-SP-2753-add-danger-file-command-option.14+317c7dd3",
35
+ "@toptal/davinci-cli-shared": "1.5.5-alpha-SP-2753-add-danger-file-command-option.16+a3ebeace",
36
36
  "danger": "^11.0.5",
37
37
  "markdown-table": "^2.0.0"
38
38
  },
39
- "gitHead": "317c7dd36d80cc460057a0ceb3b45bf60db3f4bc"
39
+ "gitHead": "a3ebeace4542e507f889c87c381fde285708103a"
40
40
  }
@@ -15,10 +15,6 @@ const commandOptions = [
15
15
  label: 'checks commit message quality locally',
16
16
  name: '--local',
17
17
  },
18
- {
19
- label: 'checks commit message quality locally',
20
- name: '--local',
21
- },
22
18
  {
23
19
  label: 'specify custom danger file',
24
20
  name: '--dangerfile',
@@ -39,10 +35,15 @@ const dangerCommand = ({ options }) => {
39
35
  'src/configs/danger/toptal/dangerfile.js'
40
36
  )
41
37
 
42
- const dangerfilePath =
43
- dangerfile ?? davinciProjectConfig.master.conventionalCommits
38
+ let dangerfilePath = dangerfile
39
+
40
+ print.green(`Display danger file dangerfilePath -- : ${dangerfilePath}`)
41
+
42
+ if (!dangerfilePath) {
43
+ dangerfilePath = davinciProjectConfig.master.conventionalCommits
44
44
  ? conventionalCommitsDangerfilePath
45
45
  : toptalCommitsDangerfilePath
46
+ }
46
47
 
47
48
  runSync(
48
49
  'yarn',
@@ -63,6 +64,9 @@ const dangerCommandCreator = {
63
64
  command: 'danger',
64
65
  description: 'Run danger check',
65
66
  options: commandOptions,
67
+ types: {
68
+ string: ['dangerfile'],
69
+ },
66
70
  }
67
71
 
68
72
  module.exports = dangerCommandCreator