Skip to content

Commit

Permalink
Merge pull request #281 from martpie/next-13
Browse files Browse the repository at this point in the history
Next.js 13 support
  • Loading branch information
martpie committed Nov 1, 2022
2 parents 33bab49 + 7762da2 commit 70eb0d3
Show file tree
Hide file tree
Showing 32 changed files with 1,692 additions and 972 deletions.
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

0 comments on commit 70eb0d3

Please sign in to comment.