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'
22import { promisify } from 'util'
33import path from 'path'
44import fs from 'fs'
5+ import getPackages from 'get-monorepo-packages'
56
67/**
78 * 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'
1112 */
1213const execa = promisify ( exec )
1314
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 [ ]
2128
2229type PackageDirName = typeof allPublicPackageDirNames [ number ]
2330
You can’t perform that action at this time.
0 commit comments