Skip to content

Commit

Permalink
Set nacp.id and nacp.title fields instead of deprecated titleId
Browse files Browse the repository at this point in the history
… and `productName`
  • Loading branch information
TooTallNate committed Dec 19, 2024
1 parent 96c883c commit e3b9843
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/hungry-foxes-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"create-nxjs-app": patch
---

Set `nacp.id` and `nacp.title` fields instead of deprecated `titleId` and `productName`
17 changes: 9 additions & 8 deletions packages/create-nxjs-app/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,16 @@ try {
packageJsonUrl,
`${JSON.stringify(
{
// Generate a random Title ID, which is used for
// save data purposes (i.e. `localStorage`)
titleId: generateRandomID(),
// Set the `productName` to the app name if it's different
// from the slugified name, for usage in NRO/NSP app metadata
productName: appName !== slugifiedName ? appName : undefined,
...packageJson,
nacp: {
// Generate a random Title ID, which is used for
// save data purposes (i.e. `localStorage`)
id: generateRandomID(),
// Set the `nacp.title` to the app name if it's different
// from the slugified name, for usage in NRO/NSP app metadata
title: appName !== slugifiedName ? appName : undefined,
},
},
null,
2,
Expand Down

0 comments on commit e3b9843

Please sign in to comment.