Skip to content

Commit 82e10d3

Browse files
authored
fix: S2 upgrade assistant links and install step (#6972)
1 parent bb05fdc commit 82e10d3

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/dev/codemods/src/s1-to-s2/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export async function s1_to_s2(options: S1ToS2CodemodOptions) {
5353
` - Vite: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-vite-project')}\n` +
5454
` - Rollup: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-rollup-starter-app')}\n` +
5555
` - ESBuild: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-esbuild-starter-app')}\n\n` +
56-
`or view documentation for the plugin here: ${chalk.underline('https://jsr.io/@unplugin/macros')}`
56+
`or view documentation here: ${chalk.underline('https://react-spectrum.adobe.com/s2/index.html?path=/docs/intro--docs#configuring-your-bundler')}`
5757
);
5858
}
5959

@@ -63,7 +63,7 @@ export async function s1_to_s2(options: S1ToS2CodemodOptions) {
6363
`${chalk.bold('TODO(S2-upgrade)')}\n\n` +
6464
'You should be able to search your codebase and handle these manually. \n\n' +
6565
'We also recommend running your project\'s code formatter (i.e. Prettier, ESLint) after the upgrade process to clean up any extraneous formatting from the codemod.\n\n' +
66-
`For additional help, reference the Spectrum 2 Migration Guide: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/packages/@react-spectrum/codemods/s1-to-s2/UPGRADE.md')}`
66+
`For additional help, reference the Spectrum 2 Migration Guide: ${chalk.underline('https://react-spectrum.adobe.com/s2/index.html?path=/docs/migrating--docs')}`
6767
);
6868

6969
console.log(boxen(

packages/dev/codemods/src/s1-to-s2/src/utils/installPackage.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ export default async function installPackage(packageName: string, options?: {dev
3838
}
3939
try {
4040
logger.info(`Installing ${chalk.bold(packageName)} using ${chalk.bold(packageManager.name)}...`);
41-
await execa(packageManager.name, [packageManager.installCommand, `${packageName}@latest`, options?.dev ? '-D' : undefined]);
41+
const devFlag = options?.dev ? ['-D'] : [];
42+
await execa(packageManager.name, [packageManager.installCommand, `${packageName}@latest`, ...devFlag]);
4243
logger.success(`Successfully installed ${chalk.bold(packageName)}!\n`);
4344
return true;
4445
} catch (e: any) {

0 commit comments

Comments
 (0)