Skip to content

Commit 6bac140

Browse files
authored
Merge pull request #1 from jdevdevdev/upgrade
Upgrade to next 15
2 parents 5c71909 + 03f6e98 commit 6bac140

38 files changed

+5723
-6074
lines changed

.eslintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Deploy Next.js site to Pages
33
on:
44
# Runs on pushes targeting the default branch
55
push:
6-
branches: ["main"]
6+
branches: ["main", "upgrade"]
77

88
# Allows you to run this workflow manually from the Actions tab
99
workflow_dispatch:
@@ -25,7 +25,13 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v3
28+
uses: actions/checkout@v4
29+
30+
- name: Install Pnpm
31+
uses: pnpm/action-setup@v4
32+
with:
33+
version: 9
34+
2935
- name: Detect package manager
3036
id: detect-package-manager
3137
run: |
@@ -34,46 +40,49 @@ jobs:
3440
echo "command=install" >> $GITHUB_OUTPUT
3541
echo "runner=yarn" >> $GITHUB_OUTPUT
3642
exit 0
43+
elif [ -f "${{ github.workspace }}/pnpm-lock.yaml" ]; then
44+
echo "manager=pnpm" >> $GITHUB_OUTPUT
45+
echo "command=install" >> $GITHUB_OUTPUT
46+
echo "runner=pnpm" >> $GITHUB_OUTPUT
47+
exit 0
3748
elif [ -f "${{ github.workspace }}/package.json" ]; then
3849
echo "manager=npm" >> $GITHUB_OUTPUT
3950
echo "command=ci" >> $GITHUB_OUTPUT
4051
echo "runner=npx --no-install" >> $GITHUB_OUTPUT
4152
exit 0
4253
else
43-
echo "Unable to determine packager manager"
54+
echo "Unable to determine package manager"
4455
exit 1
4556
fi
4657
- name: Setup Node
47-
uses: actions/setup-node@v3
58+
uses: actions/setup-node@v4
4859
with:
49-
node-version: "16"
60+
node-version: "20"
5061
cache: ${{ steps.detect-package-manager.outputs.manager }}
5162
- name: Setup Pages
52-
uses: actions/configure-pages@v3
63+
uses: actions/configure-pages@v5
5364
with:
5465
# Automatically inject basePath in your Next.js configuration file and disable
5566
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
5667
#
5768
# You may remove this line if you want to manage the configuration yourself.
5869
static_site_generator: next
5970
- name: Restore cache
60-
uses: actions/cache@v3
71+
uses: actions/cache@v4
6172
with:
6273
path: |
6374
.next/cache
6475
# Generate a new cache whenever packages or source files change.
65-
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
76+
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
6677
# If source files changed but packages didn't, rebuild from a prior cache.
6778
restore-keys: |
68-
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-
79+
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock', '**/pnpm-lock.yaml') }}-
6980
- name: Install dependencies
7081
run: ${{ steps.detect-package-manager.outputs.manager }} ${{ steps.detect-package-manager.outputs.command }}
7182
- name: Build with Next.js
7283
run: ${{ steps.detect-package-manager.outputs.runner }} next build
73-
- name: Static HTML export with Next.js
74-
run: ${{ steps.detect-package-manager.outputs.runner }} next export
7584
- name: Upload artifact
76-
uses: actions/upload-pages-artifact@v1
85+
uses: actions/upload-pages-artifact@v3
7786
with:
7887
path: ./out
7988

@@ -87,4 +96,4 @@ jobs:
8796
steps:
8897
- name: Deploy to GitHub Pages
8998
id: deployment
90-
uses: actions/deploy-pages@v1
99+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
# dependencies
44
/node_modules
55
/.pnp
6-
.pnp.js
6+
.pnp.*
7+
.yarn/*
8+
!.yarn/patches
9+
!.yarn/plugins
10+
!.yarn/releases
11+
!.yarn/versions
712

813
# testing
914
/coverage
@@ -25,8 +30,8 @@ yarn-debug.log*
2530
yarn-error.log*
2631
.pnpm-debug.log*
2732

28-
# local env files
29-
.env*.local
33+
# env files (can opt-in for committing if needed)
34+
.env*
3035

3136
# vercel
3237
.vercel

eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { dirname } from "path";
2+
import { fileURLToPath } from "url";
3+
import { FlatCompat } from "@eslint/eslintrc";
4+
5+
const __filename = fileURLToPath(import.meta.url);
6+
const __dirname = dirname(__filename);
7+
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
});
11+
12+
const eslintConfig = [
13+
...compat.extends("next/core-web-vitals", "next/typescript"),
14+
];
15+
16+
export default eslintConfig;

next.config.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;

0 commit comments

Comments
 (0)