@toptal/davinci-workflow 1.8.3-alpha-fx-2755-codebase-specific-workflows.20 → 1.8.3

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,14 @@
1
1
  # @toptal/davinci-workflow
2
2
 
3
+ ## 1.8.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#1343](https://github.com/toptal/davinci/pull/1343) [`1212e098`](https://github.com/toptal/davinci/commit/1212e098c668fc1c87ee9b1824edf0bc80509bc4) Thanks [@dmaklygin](https://github.com/dmaklygin)! - - implement custom helper for davinci workflow package
8
+
9
+ - Updated dependencies [[`1212e098`](https://github.com/toptal/davinci/commit/1212e098c668fc1c87ee9b1824edf0bc80509bc4)]:
10
+ - @toptal/davinci-cli-shared@1.5.2
11
+
3
12
  ## 1.8.2
4
13
 
5
14
  ### Patch Changes
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@toptal/davinci-workflow",
3
+ "version": "1.8.3",
4
+ "description": "GH Workflow generator package for frontend applications",
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "keywords": [
9
+ "Github Actions",
10
+ "GH Workflows",
11
+ "generator"
12
+ ],
13
+ "author": "Toptal",
14
+ "homepage": "https://github.com/toptal/davinci/tree/master/packages/workflow#readme",
15
+ "license": "ISC",
16
+ "bin": {
17
+ "davinci-workflow": "./bin/davinci-workflow.js"
18
+ },
19
+ "main": "./src/index.js",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/toptal/davinci.git"
23
+ },
24
+ "scripts": {
25
+ "build:package": "../../bin/build-package.js",
26
+ "prepublishOnly": "../../bin/prepublish.js",
27
+ "test": "echo \"Error: run tests from root\" && exit 1"
28
+ },
29
+ "bugs": {
30
+ "url": "https://github.com/toptal/davinci/issues"
31
+ },
32
+ "dependencies": {
33
+ "@toptal/davinci-cli-shared": "1.5.2",
34
+ "@toptal/davinci-skeleton": "7.0.0",
35
+ "fs-extra": "^9.0.1",
36
+ "lodash.kebabcase": "^4.1.1",
37
+ "ora": "^5.4.1",
38
+ "chalk": "^4.1.2",
39
+ "js-yaml": "^4.1.0"
40
+ }
41
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-workflow",
3
- "version": "1.8.3-alpha-fx-2755-codebase-specific-workflows.20+b2bc74b6",
3
+ "version": "1.8.3",
4
4
  "description": "GH Workflow generator package for frontend applications",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -30,14 +30,12 @@
30
30
  "url": "https://github.com/toptal/davinci/issues"
31
31
  },
32
32
  "dependencies": {
33
- "@toptal/davinci-cli-shared": "1.5.2-alpha-fx-2755-codebase-specific-workflows.131+b2bc74b6",
34
- "@toptal/davinci-monorepo": "6.5.1-alpha-fx-2755-codebase-specific-workflows.121+b2bc74b6",
35
- "@toptal/davinci-skeleton": "7.0.1-alpha-fx-2755-codebase-specific-workflows.20+b2bc74b6",
36
- "chalk": "^4.1.2",
33
+ "@toptal/davinci-cli-shared": "1.5.2",
34
+ "@toptal/davinci-skeleton": "7.0.0",
37
35
  "fs-extra": "^9.0.1",
38
- "js-yaml": "^4.1.0",
39
36
  "lodash.kebabcase": "^4.1.1",
40
- "ora": "^5.4.1"
41
- },
42
- "gitHead": "b2bc74b6947156d1489a42f820be1832f53b870d"
37
+ "ora": "^5.4.1",
38
+ "chalk": "^4.1.2",
39
+ "js-yaml": "^4.1.0"
40
+ }
43
41
  }
package/src/constants.js CHANGED
@@ -1,6 +1,5 @@
1
1
  const GITHUB_DIR = '.github'
2
2
  const WORKFLOWS_DIR = 'workflows'
3
- const CODEBASE_SPECIFIC_WORKFLOWS_DIR = 'codebase-specific-workflows'
4
3
 
5
4
  const SECRET_DEFINITION = {
6
5
  // common
@@ -28,6 +27,5 @@ const SECRET_DEFINITION = {
28
27
  module.exports = {
29
28
  GITHUB_DIR,
30
29
  WORKFLOWS_DIR,
31
- SECRET_DEFINITION,
32
- CODEBASE_SPECIFIC_WORKFLOWS_DIR
30
+ SECRET_DEFINITION
33
31
  }
@@ -1,15 +1,8 @@
1
- const {
2
- utils: { checkIfMonorepo }
3
- } = require('@toptal/davinci-monorepo')
4
1
  const path = require('path')
5
2
  const fs = require('fs-extra')
6
3
  const ora = require('ora')
7
4
 
8
- const {
9
- WORKFLOWS_DIR,
10
- GITHUB_DIR,
11
- CODEBASE_SPECIFIC_WORKFLOWS_DIR
12
- } = require('../constants')
5
+ const { WORKFLOWS_DIR, GITHUB_DIR } = require('../constants')
13
6
 
14
7
  const readPackageJson = folder => {
15
8
  const packageJsonFile = path.join(folder, 'package.json')
@@ -29,34 +22,7 @@ const writePackageJson = (folder, config) => {
29
22
  const getWorkflowSourceFilepath = fileName => {
30
23
  const skeletonPath = require.resolve('@toptal/davinci-skeleton')
31
24
 
32
- const srcFilepath = path.join(
33
- skeletonPath,
34
- '../..',
35
- GITHUB_DIR,
36
- WORKFLOWS_DIR,
37
- fileName
38
- )
39
-
40
- if (fs.existsSync(srcFilepath)) {
41
- return srcFilepath
42
- }
43
-
44
- const isMonorepo = checkIfMonorepo()
45
-
46
- const codebaseSpecificFilepath = path.join(
47
- skeletonPath,
48
- '../..',
49
- GITHUB_DIR,
50
- CODEBASE_SPECIFIC_WORKFLOWS_DIR,
51
- isMonorepo ? 'monorepo' : 'spa',
52
- fileName
53
- )
54
-
55
- if (!fs.existsSync(codebaseSpecificFilepath)) {
56
- throw new Error(`Workflow ${fileName} does not exist`)
57
- }
58
-
59
- return codebaseSpecificFilepath
25
+ return path.join(skeletonPath, '../..', GITHUB_DIR, WORKFLOWS_DIR, fileName)
60
26
  }
61
27
 
62
28
  const copyWorkflowFromSkeleton = async (fileName, destDir) => {