Skip to content

Commit

Permalink
fix: S2 upgrade assistant links and install step (adobe#6972)
Browse files Browse the repository at this point in the history
  • Loading branch information
reidbarber authored Aug 29, 2024
1 parent bb05fdc commit 82e10d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/dev/codemods/src/s1-to-s2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export async function s1_to_s2(options: S1ToS2CodemodOptions) {
` - Vite: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-vite-project')}\n` +
` - Rollup: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-rollup-starter-app')}\n` +
` - ESBuild: ${chalk.underline('https://github.com/adobe/react-spectrum/tree/main/examples/s2-esbuild-starter-app')}\n\n` +
`or view documentation for the plugin here: ${chalk.underline('https://jsr.io/@unplugin/macros')}`
`or view documentation here: ${chalk.underline('https://react-spectrum.adobe.com/s2/index.html?path=/docs/intro--docs#configuring-your-bundler')}`
);
}

Expand All @@ -63,7 +63,7 @@ export async function s1_to_s2(options: S1ToS2CodemodOptions) {
`${chalk.bold('TODO(S2-upgrade)')}\n\n` +
'You should be able to search your codebase and handle these manually. \n\n' +
'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' +
`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')}`
`For additional help, reference the Spectrum 2 Migration Guide: ${chalk.underline('https://react-spectrum.adobe.com/s2/index.html?path=/docs/migrating--docs')}`
);

console.log(boxen(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ export default async function installPackage(packageName: string, options?: {dev
}
try {
logger.info(`Installing ${chalk.bold(packageName)} using ${chalk.bold(packageManager.name)}...`);
await execa(packageManager.name, [packageManager.installCommand, `${packageName}@latest`, options?.dev ? '-D' : undefined]);
const devFlag = options?.dev ? ['-D'] : [];
await execa(packageManager.name, [packageManager.installCommand, `${packageName}@latest`, ...devFlag]);
logger.success(`Successfully installed ${chalk.bold(packageName)}!\n`);
return true;
} catch (e: any) {
Expand Down

0 comments on commit 82e10d3

Please sign in to comment.