-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(nextjs): update Next.js to 13.4.1 and default to App Router for …
…new apps (#16948)
- Loading branch information
Showing
28 changed files
with
248 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { | ||
cleanupProject, | ||
isNotWindows, | ||
killPorts, | ||
newProject, | ||
runCLI, | ||
runCommandUntil, | ||
tmpProjPath, | ||
uniq, | ||
updateFile, | ||
} from '@nx/e2e/utils'; | ||
import { getData } from 'ajv/dist/compile/validate'; | ||
import { detectPackageManager } from 'nx/src/utils/package-manager'; | ||
import { checkApp } from './utils'; | ||
import { p } from 'vitest/dist/types-b7007192'; | ||
|
||
describe('Next.js App Router', () => { | ||
let proj: string; | ||
|
||
beforeEach(() => { | ||
proj = newProject(); | ||
}); | ||
|
||
afterEach(() => { | ||
cleanupProject(); | ||
}); | ||
|
||
it('should be able to generate and build app with default App Router', async () => { | ||
const appName = uniq('app'); | ||
const jsLib = uniq('tslib'); | ||
|
||
runCLI(`generate @nx/next:app ${appName}`); | ||
runCLI(`generate @nx/js:lib ${jsLib} --no-interactive`); | ||
|
||
updateFile( | ||
`apps/${appName}/app/page.tsx`, | ||
` | ||
import React from 'react'; | ||
import { ${jsLib} } from '@${proj}/${jsLib}'; | ||
export default async function Page() { | ||
return ( | ||
<p>{${jsLib}()}</p> | ||
); | ||
}; | ||
` | ||
); | ||
|
||
await checkApp(appName, { | ||
checkUnitTest: false, | ||
checkLint: true, | ||
checkE2E: false, | ||
checkExport: false, | ||
}); | ||
}, 300_000); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
95421c6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev