@next/codemod 16.4.0-canary.2 → 16.4.0-canary.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/transform.js +2 -2
- package/bin/upgrade.js +5 -1
- package/package.json +1 -1
package/bin/transform.js
CHANGED
|
@@ -56,7 +56,7 @@ async function runTransform(transform, path, options) {
|
|
|
56
56
|
}, { onCancel: utils_1.onCancel });
|
|
57
57
|
transformer = res.transformer;
|
|
58
58
|
}
|
|
59
|
-
if (transformer === 'next-request-geo-ip') {
|
|
59
|
+
if (transformer === 'next-request-geo-ip' && !options.nonInteractive) {
|
|
60
60
|
const { isAppDeployedToVercel } = await (0, prompts_1.default)({
|
|
61
61
|
type: 'confirm',
|
|
62
62
|
name: 'isAppDeployedToVercel',
|
|
@@ -99,7 +99,7 @@ async function runTransform(transform, path, options) {
|
|
|
99
99
|
args.push('--parser=tsx');
|
|
100
100
|
args.push('--ignore-pattern=**/node_modules/**');
|
|
101
101
|
args.push('--ignore-pattern=**/.next/**');
|
|
102
|
-
args.push('--extensions=tsx,ts,jsx,js');
|
|
102
|
+
args.push('--extensions=tsx,ts,jsx,js,mjs');
|
|
103
103
|
args = args.concat(['--transform', transformerPath]);
|
|
104
104
|
if (jscodeshift) {
|
|
105
105
|
args = args.concat(jscodeshift);
|
package/bin/upgrade.js
CHANGED
|
@@ -357,7 +357,11 @@ async function runUpgrade(revision, options) {
|
|
|
357
357
|
os.EOL);
|
|
358
358
|
(0, handle_package_1.runInstallation)(packageManager, { cwd });
|
|
359
359
|
for (const codemod of codemods) {
|
|
360
|
-
await (0, transform_1.runTransform)(codemod, cwd, {
|
|
360
|
+
await (0, transform_1.runTransform)(codemod, cwd, {
|
|
361
|
+
force: true,
|
|
362
|
+
verbose,
|
|
363
|
+
nonInteractive,
|
|
364
|
+
});
|
|
361
365
|
}
|
|
362
366
|
// To reduce user-side burden of selecting which codemods to run as it needs additional
|
|
363
367
|
// understanding of the codemods, we run all of the applicable codemods.
|