mirror of
https://github.com/vercel/commerce.git
synced 2025-03-31 17:25:53 +00:00
Update dependencies. (#1361)
This commit is contained in:
parent
7c1b34abdb
commit
ec21369389
23
.eslintrc.js
23
.eslintrc.js
@ -1,23 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
extends: ['next', 'prettier'],
|
|
||||||
plugins: ['unicorn'],
|
|
||||||
rules: {
|
|
||||||
'no-unused-vars': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
args: 'after-used',
|
|
||||||
caughtErrors: 'none',
|
|
||||||
ignoreRestSiblings: true,
|
|
||||||
vars: 'all'
|
|
||||||
}
|
|
||||||
],
|
|
||||||
'prefer-const': 'error',
|
|
||||||
'react-hooks/exhaustive-deps': 'error',
|
|
||||||
'unicorn/filename-case': [
|
|
||||||
'error',
|
|
||||||
{
|
|
||||||
case: 'kebabCase'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
};
|
|
6
.github/dependabot.yml
vendored
6
.github/dependabot.yml
vendored
@ -1,6 +0,0 @@
|
|||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: 'github-actions'
|
|
||||||
directory: '/'
|
|
||||||
schedule:
|
|
||||||
interval: 'weekly'
|
|
35
.github/workflows/test.yml
vendored
35
.github/workflows/test.yml
vendored
@ -1,35 +0,0 @@
|
|||||||
name: test
|
|
||||||
on: pull_request
|
|
||||||
|
|
||||||
# Cancel in progress workflows on pull_requests.
|
|
||||||
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-a-fallback-value
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
- name: Set node version
|
|
||||||
uses: actions/setup-node@v3
|
|
||||||
with:
|
|
||||||
node-version-file: '.nvmrc'
|
|
||||||
- name: Set pnpm version
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
run_install: false
|
|
||||||
version: 8
|
|
||||||
- name: Cache node_modules
|
|
||||||
id: node-modules-cache
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: '**/node_modules'
|
|
||||||
key: node-modules-cache-${{ hashFiles('**/pnpm-lock.yaml') }}
|
|
||||||
- name: Install dependencies
|
|
||||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
|
||||||
run: pnpm install --no-frozen-lockfile
|
|
||||||
- name: Run tests
|
|
||||||
run: pnpm test
|
|
@ -1,3 +0,0 @@
|
|||||||
.vercel
|
|
||||||
.next
|
|
||||||
pnpm-lock.yaml
|
|
@ -121,7 +121,11 @@ async function RelatedProducts({ id }: { id: string }) {
|
|||||||
key={product.handle}
|
key={product.handle}
|
||||||
className="aspect-square w-full flex-none min-[475px]:w-1/2 sm:w-1/3 md:w-1/4 lg:w-1/5"
|
className="aspect-square w-full flex-none min-[475px]:w-1/2 sm:w-1/3 md:w-1/4 lg:w-1/5"
|
||||||
>
|
>
|
||||||
<Link className="relative h-full w-full" href={`/product/${product.handle}`}>
|
<Link
|
||||||
|
className="relative h-full w-full"
|
||||||
|
href={`/product/${product.handle}`}
|
||||||
|
prefetch={true}
|
||||||
|
>
|
||||||
<GridTileImage
|
<GridTileImage
|
||||||
alt={product.title}
|
alt={product.title}
|
||||||
label={{
|
label={{
|
||||||
|
@ -16,7 +16,11 @@ function ThreeItemGridItem({
|
|||||||
<div
|
<div
|
||||||
className={size === 'full' ? 'md:col-span-4 md:row-span-2' : 'md:col-span-2 md:row-span-1'}
|
className={size === 'full' ? 'md:col-span-4 md:row-span-2' : 'md:col-span-2 md:row-span-1'}
|
||||||
>
|
>
|
||||||
<Link className="relative block aspect-square h-full w-full" href={`/product/${item.handle}`}>
|
<Link
|
||||||
|
className="relative block aspect-square h-full w-full"
|
||||||
|
href={`/product/${item.handle}`}
|
||||||
|
prefetch={true}
|
||||||
|
>
|
||||||
<GridTileImage
|
<GridTileImage
|
||||||
src={item.featuredImage.url}
|
src={item.featuredImage.url}
|
||||||
fill
|
fill
|
||||||
|
@ -21,7 +21,11 @@ export default async function Navbar() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="flex w-full items-center">
|
<div className="flex w-full items-center">
|
||||||
<div className="flex w-full md:w-1/3">
|
<div className="flex w-full md:w-1/3">
|
||||||
<Link href="/" className="mr-2 flex w-full items-center justify-center md:w-auto lg:mr-6">
|
<Link
|
||||||
|
href="/"
|
||||||
|
prefetch={true}
|
||||||
|
className="mr-2 flex w-full items-center justify-center md:w-auto lg:mr-6"
|
||||||
|
>
|
||||||
<LogoSquare />
|
<LogoSquare />
|
||||||
<div className="ml-2 flex-none text-sm font-medium uppercase md:hidden lg:block">
|
<div className="ml-2 flex-none text-sm font-medium uppercase md:hidden lg:block">
|
||||||
{SITE_NAME}
|
{SITE_NAME}
|
||||||
@ -33,6 +37,7 @@ export default async function Navbar() {
|
|||||||
<li key={item.title}>
|
<li key={item.title}>
|
||||||
<Link
|
<Link
|
||||||
href={item.path}
|
href={item.path}
|
||||||
|
prefetch={true}
|
||||||
className="text-neutral-500 underline-offset-4 hover:text-black hover:underline dark:text-neutral-400 dark:hover:text-neutral-300"
|
className="text-neutral-500 underline-offset-4 hover:text-black hover:underline dark:text-neutral-400 dark:hover:text-neutral-300"
|
||||||
>
|
>
|
||||||
{item.title}
|
{item.title}
|
||||||
|
@ -83,7 +83,7 @@ export default function MobileMenu({ menu }: { menu: Menu[] }) {
|
|||||||
className="py-2 text-xl text-black transition-colors hover:text-neutral-500 dark:text-white"
|
className="py-2 text-xl text-black transition-colors hover:text-neutral-500 dark:text-white"
|
||||||
key={item.title}
|
key={item.title}
|
||||||
>
|
>
|
||||||
<Link href={item.path} onClick={closeMobileMenu}>
|
<Link href={item.path} prefetch={true} onClick={closeMobileMenu}>
|
||||||
{item.title}
|
{item.title}
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
|
@ -8,7 +8,11 @@ export default function ProductGridItems({ products }: { products: Product[] })
|
|||||||
<>
|
<>
|
||||||
{products.map((product) => (
|
{products.map((product) => (
|
||||||
<Grid.Item key={product.handle} className="animate-fadeIn">
|
<Grid.Item key={product.handle} className="animate-fadeIn">
|
||||||
<Link className="relative inline-block h-full w-full" href={`/product/${product.handle}`}>
|
<Link
|
||||||
|
className="relative inline-block h-full w-full"
|
||||||
|
href={`/product/${product.handle}`}
|
||||||
|
prefetch={true}
|
||||||
|
>
|
||||||
<GridTileImage
|
<GridTileImage
|
||||||
alt={product.title}
|
alt={product.title}
|
||||||
label={{
|
label={{
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
/** @type {import('next').NextConfig} */
|
/** @type {import('next').NextConfig} */
|
||||||
module.exports = {
|
module.exports = {
|
||||||
eslint: {
|
|
||||||
// Disabling on production builds because we're running checks on PRs via GitHub Actions.
|
|
||||||
ignoreDuringBuilds: true
|
|
||||||
},
|
|
||||||
images: {
|
images: {
|
||||||
formats: ['image/avif', 'image/webp'],
|
formats: ['image/avif', 'image/webp'],
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
|
52
package.json
52
package.json
@ -1,52 +1,38 @@
|
|||||||
{
|
{
|
||||||
"private": true,
|
"private": true,
|
||||||
"packageManager": "pnpm@8.2.0",
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=20",
|
||||||
"pnpm": ">=8"
|
"pnpm": ">=9"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev --turbo",
|
"dev": "next dev --turbo",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint",
|
|
||||||
"lint-staged": "lint-staged",
|
|
||||||
"prettier": "prettier --write --ignore-unknown .",
|
"prettier": "prettier --write --ignore-unknown .",
|
||||||
"prettier:check": "prettier --check --ignore-unknown .",
|
"prettier:check": "prettier --check --ignore-unknown .",
|
||||||
"test": "pnpm lint && pnpm prettier:check"
|
"test": "pnpm prettier:check"
|
||||||
},
|
|
||||||
"git": {
|
|
||||||
"pre-commit": "lint-staged"
|
|
||||||
},
|
|
||||||
"lint-staged": {
|
|
||||||
"*": "prettier --write --ignore-unknown"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@headlessui/react": "^1.7.19",
|
"@headlessui/react": "^2.1.2",
|
||||||
"@heroicons/react": "^2.1.3",
|
"@heroicons/react": "^2.1.5",
|
||||||
"clsx": "^2.1.0",
|
"clsx": "^2.1.1",
|
||||||
"geist": "^1.3.0",
|
"geist": "^1.3.1",
|
||||||
"next": "14.2.2",
|
"next": "14.2.5",
|
||||||
"react": "18.2.0",
|
"react": "18.3.1",
|
||||||
"react-dom": "18.2.0"
|
"react-dom": "18.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/container-queries": "^0.1.1",
|
"@tailwindcss/container-queries": "^0.1.1",
|
||||||
"@tailwindcss/typography": "^0.5.12",
|
"@tailwindcss/typography": "^0.5.13",
|
||||||
"@types/node": "20.12.7",
|
"@types/node": "20.14.12",
|
||||||
"@types/react": "18.2.79",
|
"@types/react": "18.3.3",
|
||||||
"@types/react-dom": "18.2.25",
|
"@types/react-dom": "18.3.0",
|
||||||
"@vercel/git-hooks": "^1.0.0",
|
"@vercel/git-hooks": "^1.0.0",
|
||||||
"autoprefixer": "^10.4.19",
|
"autoprefixer": "^10.4.19",
|
||||||
"eslint": "^8.57.0",
|
"postcss": "^8.4.39",
|
||||||
"eslint-config-next": "^14.2.2",
|
"prettier": "3.3.3",
|
||||||
"eslint-config-prettier": "^9.1.0",
|
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||||
"eslint-plugin-unicorn": "^52.0.0",
|
"tailwindcss": "^3.4.6",
|
||||||
"lint-staged": "^15.2.2",
|
"typescript": "5.5.4"
|
||||||
"postcss": "^8.4.38",
|
|
||||||
"prettier": "3.2.5",
|
|
||||||
"prettier-plugin-tailwindcss": "^0.5.14",
|
|
||||||
"tailwindcss": "^3.4.3",
|
|
||||||
"typescript": "5.4.5"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4089
pnpm-lock.yaml
generated
4089
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user