mirror of https://github.com/kremalicious/blog.git
switch to Node.js v20, package updates
This commit is contained in:
parent
ee8f7c8c4e
commit
f58ffefddc
|
@ -23,12 +23,12 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-13]
|
os: [ubuntu-latest, macos-14]
|
||||||
node: ['18']
|
node: ['20']
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
@ -39,12 +39,12 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-13]
|
os: [ubuntu-latest, macos-14]
|
||||||
node: ['18']
|
node: ['20']
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
@ -56,19 +56,19 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-13]
|
os: [ubuntu-latest, macos-14]
|
||||||
node: ['18']
|
node: ['20']
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: npm run test:unit
|
- run: npm run test:unit
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: matrix.os == 'ubuntu-latest' && matrix.node == '18'
|
if: matrix.os == 'ubuntu-latest' && matrix.node == '20'
|
||||||
with:
|
with:
|
||||||
name: coverage-${{ matrix.os }}-${{ matrix.node }}
|
name: coverage-${{ matrix.os }}-${{ matrix.node }}
|
||||||
path: coverage/
|
path: coverage/
|
||||||
|
@ -78,12 +78,12 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest]
|
os: [ubuntu-latest]
|
||||||
node: ['18']
|
node: ['20']
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
|
@ -95,17 +95,17 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-13]
|
os: [ubuntu-latest, macos-14]
|
||||||
node: ['18']
|
node: ['20']
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node }}
|
node-version: ${{ matrix.node }}
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Cache Astro build output
|
- name: Cache Astro build output
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: ${{ github.workspace }}/.astro
|
path: ${{ github.workspace }}/.astro
|
||||||
key: ${{ matrix.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('content/**/*.jpg', 'content/**/*.png') }}
|
key: ${{ matrix.os }}-${{ matrix.node }}-astro-build-${{ hashFiles('content/**/*.jpg', 'content/**/*.png') }}
|
||||||
|
@ -113,10 +113,10 @@ jobs:
|
||||||
- run: npm ci
|
- run: npm ci
|
||||||
- run: NODE_OPTIONS="--max-old-space-size=4096" npm run build
|
- run: NODE_OPTIONS="--max-old-space-size=4096" npm run build
|
||||||
- name: Zip artifact for deployment
|
- name: Zip artifact for deployment
|
||||||
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.node == '18'
|
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.node == '20'
|
||||||
run: zip dist.zip ./dist -r
|
run: zip dist.zip ./dist -r
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.node == '18'
|
if: github.ref == 'refs/heads/main' && matrix.os == 'ubuntu-latest' && matrix.node == '20'
|
||||||
with:
|
with:
|
||||||
name: dist-${{ matrix.os }}-${{ matrix.node }}
|
name: dist-${{ matrix.os }}-${{ matrix.node }}
|
||||||
path: dist.zip
|
path: dist.zip
|
||||||
|
@ -126,10 +126,10 @@ jobs:
|
||||||
needs: [test-unit]
|
needs: [test-unit]
|
||||||
if: ${{ success() && github.actor != 'dependabot[bot]' }}
|
if: ${{ success() && github.actor != 'dependabot[bot]' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: coverage-ubuntu-latest-18
|
name: coverage-ubuntu-latest-20
|
||||||
- uses: paambaati/codeclimate-action@v5.0.0
|
- uses: paambaati/codeclimate-action@v5.0.0
|
||||||
env:
|
env:
|
||||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||||
|
@ -140,10 +140,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: dist-ubuntu-latest-18
|
name: dist-ubuntu-latest-20
|
||||||
- name: unzip artifact
|
- name: unzip artifact
|
||||||
run: unzip dist.zip
|
run: unzip dist.zip
|
||||||
- name: Deploy to S3
|
- name: Deploy to S3
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
38
package.json
38
package.json
|
@ -49,43 +49,43 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/check": "^0.3.2",
|
"@astrojs/check": "^0.5.8",
|
||||||
"@astrojs/react": "^3.0.10",
|
"@astrojs/react": "^3.1.0",
|
||||||
"@astrojs/rss": "^4.0.5",
|
"@astrojs/rss": "^4.0.5",
|
||||||
"@astrojs/sitemap": "^3.1.1",
|
"@astrojs/sitemap": "^3.1.1",
|
||||||
"@coingecko/cryptoformat": "^0.8.0",
|
"@coingecko/cryptoformat": "^0.8.1",
|
||||||
"@nanostores/persistent": "^0.9.1",
|
"@nanostores/persistent": "^0.10.1",
|
||||||
"@nanostores/query": "^0.2.8",
|
"@nanostores/query": "^0.2.10",
|
||||||
"@nanostores/react": "^0.7.1",
|
"@nanostores/react": "^0.7.2",
|
||||||
"@radix-ui/react-select": "^2.0.0",
|
"@radix-ui/react-select": "^2.0.0",
|
||||||
"@rainbow-me/rainbowkit": "^1.3.0",
|
"@rainbow-me/rainbowkit": "^1.3.0",
|
||||||
"astro": "4.4.6",
|
"astro": "4.5.2",
|
||||||
"astro-expressive-code": "^0.29.4",
|
"astro-expressive-code": "^0.33.4",
|
||||||
"astro-redirect-from": "^1.0.6",
|
"astro-redirect-from": "^1.0.6",
|
||||||
"date-fns": "^3.3.1",
|
"date-fns": "^3.4.0",
|
||||||
"dms2dec": "^1.1.0",
|
"dms2dec": "^1.1.0",
|
||||||
"fast-exif": "^2.0.1",
|
"fast-exif": "^2.0.1",
|
||||||
"feather-icons": "^4.29.1",
|
"feather-icons": "^4.29.1",
|
||||||
"fraction.js": "^4.3.7",
|
"fraction.js": "^4.3.7",
|
||||||
"fuse.js": "^7.0.0",
|
"fuse.js": "^7.0.0",
|
||||||
"motion": "^10.16.4",
|
"motion": "^10.17.0",
|
||||||
"nanostores": "^0.9.5",
|
"nanostores": "^0.10.0",
|
||||||
"pigeon-maps": "^0.21.3",
|
"pigeon-maps": "^0.21.4",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"sharp": "^0.33.0",
|
"sharp": "^0.33.2",
|
||||||
"slugify": "^1.6.6",
|
"slugify": "^1.6.6",
|
||||||
"swr": "^2.2.5",
|
"swr": "^2.2.5",
|
||||||
"viem": "^1.19.13",
|
"viem": "^1.19.13",
|
||||||
"wagmi": "^1.4.12"
|
"wagmi": "^1.4.12"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.40.1",
|
"@playwright/test": "^1.42.1",
|
||||||
"@testing-library/jest-dom": "^6.1.5",
|
"@testing-library/jest-dom": "^6.4.2",
|
||||||
"@testing-library/react": "^14.1.2",
|
"@testing-library/react": "^14.1.2",
|
||||||
"@types/node": "^20.10.4",
|
"@types/node": "^20.11.26",
|
||||||
"@types/react": "^18.2.61",
|
"@types/react": "^18.2.65",
|
||||||
"@types/react-dom": "^18.2.19",
|
"@types/react-dom": "^18.2.21",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||||
"@typescript-eslint/parser": "^6.14.0",
|
"@typescript-eslint/parser": "^6.14.0",
|
||||||
"@vitest/coverage-v8": "^1.2.2",
|
"@vitest/coverage-v8": "^1.2.2",
|
||||||
|
@ -122,7 +122,7 @@
|
||||||
"vitest": "^1.1.1"
|
"vitest": "^1.1.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "18"
|
"node": "20"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { Icon as ChevronsDown } from '@images/components/react/ChevronsDown'
|
||||||
import { Icon as ChevronsUp } from '@images/components/react/ChevronsUp'
|
import { Icon as ChevronsUp } from '@images/components/react/ChevronsUp'
|
||||||
import { useFetchTokens } from '@features/Web3/hooks/useFetchTokens'
|
import { useFetchTokens } from '@features/Web3/hooks/useFetchTokens'
|
||||||
import { useStore } from '@nanostores/react'
|
import { useStore } from '@nanostores/react'
|
||||||
import { $selectedToken, $setSelectedToken } from '@features/Web3/stores'
|
import { $selectedToken } from '@features/Web3/stores'
|
||||||
import { Loader } from '@components/Loader'
|
import { Loader } from '@components/Loader'
|
||||||
import { useAccount } from 'wagmi'
|
import { useAccount } from 'wagmi'
|
||||||
import { useEffect } from 'react'
|
import { useEffect } from 'react'
|
||||||
|
@ -24,7 +24,7 @@ export function TokenSelect() {
|
||||||
const token = tokens?.find((token) => token.address === value)
|
const token = tokens?.find((token) => token.address === value)
|
||||||
if (!token) return
|
if (!token) return
|
||||||
|
|
||||||
$setSelectedToken(token)
|
$selectedToken.set(token)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auto-select native token
|
// Auto-select native token
|
||||||
|
@ -37,7 +37,7 @@ export function TokenSelect() {
|
||||||
|
|
||||||
return tokens && address ? (
|
return tokens && address ? (
|
||||||
<Select.Root
|
<Select.Root
|
||||||
defaultValue={selectedToken?.address || tokens[0].address}
|
// defaultValue={selectedToken?.address || tokens[0].address}
|
||||||
value={selectedToken?.address}
|
value={selectedToken?.address}
|
||||||
onValueChange={(value: `0x${string}`) => handleValueChange(value)}
|
onValueChange={(value: `0x${string}`) => handleValueChange(value)}
|
||||||
disabled={isLoading}
|
disabled={isLoading}
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
import { action } from 'nanostores'
|
|
||||||
import { persistentAtom } from '@nanostores/persistent'
|
import { persistentAtom } from '@nanostores/persistent'
|
||||||
import type { GetToken } from '../hooks/useFetchTokens'
|
import type { GetToken } from '../hooks/useFetchTokens'
|
||||||
|
|
||||||
|
@ -12,12 +11,3 @@ export const $selectedToken = persistentAtom<GetToken | undefined>(
|
||||||
decode: JSON.parse
|
decode: JSON.parse
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
export const $setSelectedToken = action(
|
|
||||||
$selectedToken,
|
|
||||||
'setSelectedToken',
|
|
||||||
(store, token: GetToken | undefined) => {
|
|
||||||
store.set(token)
|
|
||||||
return store.get()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
import { action, atom } from 'nanostores'
|
import { atom } from 'nanostores'
|
||||||
import { normalizeAmount } from '../lib/normalizeAmount'
|
import { normalizeAmount } from '../lib/normalizeAmount'
|
||||||
|
|
||||||
export const $isInitSend = atom<boolean>(false)
|
export const $isInitSend = atom<boolean>(false)
|
||||||
export const $amount = atom<string>('')
|
export const $amount = atom<string>('')
|
||||||
export const $txHash = atom<string | undefined>()
|
export const $txHash = atom<string | undefined>()
|
||||||
|
|
||||||
export const $setAmount = action($amount, 'setAmount', (store, amount) => {
|
export const $setAmount = (amount: string) => {
|
||||||
const normalizedAmount = normalizeAmount(amount)
|
const normalizedAmount = normalizeAmount(amount)
|
||||||
store.set(normalizedAmount)
|
return $amount.set(normalizedAmount)
|
||||||
return store.get()
|
}
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in New Issue