Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next.js 13 support #281

Merged
merged 7 commits into from
Nov 1, 2022
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
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ jobs:
- name: Install tests apps dependencies (swc)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/swc

- name: Install tests apps dependencies (with-app-dir)
run: yarn --frozen-lockfile --cwd src/__tests__/__apps__/with-app-dir

- name: Build test apps
run: npm run test:prepare

Expand Down
6 changes: 6 additions & 0 deletions jest-puppeteer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const yarnWorkspacesAppPath = 'src/__tests__/__apps__/yarn-workspaces/app';
const yarnWorkspacesSymlinksAppPath = 'src/__tests__/__apps__/yarn-workspaces-symlinks/app';
const pnpmAppPath = 'src/__tests__/__apps__/pnpm';
const swcAppPath = 'src/__tests__/__apps__/swc/app';
const withAppDirAppPath = 'src/__tests__/__apps__/with-app-dir/app';

module.exports = {
launch: {
Expand Down Expand Up @@ -36,5 +37,10 @@ module.exports = {
launchTimeout: 20000,
port: 3506,
},
{
command: `yarn --cwd ${withAppDirAppPath} run start --port 3507`,
launchTimeout: 20000,
port: 3507,
},
],
};
7 changes: 4 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"test:prepare:yarn-workspaces-symlinks": "yarn --cwd src/__tests__/__apps__/yarn-workspaces-symlinks/app run build",
"test:prepare:pnpm": "npm run build --prefix=src/__tests__/__apps__/pnpm",
"test:prepare:swc": "yarn --cwd src/__tests__/__apps__/swc/app run build",
"test:prepare": "npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:pnpm && npm run test:prepare:swc"
"test:prepare:with-app-dir": "yarn --cwd src/__tests__/__apps__/with-app-dir/app run build",
"test:prepare": "npm run test:prepare:npm-basic && npm run test:prepare:yarn-workspaces && npm run test:prepare:yarn-workspaces-symlinks && npm run test:prepare:pnpm && npm run test:prepare:swc && npm run test:prepare:with-app-dir"
},
"repository": {
"type": "git",
Expand All @@ -46,8 +47,7 @@
"webpack"
],
"dependencies": {
"enhanced-resolve": "^5.10.0",
"escalade": "^3.1.1"
"enhanced-resolve": "^5.10.0"
},
"devDependencies": {
"@types/jest-environment-puppeteer": "5.0.2",
Expand Down
5 changes: 4 additions & 1 deletion scripts/next-update.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Look at how messy this script is :p

NEXT_VERSION="12.1.6"
NEXT_VERSION="13.0.1"
ROOT=$(pwd)

echo "==================== NPM ===================="
Expand All @@ -18,3 +18,6 @@ yarn --cwd "$ROOT/src/__tests__/__apps__/yarn-workspaces-symlinks/app" add "next

echo "==================== SWC ===================="
yarn --cwd "$ROOT/src/__tests__/__apps__/swc/app" add "next@$NEXT_VERSION"

echo "==================== WITH-APP-DIR ===================="
yarn --cwd "$ROOT/src/__tests__/__apps__/with-app-dir/app" add "next@$NEXT_VERSION"
9 changes: 9 additions & 0 deletions src/__tests__/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ __apps__/yarn-workspaces-symlinks/shared-ui
__apps__/swc/shared
__apps__/swc/shared-ts
__apps__/swc/shared-ui
__apps__/with-app-dir/shared
__apps__/with-app-dir/shared-ts
__apps__/with-app-dir/shared-ui
__apps__/shared
__apps__/shared-ts
__apps__/shared-ui
Expand Down Expand Up @@ -40,3 +43,9 @@ __apps__/swc/app/components
__apps__/swc/app/pages
!__apps__/swc/app/pages/.keep
__apps__/swc/app/next-transpile-modules.js

__apps__/with-app-dir/app/components
!__apps__/with-app-dir/app/components/.keep
__apps__/with-app-dir/app/pages
!__apps__/with-app-dir/app/pages/.keep
__apps__/with-app-dir/app/next-transpile-modules.js
Loading