@next/codemod 16.0.3 → 16.1.0-canary.0

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.
@@ -39,6 +39,8 @@ const program = new commander_1.Command(packageJson.name)
39
39
  program
40
40
  .command('upgrade')
41
41
  .description('Upgrade Next.js apps to desired versions with a single command.')
42
+ // The CLI interface must be backwards compatible at all times so that older
43
+ // versions of Next.js can still run the codemod successfully.
42
44
  .argument('[revision]', 'Specify the target Next.js version using an NPM dist tag (e.g. "latest", "canary", "rc", "beta") or an exact version number (e.g. "15.0.0").', packageJson.version.includes('-canary.')
43
45
  ? 'canary'
44
46
  : packageJson.version.includes('-rc.')
@@ -99,6 +99,13 @@ function runInstallation(packageManager, options) {
99
99
  try {
100
100
  execa_1.default.sync(packageManager, ['install'], {
101
101
  cwd: options.cwd,
102
+ env: {
103
+ ...process.env,
104
+ // In case NODE_ENV=production is set, we still want dev dependencies to
105
+ // be installed. Otherwise we won't be able to check for peer dependencies.
106
+ // --production=false is not implemented by every package manager.
107
+ NODE_ENV: 'development',
108
+ },
102
109
  stdio: 'inherit',
103
110
  shell: true,
104
111
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next/codemod",
3
- "version": "16.0.3",
3
+ "version": "16.1.0-canary.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",