@toptal/davinci-ci 3.1.1-alpha-fx-3561-collect-execution-time-per-command-in-davinci-424491f5.10 → 3.1.1-alpha-test-increase-chunks-size-4c2aa496.4
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/bin/davinci-ci.js +4 -3
- package/package.json +5 -9
- package/src/commands/danger.js +5 -5
- package/src/configs/danger/conventional-commits/{dangerfile.cjs → dangerfile.js} +4 -10
- package/src/configs/danger/conventional-commits/plugins/conventional-commits/{index.cjs → index.js} +1 -1
- package/src/configs/danger/conventional-commits/plugins/conventional-pr-title/{index.cjs → index.js} +1 -1
- package/src/configs/danger/conventional-commits/plugins/{index.cjs → index.js} +2 -2
- package/src/configs/danger/plugins/{empty-assignee.cjs → empty-assignee.js} +1 -3
- package/src/configs/danger/toptal/{config.cjs → config.js} +0 -0
- package/src/configs/danger/toptal/{dangerfile.cjs → dangerfile.js} +4 -6
- package/src/configs/danger/toptal/plugins/index.js +7 -0
- package/src/configs/danger/toptal/plugins/toptal-commits/{index.cjs → index.js} +1 -1
- package/src/configs/danger/toptal/plugins/toptal-commits/toptal-commits.test.js +1 -5
- package/src/configs/danger/toptal/plugins/toptal-pr-title/{index.cjs → index.js} +1 -1
- package/src/configs/danger/toptal/plugins/toptal-pr-title/toptal-pr-title.test.js +3 -5
- package/src/{index.cjs → index.js} +4 -2
- package/src/configs/danger/toptal/plugins/index.cjs +0 -7
package/bin/davinci-ci.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import cliEngine from '@toptal/davinci-cli-shared'
|
|
3
2
|
|
|
4
|
-
|
|
3
|
+
const cliEngine = require('@toptal/davinci-cli-shared')
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
const { commands } = require('../src')
|
|
6
|
+
|
|
7
|
+
cliEngine.loadCommands(commands, 'davinci-ci')
|
|
7
8
|
cliEngine.bootstrap()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toptal/davinci-ci",
|
|
3
|
-
"version": "3.1.1-alpha-
|
|
3
|
+
"version": "3.1.1-alpha-test-increase-chunks-size-4c2aa496.4+4c2aa496",
|
|
4
4
|
"description": "Continuos integrations tools for frontend projects",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"bin": {
|
|
17
17
|
"davinci-ci": "./bin/davinci-ci.js"
|
|
18
18
|
},
|
|
19
|
-
"
|
|
20
|
-
"exports": "./src/index.cjs",
|
|
19
|
+
"main": "src/index.js",
|
|
21
20
|
"files": [
|
|
22
21
|
"src",
|
|
23
22
|
"CHANGELOG.md"
|
|
@@ -27,7 +26,7 @@
|
|
|
27
26
|
"url": "git+https://github.com/toptal/davinci.git"
|
|
28
27
|
},
|
|
29
28
|
"scripts": {
|
|
30
|
-
"test": "
|
|
29
|
+
"test": "echo \"Error: run tests from root\" && exit 1"
|
|
31
30
|
},
|
|
32
31
|
"bugs": {
|
|
33
32
|
"url": "https://github.com/toptal/davinci/issues"
|
|
@@ -35,12 +34,9 @@
|
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"@commitlint/cli": "^17.4.0",
|
|
37
36
|
"@commitlint/config-conventional": "^17.1.0",
|
|
38
|
-
"@toptal/davinci-cli-shared": "1.10.3-alpha-
|
|
37
|
+
"@toptal/davinci-cli-shared": "1.10.3-alpha-test-increase-chunks-size-4c2aa496.6+4c2aa496",
|
|
39
38
|
"danger": "^11.0.7",
|
|
40
39
|
"markdown-table": "^2.0.0"
|
|
41
40
|
},
|
|
42
|
-
"
|
|
43
|
-
"@jest/globals": "28.1.0"
|
|
44
|
-
},
|
|
45
|
-
"gitHead": "424491f50396d7dad288fd18495c546618203234"
|
|
41
|
+
"gitHead": "4c2aa4960e5649d3b0bc0fe5df9603e08c9f8368"
|
|
46
42
|
}
|
package/src/commands/danger.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
const {
|
|
2
2
|
davinciProjectConfig,
|
|
3
3
|
runSync,
|
|
4
4
|
print,
|
|
5
5
|
convertToCLIParameters,
|
|
6
6
|
files,
|
|
7
|
-
}
|
|
7
|
+
} = require('@toptal/davinci-cli-shared')
|
|
8
8
|
|
|
9
9
|
const commandOptions = [
|
|
10
10
|
{
|
|
@@ -28,11 +28,11 @@ const dangerCommand = ({ options }) => {
|
|
|
28
28
|
|
|
29
29
|
const conventionalCommitsDangerfilePath = files.getPackageFilePath(
|
|
30
30
|
'@toptal/davinci-ci',
|
|
31
|
-
'src/configs/danger/conventional-commits/dangerfile.
|
|
31
|
+
'src/configs/danger/conventional-commits/dangerfile.js'
|
|
32
32
|
)
|
|
33
33
|
const toptalCommitsDangerfilePath = files.getPackageFilePath(
|
|
34
34
|
'@toptal/davinci-ci',
|
|
35
|
-
'src/configs/danger/toptal/dangerfile.
|
|
35
|
+
'src/configs/danger/toptal/dangerfile.js'
|
|
36
36
|
)
|
|
37
37
|
|
|
38
38
|
let dangerfilePath = dangerfile
|
|
@@ -64,4 +64,4 @@ const dangerCommandCreator = {
|
|
|
64
64
|
options: commandOptions,
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
module.exports = dangerCommandCreator
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
const { schedule } = require('danger')
|
|
2
|
-
const {
|
|
3
|
-
config: davinciProjectConfig,
|
|
4
|
-
} = require('@toptal/davinci-cli-shared/config')
|
|
2
|
+
const { davinciProjectConfig } = require('@toptal/davinci-cli-shared')
|
|
5
3
|
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
} = require('
|
|
9
|
-
const {
|
|
10
|
-
conventionalPRTitle,
|
|
11
|
-
} = require('./plugins/conventional-pr-title/index.cjs')
|
|
12
|
-
const { checkAssigneeExist } = require('../plugins/empty-assignee.cjs')
|
|
4
|
+
const { conventionalCommits } = require('./plugins/conventional-commits')
|
|
5
|
+
const { conventionalPRTitle } = require('./plugins/conventional-pr-title')
|
|
6
|
+
const { checkAssigneeExist } = require('../plugins/empty-assignee')
|
|
13
7
|
|
|
14
8
|
schedule(conventionalCommits)
|
|
15
9
|
schedule(conventionalPRTitle)
|
package/src/configs/danger/conventional-commits/plugins/conventional-commits/{index.cjs → index.js}
RENAMED
|
@@ -5,7 +5,7 @@ const { default: lint } = require('@commitlint/lint')
|
|
|
5
5
|
/* eslint-enable */
|
|
6
6
|
const table = require('markdown-table')
|
|
7
7
|
|
|
8
|
-
const { WHITELISTED_USERS } = require('../../../toptal/config
|
|
8
|
+
const { WHITELISTED_USERS } = require('../../../toptal/config')
|
|
9
9
|
|
|
10
10
|
const conventionalCommits = async () => {
|
|
11
11
|
if (
|
package/src/configs/danger/conventional-commits/plugins/conventional-pr-title/{index.cjs → index.js}
RENAMED
|
@@ -6,7 +6,7 @@ const { default: lint } = require('@commitlint/lint')
|
|
|
6
6
|
/* eslint-enable */
|
|
7
7
|
const table = require('markdown-table')
|
|
8
8
|
|
|
9
|
-
const { WHITELISTED_USERS } = require('../../../toptal/config
|
|
9
|
+
const { WHITELISTED_USERS } = require('../../../toptal/config')
|
|
10
10
|
|
|
11
11
|
const conventionalPRTitle = async () => {
|
|
12
12
|
if (!danger.github) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const { conventionalCommits } = require('./conventional-commits
|
|
2
|
-
const { conventionalPRTitle } = require('./conventional-pr-title
|
|
1
|
+
const { conventionalCommits } = require('./conventional-commits')
|
|
2
|
+
const { conventionalPRTitle } = require('./conventional-pr-title')
|
|
3
3
|
|
|
4
4
|
module.exports = {
|
|
5
5
|
conventionalCommits,
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="danger" />
|
|
2
2
|
/* globals danger, fail */
|
|
3
|
-
const {
|
|
4
|
-
config: davinciProjectConfig,
|
|
5
|
-
} = require('@toptal/davinci-cli-shared/config')
|
|
3
|
+
const { davinciProjectConfig } = require('@toptal/davinci-cli-shared')
|
|
6
4
|
|
|
7
5
|
const {
|
|
8
6
|
master: { requireAssigneeWhiteList = [] },
|
|
File without changes
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
const { schedule } = require('danger')
|
|
2
|
-
const {
|
|
3
|
-
config: davinciProjectConfig,
|
|
4
|
-
} = require('@toptal/davinci-cli-shared/config')
|
|
2
|
+
const { davinciProjectConfig } = require('@toptal/davinci-cli-shared')
|
|
5
3
|
|
|
6
|
-
const { toptalCommits } = require('./plugins/toptal-commits
|
|
7
|
-
const { toptalPRTitle } = require('./plugins/toptal-pr-title
|
|
8
|
-
const { checkAssigneeExist } = require('../plugins/empty-assignee
|
|
4
|
+
const { toptalCommits } = require('./plugins/toptal-commits')
|
|
5
|
+
const { toptalPRTitle } = require('./plugins/toptal-pr-title')
|
|
6
|
+
const { checkAssigneeExist } = require('../plugins/empty-assignee')
|
|
9
7
|
|
|
10
8
|
schedule(toptalCommits)
|
|
11
9
|
schedule(toptalPRTitle)
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import toptalCommitsModule from './index.cjs'
|
|
4
|
-
|
|
5
|
-
const { toptalCommits } = toptalCommitsModule
|
|
1
|
+
const { toptalCommits } = require('.')
|
|
6
2
|
|
|
7
3
|
const prepareCommitsWithMessages = (messages = []) => ({
|
|
8
4
|
commits: messages.map(message => ({
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { toptalPRTitle } from './index.cjs'
|
|
4
|
-
import {
|
|
1
|
+
const { toptalPRTitle } = require('.')
|
|
2
|
+
const {
|
|
5
3
|
MISSING_TICKET_CODE_ERROR_MESSAGE,
|
|
6
4
|
DEFAULT_PR_TITLE_ERROR_MESSAGE,
|
|
7
|
-
}
|
|
5
|
+
} = require('../../config')
|
|
8
6
|
|
|
9
7
|
const VALID_PR_TITLE = '[ASD-123] Hello world'
|
|
10
8
|
const INVALID_PR_TITLE = '[ASD-123] hello world'
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
1
|
+
const dangerCommandCreator = require('./commands/danger')
|
|
2
|
+
const toptalPlugins = require('./configs/danger/toptal/plugins')
|
|
3
|
+
const conventionalCommitsPlugins = require('./configs/danger/conventional-commits/plugins')
|
|
3
4
|
|
|
4
5
|
module.exports = {
|
|
6
|
+
commands: [dangerCommandCreator],
|
|
5
7
|
plugins: {
|
|
6
8
|
conventionalCommit: {
|
|
7
9
|
PRTitle: conventionalCommitsPlugins.conventionalPRTitle,
|