@toptal/davinci-monorepo 8.2.3-alpha-feat-add-pnpm-support-to-graphql-codegen-9cd18118.74 → 8.2.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 +7 -0
 - package/package.json +9 -10
 - package/src/utils/check-if-monorepo.js +2 -14
 
    
        package/CHANGELOG.md
    CHANGED
    
    | 
         @@ -1,5 +1,12 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            # @toptal/davinci-monorepo
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
      
 3 
     | 
    
         
            +
            ## 8.2.3
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            ### Patch Changes
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            - Updated dependencies [[`1f5aa922`](https://github.com/toptal/davinci/commit/1f5aa922273631b639c5e2be4a16b4d31997e9ae)]:
         
     | 
| 
      
 8 
     | 
    
         
            +
              - @toptal/davinci-cli-shared@2.3.3
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       3 
10 
     | 
    
         
             
            ## 8.2.2
         
     | 
| 
       4 
11 
     | 
    
         | 
| 
       5 
12 
     | 
    
         
             
            ### Patch Changes
         
     | 
    
        package/package.json
    CHANGED
    
    | 
         @@ -1,6 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            {
         
     | 
| 
       2 
2 
     | 
    
         
             
              "name": "@toptal/davinci-monorepo",
         
     | 
| 
       3 
     | 
    
         
            -
              "version": "8.2.3 
     | 
| 
      
 3 
     | 
    
         
            +
              "version": "8.2.3",
         
     | 
| 
       4 
4 
     | 
    
         
             
              "description": "Monorepo utility tools",
         
     | 
| 
       5 
5 
     | 
    
         
             
              "publishConfig": {
         
     | 
| 
       6 
6 
     | 
    
         
             
                "access": "public"
         
     | 
| 
         @@ -33,26 +33,25 @@ 
     | 
|
| 
       33 
33 
     | 
    
         
             
                "url": "https://github.com/toptal/davinci/issues"
         
     | 
| 
       34 
34 
     | 
    
         
             
              },
         
     | 
| 
       35 
35 
     | 
    
         
             
              "dependencies": {
         
     | 
| 
       36 
     | 
    
         
            -
                "@nodelib/fs.walk": "^1.2.6",
         
     | 
| 
       37 
36 
     | 
    
         
             
                "@oclif/core": "^1.16.1",
         
     | 
| 
       38 
     | 
    
         
            -
                "@toptal/davinci-cli-shared": "2.3.3 
     | 
| 
      
 37 
     | 
    
         
            +
                "@toptal/davinci-cli-shared": "2.3.3",
         
     | 
| 
       39 
38 
     | 
    
         
             
                "chalk": "^4.1.2",
         
     | 
| 
       40 
     | 
    
         
            -
                "codeowners": "5.1.1",
         
     | 
| 
       41 
39 
     | 
    
         
             
                "dependency-cruiser": "^12.5.0",
         
     | 
| 
       42 
     | 
    
         
            -
                "ervy": "^1.0.7",
         
     | 
| 
       43 
40 
     | 
    
         
             
                "execa": "^5.1.1",
         
     | 
| 
       44 
     | 
    
         
            -
                "find-up": "5.0.0",
         
     | 
| 
       45 
41 
     | 
    
         
             
                "find-yarn-workspace-root": "^2.0.0",
         
     | 
| 
       46 
42 
     | 
    
         
             
                "glob": "^8.0.3",
         
     | 
| 
      
 43 
     | 
    
         
            +
                "ramda": "^0.28.0",
         
     | 
| 
      
 44 
     | 
    
         
            +
                "@nodelib/fs.walk": "^1.2.6",
         
     | 
| 
      
 45 
     | 
    
         
            +
                "ervy": "^1.0.7",
         
     | 
| 
      
 46 
     | 
    
         
            +
                "find-up": "5.0.0",
         
     | 
| 
       47 
47 
     | 
    
         
             
                "ignore": "^5.2.0",
         
     | 
| 
       48 
48 
     | 
    
         
             
                "is-directory": "^0.3.1",
         
     | 
| 
       49 
49 
     | 
    
         
             
                "lodash": "4.17.21",
         
     | 
| 
       50 
50 
     | 
    
         
             
                "ora": "^5.4.1",
         
     | 
| 
       51 
     | 
    
         
            -
                " 
     | 
| 
       52 
     | 
    
         
            -
                " 
     | 
| 
      
 51 
     | 
    
         
            +
                "true-case-path": "^1.0.3",
         
     | 
| 
      
 52 
     | 
    
         
            +
                "codeowners": "5.1.1"
         
     | 
| 
       53 
53 
     | 
    
         
             
              },
         
     | 
| 
       54 
54 
     | 
    
         
             
              "devDependencies": {
         
     | 
| 
       55 
55 
     | 
    
         
             
                "@jest/globals": "^29.4.2"
         
     | 
| 
       56 
     | 
    
         
            -
              } 
     | 
| 
       57 
     | 
    
         
            -
              "gitHead": "9cd18118b2328cf7eba0e4375bc4f2cb7c847488"
         
     | 
| 
      
 56 
     | 
    
         
            +
              }
         
     | 
| 
       58 
57 
     | 
    
         
             
            }
         
     | 
| 
         @@ -1,5 +1,4 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            import execaLib from 'execa'
         
     | 
| 
       2 
     | 
    
         
            -
            import findUp from 'find-up'
         
     | 
| 
       3 
2 
     | 
    
         | 
| 
       4 
3 
     | 
    
         
             
            const yarnCommandExists = commandToRun => {
         
     | 
| 
       5 
4 
     | 
    
         
             
              try {
         
     | 
| 
         @@ -13,12 +12,6 @@ const yarnCommandExists = commandToRun => { 
     | 
|
| 
       13 
12 
     | 
    
         
             
              return true
         
     | 
| 
       14 
13 
     | 
    
         
             
            }
         
     | 
| 
       15 
14 
     | 
    
         | 
| 
       16 
     | 
    
         
            -
            const isPNPMWorkspace = () => {
         
     | 
| 
       17 
     | 
    
         
            -
              const cwd = process.cwd()
         
     | 
| 
       18 
     | 
    
         
            -
             
     | 
| 
       19 
     | 
    
         
            -
              return findUp.sync.exists('pnpm-workspace.yaml', { cwd })
         
     | 
| 
       20 
     | 
    
         
            -
            }
         
     | 
| 
       21 
     | 
    
         
            -
             
     | 
| 
       22 
15 
     | 
    
         
             
            /**
         
     | 
| 
       23 
16 
     | 
    
         
             
             * Checks if the project is monorepo, so it is supposed to have `lerna` command available (later
         
     | 
| 
       24 
17 
     | 
    
         
             
             * it can be extended to support other monorepos) and workspaces enabled in project configuration.
         
     | 
| 
         @@ -27,17 +20,12 @@ const isPNPMWorkspace = () => { 
     | 
|
| 
       27 
20 
     | 
    
         
             
             */
         
     | 
| 
       28 
21 
     | 
    
         
             
            const checkIfMonorepo = () => {
         
     | 
| 
       29 
22 
     | 
    
         
             
              const lernaIsAvailable = yarnCommandExists('lerna --version')
         
     | 
| 
       30 
     | 
    
         
            -
              const  
     | 
| 
       31 
     | 
    
         
            -
              const yarnWorkspaceExists = yarnCommandExists('workspaces info')
         
     | 
| 
       32 
     | 
    
         
            -
              const workspacesExist = yarnWorkspaceExists || pnpmWorkspaceExists
         
     | 
| 
       33 
     | 
    
         
            -
              const isMonorepo =
         
     | 
| 
       34 
     | 
    
         
            -
                (lernaIsAvailable && yarnWorkspaceExists) || pnpmWorkspaceExists
         
     | 
| 
      
 23 
     | 
    
         
            +
              const workspacesExist = yarnCommandExists('workspaces info')
         
     | 
| 
       35 
24 
     | 
    
         | 
| 
       36 
25 
     | 
    
         
             
              return {
         
     | 
| 
       37 
     | 
    
         
            -
                isMonorepo,
         
     | 
| 
      
 26 
     | 
    
         
            +
                isMonorepo: lernaIsAvailable && workspacesExist,
         
     | 
| 
       38 
27 
     | 
    
         
             
                lernaIsAvailable,
         
     | 
| 
       39 
28 
     | 
    
         
             
                workspacesExist,
         
     | 
| 
       40 
     | 
    
         
            -
                pnpmWorkspaceExists,
         
     | 
| 
       41 
29 
     | 
    
         
             
              }
         
     | 
| 
       42 
30 
     | 
    
         
             
            }
         
     | 
| 
       43 
31 
     | 
    
         |