@toptal/davinci-ci 7.3.0 → 7.3.2

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Change Log
2
2
 
3
+ ## 7.3.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2376](https://github.com/toptal/davinci/pull/2376) [`edcf6971`](https://github.com/toptal/davinci/commit/edcf6971a1b97af0f38424e3174dad75e50f5aed) Thanks [@augustobmoura](https://github.com/augustobmoura)!
8
+ - bump new version of davinci-cli-shared on all projects
9
+
10
+ ## 7.3.1
11
+
12
+ ### Patch Changes
13
+
14
+ - [#2332](https://github.com/toptal/davinci/pull/2332) [`52995862`](https://github.com/toptal/davinci/commit/529958625a8bda2e74ef281a5ed0e6bfea109526) Thanks [@augustobmoura](https://github.com/augustobmoura)!
15
+
16
+ ### davinci-ci danger
17
+
18
+ - check danger against `origin/master`
19
+
3
20
  ## 7.3.0
4
21
 
5
22
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-ci",
3
- "version": "7.3.0",
3
+ "version": "7.3.2",
4
4
  "keywords": [
5
5
  "ci",
6
6
  "docker",
@@ -30,7 +30,7 @@
30
30
  "dependencies": {
31
31
  "@commitlint/cli": "^17.6.7",
32
32
  "@commitlint/config-conventional": "^17.1.0",
33
- "@toptal/davinci-cli-shared": "^2.3.9",
33
+ "@toptal/davinci-cli-shared": "^2.4.0",
34
34
  "chalk": "^4.1.2",
35
35
  "danger": "^11.2.2",
36
36
  "markdown-table": "^2.0.0"
@@ -1,13 +1,14 @@
1
1
  import {
2
2
  davinciProjectConfig,
3
- runSync,
4
3
  print,
5
4
  convertToCLIParameters,
6
5
  files,
6
+ $,
7
+ echo,
8
+ chalk,
7
9
  } from '@toptal/davinci-cli-shared'
8
- import chalk from 'chalk'
9
10
 
10
- export const dangerCommand = options => {
11
+ export const dangerCommand = async options => {
11
12
  print.header('Running danger check')
12
13
  const { local, dangerfile, ...rest } = options
13
14
  const dangerfilePath =
@@ -18,25 +19,20 @@ export const dangerCommand = options => {
18
19
  )
19
20
 
20
21
  if (davinciProjectConfig.master.conventionalCommits) {
21
- console.log(`\
22
- ${chalk.red(
23
- '[UNSUPPORTED]'
24
- )} Since https://toptal-core.atlassian.net/wiki/x/YQFawQ
25
- Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead.`)
22
+ const UNSUPPORTED = chalk.red('[UNSUPPORTED]')
23
+
24
+ echo(`${UNSUPPORTED} Since https://toptal-core.atlassian.net/wiki/x/YQFawQ`)
25
+ echo(
26
+ 'Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead.'
27
+ )
26
28
  process.exit(10)
27
29
  }
28
30
 
29
- runSync(
30
- 'yarn',
31
- [
32
- 'danger',
33
- local ? 'local' : 'ci',
34
- local ? '--failOnErrors' : undefined,
35
- '--dangerfile',
36
- `${dangerfilePath}`,
37
- ...convertToCLIParameters(rest),
38
- ].filter(Boolean)
39
- )
31
+ const scope = local ? 'local' : 'ci'
32
+ const extraArgs = convertToCLIParameters(rest)
33
+
34
+ // We use --base origin/master in case local master is not up to date, or diverging from remote
35
+ await $`yarn -s danger ${scope} --dangerfile ${dangerfilePath} --base origin/master ${extraArgs}`
40
36
  }
41
37
 
42
38
  export const createDangerCommand = program => {