File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { exec } from 'child_process'
2
2
import { promisify } from 'util'
3
3
import path from 'path'
4
4
import fs from 'fs'
5
+ import getPackages from 'get-monorepo-packages'
5
6
6
7
/**
7
8
* This script is for extra typechecking of the built .d.ts files in {package_name}/dist/types/*.
@@ -11,13 +12,19 @@ import fs from 'fs'
11
12
*/
12
13
const execa = promisify ( exec )
13
14
14
- const allPublicPackageDirNames = [
15
- 'browser' ,
16
- 'core' ,
17
- 'node' ,
18
- 'signals/signals' ,
19
- 'signals/signals-runtime' ,
20
- ] as const
15
+ // Get public packages programmatically
16
+ const packages = getPackages ( path . join ( __dirname , '..' ) )
17
+ const publicPackageNames = [
18
+ '@segment/analytics-next' ,
19
+ '@segment/analytics-core' ,
20
+ '@segment/analytics-node' ,
21
+ '@segment/analytics-signals' ,
22
+ ]
23
+
24
+ const allPublicPackageDirNames = packages
25
+ . filter ( ( pkg ) => publicPackageNames . includes ( pkg . package . name ) )
26
+ . map ( ( pkg ) => path . relative ( 'packages' , pkg . location ) )
27
+ . sort ( ) as readonly string [ ]
21
28
22
29
type PackageDirName = typeof allPublicPackageDirNames [ number ]
23
30
You can’t perform that action at this time.
0 commit comments