File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
dev-packages/e2e-tests/lib Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,15 @@ function fixPackageJson(cwd: string): void {
27
27
}
28
28
29
29
// 2. Fix volta extends
30
- if ( packageJson . volta ?. extends === '../../package.json' ) {
31
- const newPath = join ( __dirname , '../package.json' ) ;
30
+ if ( ! packageJson . volta ) {
31
+ throw new Error ( 'No volta config found, please provide one!' ) ;
32
+ }
33
+
34
+ if ( typeof packageJson . volta . extends === 'string' ) {
35
+ const extendsPath = packageJson . volta . extends ;
36
+ // We add a virtual dir to ensure that the relative depth is consistent
37
+ // dirPath is relative to ./../test-applications/xxx
38
+ const newPath = join ( __dirname , 'virtual-dir/' , extendsPath ) ;
32
39
packageJson . volta . extends = newPath ;
33
40
console . log ( `Fixed volta.extends to ${ newPath } ` ) ;
34
41
} else {
You can’t perform that action at this time.
0 commit comments