Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Update warning deprecating paper",
"packageName": "@react-native-windows/cli",
"email": "hmalothu@microsoft.com",
"dependentChangeType": "none"
}
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,15 @@ export class InitWindows {

spinner.info(`Using template '${this.options.template}'...`);
if (!this.templates.has(this.options.template.replace(/[\\]/g, '/'))) {
// Check if user is trying to use an old architecture template
const isOldArchTemplate = this.options.template.startsWith('old');
if (isOldArchTemplate) {
showOldArchitectureWarning();
throw new CodedError(
'InvalidTemplateName',
`The template '${this.options.template}' is no longer available. Please use 'cpp-app' template instead.`,
);
}
throw new CodedError(
'InvalidTemplateName',
`Unable to find template '${this.options.template}'.`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@ import chalk from 'chalk';
export function showOldArchitectureWarning(): void {
console.log(
chalk.yellow(
`⚠️ This project is using the React Native (for Windows) Old Architecture. The old architecture will begin to be removed starting with react-native-windows@0.82.0.`,
),
);
console.log();
console.log(
chalk.cyan(
'💡 It is strongly recommended to move to the new architecture as soon as possible to take advantage of improved performance, long-term support, and modern capabilities.',
`⚠️ The old architecture (Paper) is not supported in RNW version v0.82. Please enable your projects using new architecture (Fabric).`,
),
);
console.log();
Expand Down
Loading