@toptal/davinci-monorepo 9.0.0 → 9.0.1-alpha-COMM-3434-skipped-examples-storybook-7f509a98.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@toptal/davinci-monorepo",
3
- "version": "9.0.0",
3
+ "version": "9.0.1-alpha-COMM-3434-skipped-examples-storybook-7f509a98.2+7f509a98",
4
4
  "keywords": [
5
5
  "lint"
6
6
  ],
@@ -27,7 +27,7 @@
27
27
  "dependencies": {
28
28
  "@nodelib/fs.walk": "^1.2.6",
29
29
  "@oclif/core": "^1.16.1",
30
- "@toptal/davinci-cli-shared": "^2.5.0",
30
+ "@toptal/davinci-cli-shared": "2.5.1-alpha-COMM-3434-skipped-examples-storybook-7f509a98.60+7f509a98",
31
31
  "chalk": "^4.1.2",
32
32
  "codeowners": "5.1.1",
33
33
  "dependency-cruiser": "^16.3.0",
@@ -49,5 +49,6 @@
49
49
  },
50
50
  "publishConfig": {
51
51
  "access": "public"
52
- }
52
+ },
53
+ "gitHead": "7f509a98495d50328e7bf308cff485c3e468efed"
53
54
  }
package/src/index.js CHANGED
@@ -5,11 +5,15 @@ import { createCodeownersCommand } from './commands/codeowners/index.js'
5
5
  import { createCoverageCommand } from './commands/coverage-command/index.js'
6
6
  import { hostsCommandFactory } from './commands/hosts/index.js'
7
7
  import checkIfMonorepo from './utils/check-if-monorepo.js'
8
- import getPackages from './utils/get-packages.js'
8
+ import {
9
+ getPackages,
10
+ getChangedPackagesLocations,
11
+ } from './utils/get-packages.js'
9
12
 
10
13
  export const utils = {
11
14
  checkIfMonorepo,
12
15
  getPackages,
16
+ getChangedPackagesLocations,
13
17
  }
14
18
 
15
19
  export const commands = [
@@ -119,6 +119,16 @@ export const getPackages = async ({
119
119
  return await performPackagesSearch(commandArgs)
120
120
  }
121
121
 
122
+ export const getChangedPackagesLocations = async () => {
123
+ const affectedPackageNames = await getPackages({ onlyAffected: true }) // [name, ...]
124
+ const allPackages = getPackagesLegacy('.') // [{name, location}, ...]
125
+
126
+ // [location, ...]
127
+ return allPackages
128
+ .filter(pkg => affectedPackageNames.includes(pkg.name))
129
+ .map(pkg => pkg.location)
130
+ }
131
+
122
132
  const getPackagesLegacy = createGetPackages(fsSystem)
123
133
 
124
134
  export default getPackagesLegacy