File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -47,9 +47,10 @@ async function run(argv) {
47
47
) ;
48
48
} else if ( babelRuntimeVersion === 'catalog:' ) {
49
49
// resolve the version from the given package
50
- const { stdout : listedBabelRuntime } = await exec ( 'pnpm list "@babel/runtime" --json' ) ;
51
- const jsonListedDependencies = JSON . parse ( listedBabelRuntime ) ;
52
- babelRuntimeVersion = jsonListedDependencies [ 0 ] . dependencies [ '@babel/runtime' ] . version ;
50
+ // outputs the pnpm-workspace.yaml config as json
51
+ const { stdout : configStdout } = await exec ( 'pnpm config list --json' ) ;
52
+ const pnpmWorkspaceConfig = JSON . parse ( configStdout ) ;
53
+ babelRuntimeVersion = pnpmWorkspaceConfig . catalog [ '@babel/runtime' ] ;
53
54
}
54
55
55
56
const babelConfigPath = path . resolve ( getWorkspaceRoot ( ) , 'babel.config.js' ) ;
You can’t perform that action at this time.
0 commit comments