Skip to content

Commit 79ba6f3

Browse files
committed
fix(scripts): make migrate scripts work
1 parent 52324ff commit 79ba6f3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

scripts/migrate/migrate-3-4.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ if (!pathToProject) {
2626
)
2727
}
2828

29-
const ROOT = resolve(__dirname, '..')
29+
const ROOT = process.cwd()
3030
const PACKAGE_ROOT = resolve(ROOT, pathToProject)
3131

3232
main()

scripts/migrate/migrate-4-5.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ if (!pathToProject) {
2424
)
2525
}
2626

27-
const ROOT = resolve(__dirname, '..')
27+
const ROOT = process.cwd()
2828
const PACKAGE_ROOT = resolve(ROOT, pathToProject)
2929

3030
main()
@@ -132,6 +132,10 @@ function updatePackageJson() {
132132
'sort-package-json',
133133
'sort-object-keys',
134134
'shelljs',
135+
// packages needed for init script
136+
'prompts',
137+
'@types/prompts',
138+
'replace-in-file',
135139
// v4 -> v5
136140
'gzip-size-cli',
137141
'strip-json-comments-cli',

0 commit comments

Comments
 (0)