mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
revert node18
This commit is contained in:
@@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 16
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 16
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
@@ -33,7 +33,7 @@ jobs:
|
||||
lfs: 'true'
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version: 16
|
||||
cache: 'yarn'
|
||||
- name: Install dependencies
|
||||
run: yarn install --frozen-lockfile
|
||||
|
||||
+3
-3
@@ -1,5 +1,5 @@
|
||||
# Install dependencies only when needed
|
||||
FROM node:18-alpine AS deps
|
||||
FROM node:16-alpine AS deps
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
RUN apk add --no-cache libc6-compat
|
||||
WORKDIR /app
|
||||
@@ -10,7 +10,7 @@ RUN apk add git
|
||||
RUN yarn --frozen-lockfile
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM node:18-alpine AS builder
|
||||
FROM node:16-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
@@ -33,7 +33,7 @@ ENV NEXT_PUBLIC_GIT_COMMIT_SHA=$GIT_COMMIT_SHA
|
||||
RUN yarn build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:18-alpine AS runner
|
||||
FROM node:16-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"homepage": "https://github.com/blockscout/frontend#readme",
|
||||
"engines": {
|
||||
"node": "18",
|
||||
"node": "16",
|
||||
"npm": "8"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@@ -33,12 +33,7 @@ export const getServerSideProps: GetServerSideProps<Props> = async({ req, res, r
|
||||
try {
|
||||
const q = String(query.q);
|
||||
const url = buildUrlNode('search_check_redirect', undefined, { q });
|
||||
const redirectsResponse = await fetchFactory(req)(url, {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore:next-line timeout property exist for AbortSignal since Node.js 17 - https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal
|
||||
// but @types/node has not updated their types yet, see issue https://github.com/DefinitelyTyped/DefinitelyTyped/issues/60868
|
||||
signal: AbortSignal.timeout(1_000),
|
||||
});
|
||||
const redirectsResponse = await fetchFactory(req)(url);
|
||||
const payload = await redirectsResponse.json() as SearchRedirectResult;
|
||||
|
||||
if (!payload || typeof payload !== 'object' || !payload.redirect) {
|
||||
|
||||
Reference in New Issue
Block a user