@toptal/davinci-ci 5.0.2-alpha-fx-4452-add-tailwindcss-in-davinci-01ccaca7.4 → 6.0.1-alpha-fx-4497-storybook-1c02d54a.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#2208](https://github.com/toptal/davinci/pull/2208) [`0243e42b`](https://github.com/toptal/davinci/commit/0243e42bc12c18acb6c225db73b78729c0b6b422) Thanks [@augustobmoura](https://github.com/augustobmoura)!
8
+
9
+ ### davinci-ci danger
10
+
11
+ - remove support for conventional commits
12
+
13
+ ### Patch Changes
14
+
15
+ - [#2215](https://github.com/toptal/davinci/pull/2215) [`7736531e`](https://github.com/toptal/davinci/commit/7736531ebe7d77990f096136f1662c446362428b) Thanks [@TomasSlama](https://github.com/TomasSlama)!
16
+ - bump davinci-cli-shared
17
+
3
18
  ## 5.0.1
4
19
 
5
20
  ### Patch Changes
package/README.md CHANGED
@@ -16,8 +16,6 @@ Use it by installing `yarn add @toptal/davinci-ci` in your project.
16
16
 
17
17
  - `davinci-ci danger` - checks if the PR title and and commit messages comply with [Toptal's standards](https://toptal-core.atlassian.net/wiki/spaces/ENG/pages/210665897/Commit+Message+Quality)
18
18
 
19
- - `davinci-ci danger --conventionalCommits` - checks if the PR title and and commit messages comply with [ConventionalCommits](https://www.conventionalcommits.org/en/v1.0.0/)
20
-
21
19
  To check commit message quality locally just add `--local` argument
22
20
 
23
21
  `davinci-ci danger --local`
@@ -47,7 +45,6 @@ master:
47
45
  deploy_staging: false
48
46
  deploy_storybook_staging: false
49
47
  deploy: false
50
- conventional_commits: false # danger check will require each commit to follow convential commits
51
48
  require_assignee: false # danger check will require each PR to have assignee
52
49
  require_assignee_whitelist: ['dependabot-preview[bot]', 'dependabot[bot]']
53
50
 
package/package.json CHANGED
@@ -1,18 +1,17 @@
1
1
  {
2
2
  "name": "@toptal/davinci-ci",
3
- "version": "5.0.2-alpha-fx-4452-add-tailwindcss-in-davinci-01ccaca7.4+01ccaca7",
4
- "description": "Continuos integrations tools for frontend projects",
5
- "publishConfig": {
6
- "access": "public"
7
- },
3
+ "version": "6.0.1-alpha-fx-4497-storybook-1c02d54a.1+1c02d54a",
8
4
  "keywords": [
9
- "jenkins",
5
+ "ci",
10
6
  "docker",
11
- "ci"
7
+ "jenkins"
12
8
  ],
9
+ "description": "Continuos integrations tools for frontend projects",
10
+ "repository": "toptal/davinci.git",
13
11
  "author": "Toptal",
14
- "homepage": "https://github.com/toptal/davinci/tree/master/packages/ci#readme",
15
12
  "license": "SEE LICENSE IN LICENSE.MD",
13
+ "bugs": "https://github.com/toptal/davinci/issues",
14
+ "homepage": "https://github.com/toptal/davinci/tree/master/packages/ci#readme",
16
15
  "bin": {
17
16
  "davinci-ci": "./bin/davinci-ci.js"
18
17
  },
@@ -25,25 +24,22 @@
25
24
  "src",
26
25
  "CHANGELOG.md"
27
26
  ],
28
- "repository": {
29
- "type": "git",
30
- "url": "git+https://github.com/toptal/davinci.git"
31
- },
32
27
  "scripts": {
33
28
  "test": "NODE_OPTIONS='--experimental-vm-modules --no-warnings' yarn jest"
34
29
  },
35
- "bugs": {
36
- "url": "https://github.com/toptal/davinci/issues"
37
- },
38
30
  "dependencies": {
39
31
  "@commitlint/cli": "^17.6.7",
40
32
  "@commitlint/config-conventional": "^17.1.0",
41
- "@toptal/davinci-cli-shared": "2.3.8-alpha-fx-4452-add-tailwindcss-in-davinci-01ccaca7.35+01ccaca7",
33
+ "@toptal/davinci-cli-shared": "2.3.10-alpha-fx-4497-storybook-1c02d54a.8+1c02d54a",
34
+ "chalk": "^4.1.2",
42
35
  "danger": "^11.2.2",
43
36
  "markdown-table": "^2.0.0"
44
37
  },
45
38
  "devDependencies": {
46
- "@jest/globals": "^29.4.2"
39
+ "@jest/globals": "^29.7.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
47
43
  },
48
- "gitHead": "01ccaca72ef6505aee5d52146938a1b15d33e18f"
44
+ "gitHead": "1c02d54a78ae5071678a0fed9a7eb172291ce0fe"
49
45
  }
@@ -5,25 +5,27 @@ import {
5
5
  convertToCLIParameters,
6
6
  files,
7
7
  } from '@toptal/davinci-cli-shared'
8
+ import chalk from 'chalk'
8
9
 
9
10
  export const dangerCommand = options => {
10
11
  print.header('Running danger check')
11
12
  const { local, dangerfile, ...rest } = options
12
- const conventionalCommitsDangerfilePath = files.getPackageFilePath(
13
- '@toptal/davinci-ci',
14
- 'src/configs/danger/conventional-commits/dangerfile.cjs'
15
- )
16
- const toptalCommitsDangerfilePath = files.getPackageFilePath(
17
- '@toptal/davinci-ci',
18
- 'src/configs/danger/toptal/dangerfile.cjs'
19
- )
20
- let dangerfilePath = dangerfile
13
+ const dangerfilePath =
14
+ dangerfile ??
15
+ files.getPackageFilePath(
16
+ '@toptal/davinci-ci',
17
+ 'src/configs/danger/toptal/dangerfile.cjs'
18
+ )
21
19
 
22
- if (!dangerfilePath) {
23
- dangerfilePath = davinciProjectConfig.master.conventionalCommits
24
- ? conventionalCommitsDangerfilePath
25
- : toptalCommitsDangerfilePath
20
+ 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.`)
26
+ process.exit(10)
26
27
  }
28
+
27
29
  runSync(
28
30
  'yarn',
29
31
  [
package/src/index.cjs CHANGED
@@ -1,11 +1,16 @@
1
+ const chalk = require('chalk')
2
+
1
3
  const toptalPlugins = require('./configs/danger/toptal/plugins/index.cjs')
2
- const conventionalCommitsPlugins = require('./configs/danger/conventional-commits/plugins/index.cjs')
3
4
 
4
5
  module.exports = {
5
6
  plugins: {
6
- conventionalCommit: {
7
- PRTitle: conventionalCommitsPlugins.conventionalPRTitle,
8
- commits: conventionalCommitsPlugins.conventionalCommits,
7
+ get conventionalCommit() {
8
+ console.log(`\
9
+ ${chalk.red(
10
+ '[UNSUPPORTED]'
11
+ )} Since https://toptal-core.atlassian.net/wiki/x/YQFawQ
12
+ Convention commits are now discouraged, support for it on davinci have been removed. Please use toptal commits instead.`)
13
+ throw Error('conventionalCommit is not supported anymore')
9
14
  },
10
15
  toptal: {
11
16
  PRTitle: toptalPlugins.toptalPRTitle,
@@ -1,23 +0,0 @@
1
- const { schedule } = require('danger')
2
- const {
3
- config: davinciProjectConfig,
4
- } = require('@toptal/davinci-cli-shared/config')
5
-
6
- const {
7
- conventionalCommits,
8
- } = require('./plugins/conventional-commits/index.cjs')
9
- const {
10
- conventionalPRTitle,
11
- } = require('./plugins/conventional-pr-title/index.cjs')
12
- const { checkAssigneeExist } = require('../plugins/empty-assignee.cjs')
13
-
14
- schedule(conventionalCommits)
15
- schedule(conventionalPRTitle)
16
-
17
- const {
18
- master: { requireAssignee },
19
- } = davinciProjectConfig
20
-
21
- if (requireAssignee) {
22
- schedule(checkAssigneeExist)
23
- }
@@ -1,52 +0,0 @@
1
- /* globals danger, fail */
2
- /* eslint-disable import/no-extraneous-dependencies */
3
- const { default: load } = require('@commitlint/load')
4
- const { default: lint } = require('@commitlint/lint')
5
- /* eslint-enable */
6
- const table = require('markdown-table')
7
-
8
- const { WHITELISTED_USERS } = require('../../../toptal/config.cjs')
9
-
10
- const conventionalCommits = async () => {
11
- if (
12
- danger.github &&
13
- WHITELISTED_USERS.includes(danger.github.pr.user.login)
14
- ) {
15
- return
16
- }
17
-
18
- const { commits } = danger.git
19
- const { rules, parserPreset } = await load({
20
- extends: ['@commitlint/config-conventional'],
21
- })
22
-
23
- commits.forEach(async commit => {
24
- const result = await lint(
25
- commit.message,
26
- rules,
27
- parserPreset ? { parserOpts: parserPreset.parserOpts } : {}
28
- )
29
-
30
- if (!result.valid) {
31
- if (result.errors.length > 0) {
32
- let message = `The commit - ${commit.sha.trim()} doesn't conform the conventional commit guidelines. \n\n**Errors**:\n\n`
33
-
34
- message += table([
35
- ['Message'],
36
- ...result.errors.map(error => [error.message]),
37
- ])
38
-
39
- message +=
40
- '\n\nšŸ’” For a guidance on how to fix this problem please refer to [https://www.conventionalcommits.org](https://www.conventionalcommits.org)'
41
- message +=
42
- '\n\nšŸ’” Or you can check our [documentation](https://github.com/toptal/picasso/blob/master/docs/contribution/github-workflow.md#general-commit-message-pattern)'
43
-
44
- fail(message)
45
- }
46
- }
47
- })
48
- }
49
-
50
- module.exports = {
51
- conventionalCommits,
52
- }
@@ -1,53 +0,0 @@
1
- /// <reference types="danger" />
2
- /* globals danger, fail */
3
- /* eslint-disable import/no-extraneous-dependencies */
4
- const { default: load } = require('@commitlint/load')
5
- const { default: lint } = require('@commitlint/lint')
6
- /* eslint-enable */
7
- const table = require('markdown-table')
8
-
9
- const { WHITELISTED_USERS } = require('../../../toptal/config.cjs')
10
-
11
- const conventionalPRTitle = async () => {
12
- if (!danger.github) {
13
- return
14
- }
15
-
16
- if (WHITELISTED_USERS.includes(danger.github.pr.user.login)) {
17
- return
18
- }
19
-
20
- const { rules, parserPreset } = await load({
21
- extends: ['@commitlint/config-conventional'],
22
- })
23
- const { title } = danger.github.pr
24
-
25
- const result = await lint(
26
- title,
27
- rules,
28
- parserPreset ? { parserOpts: parserPreset.parserOpts } : {}
29
- )
30
-
31
- if (!result.valid) {
32
- if (result.errors.length > 0) {
33
- let message =
34
- "PR title doesn't conform the conventional commit guidelines. \n\n**Errors**:\n\n"
35
-
36
- message += table([
37
- ['Message'],
38
- ...result.errors.map(error => [error.message]),
39
- ])
40
-
41
- message +=
42
- '\n\nšŸ’” For a guidance on how to fix this problem please refer to [https://www.conventionalcommits.org](https://www.conventionalcommits.org)'
43
- message +=
44
- '\n\nšŸ’” Or you can check our [documentation](https://github.com/toptal/picasso/blob/master/docs/contribution/github-workflow.md#general-commit-message-pattern)'
45
-
46
- fail(message)
47
- }
48
- }
49
- }
50
-
51
- module.exports = {
52
- conventionalPRTitle,
53
- }
@@ -1,7 +0,0 @@
1
- const { conventionalCommits } = require('./conventional-commits/index.cjs')
2
- const { conventionalPRTitle } = require('./conventional-pr-title/index.cjs')
3
-
4
- module.exports = {
5
- conventionalCommits,
6
- conventionalPRTitle,
7
- }