mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
Switch from yarn to pnpm, clean up dependency tree
- Replace yarn v1 with pnpm 10.11.0 across all build configs - Move misplaced deps to devDependencies (cspell, esbuild, @openzeppelin/contracts, @next/bundle-analyzer, @types/papaparse, @types/react-scroll) - Remove stale @types/[email protected] override — use correct React 19 types (fixes 22 type errors) - Convert yarn resolutions to pnpm.overrides - Update Dockerfile, Dockerfile.lux, CI workflows, and all shell scripts - Add .npmrc with shamefully-hoist for Next.js compatibility - Add outputFileTracingRoot to next.config.js
This commit is contained in:
@@ -31,11 +31,14 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -43,27 +46,27 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Run ESLint
|
||||
run: yarn lint:eslint
|
||||
run: pnpm lint:eslint
|
||||
|
||||
- name: Compile TypeScript
|
||||
run: yarn lint:tsc
|
||||
run: pnpm lint:tsc
|
||||
|
||||
- name: Check licenses
|
||||
run: yarn lint:license:check
|
||||
run: pnpm lint:license:check
|
||||
|
||||
- name: Check spelling
|
||||
run: yarn lint:cspell --no-progress
|
||||
run: pnpm lint:cspell --no-progress
|
||||
|
||||
toolkit_build_check:
|
||||
name: Toolkit build check
|
||||
@@ -73,11 +76,14 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -85,30 +91,30 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install project dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Install package dependencies
|
||||
run: |
|
||||
cd ./toolkit/package
|
||||
yarn --frozen-lockfile
|
||||
pnpm install --no-lockfile
|
||||
|
||||
- name: Type check the package
|
||||
run: |
|
||||
cd ./toolkit/package
|
||||
yarn typecheck
|
||||
pnpm typecheck
|
||||
|
||||
- name: Build the package
|
||||
run: |
|
||||
cd ./toolkit/package
|
||||
yarn build
|
||||
pnpm build
|
||||
|
||||
- name: Verify build output
|
||||
run: |
|
||||
@@ -136,11 +142,14 @@ jobs:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -148,23 +157,23 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Install script dependencies
|
||||
run: cd ./deploy/tools/envs-validator && yarn --frozen-lockfile
|
||||
run: cd ./deploy/tools/envs-validator && pnpm install --no-lockfile
|
||||
|
||||
- name: Run validation tests
|
||||
run: |
|
||||
set +e
|
||||
cd ./deploy/tools/envs-validator && yarn test
|
||||
cd ./deploy/tools/envs-validator && pnpm test
|
||||
exitcode="$?"
|
||||
echo "exitcode=$exitcode" >> $GITHUB_OUTPUT
|
||||
exit "$exitcode"
|
||||
@@ -179,11 +188,14 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -191,18 +203,18 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Run Vitest
|
||||
run: yarn test:vitest ${{ github.event_name == 'pull_request' && '--changed=origin/main' || '' }} --passWithNoTests
|
||||
run: pnpm test:vitest ${{ github.event_name == 'pull_request' && '--changed=origin/main' || '' }} --passWithNoTests
|
||||
|
||||
pw_affected_tests:
|
||||
name: Resolve affected Playwright tests
|
||||
@@ -215,11 +227,14 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -227,21 +242,21 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Install script dependencies
|
||||
run: cd ./deploy/tools/affected-tests && yarn --frozen-lockfile
|
||||
run: cd ./deploy/tools/affected-tests && pnpm install --no-lockfile
|
||||
|
||||
- name: Run script
|
||||
run: yarn test:pw:detect-affected
|
||||
run: pnpm test:pw:detect-affected
|
||||
|
||||
- name: Upload result file
|
||||
uses: actions/upload-artifact@v5
|
||||
@@ -276,11 +291,14 @@ jobs:
|
||||
with:
|
||||
lfs: 'true'
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
uses: actions/cache@v4
|
||||
@@ -288,15 +306,15 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Generate Chakra types
|
||||
if: steps.cache-node-modules.outputs.cache-hit == 'true'
|
||||
run: yarn chakra:typegen
|
||||
run: pnpm chakra:typegen
|
||||
|
||||
- name: Download affected tests list
|
||||
if: ${{ needs.pw_affected_tests.result == 'success' }}
|
||||
@@ -307,7 +325,7 @@ jobs:
|
||||
path: ./playwright
|
||||
|
||||
- name: Run PlayWright
|
||||
run: yarn test:pw:ci --affected=${{ github.event_name == 'pull_request' }} --pass-with-no-tests
|
||||
run: pnpm test:pw:ci --affected=${{ github.event_name == 'pull_request' }} --pass-with-no-tests
|
||||
env:
|
||||
HOME: /root
|
||||
PW_PROJECT: ${{ matrix.project }}
|
||||
@@ -349,12 +367,16 @@ jobs:
|
||||
if: steps.check-reports.outputs.has_reports == 'true'
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup pnpm
|
||||
if: steps.check-reports.outputs.has_reports == 'true'
|
||||
uses: pnpm/action-setup@v4
|
||||
|
||||
- name: Setup node
|
||||
if: steps.check-reports.outputs.has_reports == 'true'
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 22.14.0
|
||||
cache: 'yarn'
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Cache node_modules
|
||||
if: steps.check-reports.outputs.has_reports == 'true'
|
||||
@@ -363,11 +385,11 @@ jobs:
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||
key: node_modules-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.check-reports.outputs.has_reports == 'true' && steps.cache-node-modules.outputs.cache-hit != 'true'
|
||||
run: yarn --frozen-lockfile
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Merge into HTML Report
|
||||
if: steps.check-reports.outputs.has_reports == 'true'
|
||||
@@ -407,4 +429,4 @@ jobs:
|
||||
else
|
||||
echo "Download the **playwright-html-report** artifact below to view the report (open \`index.html\` in a browser)." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
echo "[Read about ducks](https://animalkingdom.org/animals/ducks/)" >> $GITHUB_STEP_SUMMARY
|
||||
echo "[Read about ducks](https://animalkingdom.org/animals/ducks/)" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
@@ -42,12 +42,15 @@ jobs:
|
||||
cd ./toolkit/package
|
||||
npm version ${{ inputs.version }}
|
||||
|
||||
- name: Setup pnpm
|
||||
run: corepack enable && corepack prepare [email protected] --activate
|
||||
|
||||
- name: Build the package
|
||||
run: |
|
||||
yarn
|
||||
pnpm install --frozen-lockfile
|
||||
cd ./toolkit/package
|
||||
yarn
|
||||
yarn build
|
||||
pnpm install --no-lockfile
|
||||
pnpm build
|
||||
|
||||
- name: Publish to NPM registry
|
||||
run: |
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
shamefully-hoist=true
|
||||
strict-peer-dependencies=false
|
||||
auto-install-peers=true
|
||||
+26
-24
@@ -3,65 +3,66 @@
|
||||
# *****************************
|
||||
FROM node:22.14.0-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 python3 make g++
|
||||
RUN apk add --no-cache libc6-compat python3 make g++ git
|
||||
RUN ln -sf /usr/bin/python3 /usr/bin/python
|
||||
RUN corepack enable && corepack prepare [email protected] --activate
|
||||
|
||||
### APP
|
||||
# Install dependencies
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock tsconfig.json ./
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
COPY tsconfig.json ./
|
||||
COPY types ./types
|
||||
COPY lib ./lib
|
||||
COPY configs/app ./configs/app
|
||||
COPY toolkit/theme ./toolkit/theme
|
||||
COPY toolkit/utils ./toolkit/utils
|
||||
COPY toolkit/components/forms/validators/url.ts ./toolkit/components/forms/validators/url.ts
|
||||
RUN apk add git
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
|
||||
### FEATURE REPORTER
|
||||
# Install dependencies
|
||||
WORKDIR /feature-reporter
|
||||
COPY ./deploy/tools/feature-reporter/package.json ./deploy/tools/feature-reporter/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/feature-reporter/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
|
||||
### ENV VARIABLES CHECKER
|
||||
# Install dependencies
|
||||
WORKDIR /envs-validator
|
||||
COPY ./deploy/tools/envs-validator/package.json ./deploy/tools/envs-validator/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/envs-validator/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
### FAVICON GENERATOR
|
||||
# Install dependencies
|
||||
WORKDIR /favicon-generator
|
||||
COPY ./deploy/tools/favicon-generator/package.json ./deploy/tools/favicon-generator/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/favicon-generator/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
### SITEMAP GENERATOR
|
||||
# Install dependencies
|
||||
WORKDIR /sitemap-generator
|
||||
COPY ./deploy/tools/sitemap-generator/package.json ./deploy/tools/sitemap-generator/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/sitemap-generator/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
### MULTICHAIN CONFIG GENERATOR
|
||||
# Install dependencies
|
||||
WORKDIR /multichain-config-generator
|
||||
COPY ./deploy/tools/multichain-config-generator/package.json ./deploy/tools/multichain-config-generator/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/multichain-config-generator/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
### ESSENTIAL DAPPS CHAINS CONFIG GENERATOR
|
||||
# Install dependencies
|
||||
WORKDIR /essential-dapps-chains-config-generator
|
||||
COPY ./deploy/tools/essential-dapps-chains-config-generator/package.json ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
### llms.txt GENERATOR
|
||||
# Install dependencies
|
||||
WORKDIR /llms-txt-generator
|
||||
COPY ./deploy/tools/llms-txt-generator/package.json ./deploy/tools/llms-txt-generator/yarn.lock ./
|
||||
RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
COPY ./deploy/tools/llms-txt-generator/package.json ./
|
||||
RUN pnpm install --no-lockfile
|
||||
|
||||
|
||||
# *****************************
|
||||
@@ -69,6 +70,7 @@ RUN yarn --frozen-lockfile --network-timeout 100000
|
||||
# *****************************
|
||||
FROM node:22.14.0-alpine AS builder
|
||||
RUN apk add --no-cache --upgrade libc6-compat bash jq
|
||||
RUN corepack enable && corepack prepare [email protected] --activate
|
||||
|
||||
# pass build args to env variables
|
||||
ARG GIT_COMMIT_SHA
|
||||
@@ -99,20 +101,20 @@ RUN set -a && \
|
||||
|
||||
# Build app for production
|
||||
ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
RUN yarn build
|
||||
RUN pnpm build
|
||||
|
||||
|
||||
### FEATURE REPORTER
|
||||
# Copy dependencies and source code, then build
|
||||
COPY --from=deps /feature-reporter/node_modules ./deploy/tools/feature-reporter/node_modules
|
||||
RUN cd ./deploy/tools/feature-reporter && yarn compile_config
|
||||
RUN cd ./deploy/tools/feature-reporter && yarn build
|
||||
RUN cd ./deploy/tools/feature-reporter && pnpm compile_config
|
||||
RUN cd ./deploy/tools/feature-reporter && pnpm build
|
||||
|
||||
|
||||
### ENV VARIABLES CHECKER
|
||||
# Copy dependencies and source code, then build
|
||||
COPY --from=deps /envs-validator/node_modules ./deploy/tools/envs-validator/node_modules
|
||||
RUN cd ./deploy/tools/envs-validator && yarn build
|
||||
RUN cd ./deploy/tools/envs-validator && pnpm build
|
||||
|
||||
|
||||
### FAVICON GENERATOR
|
||||
@@ -127,17 +129,17 @@ COPY --from=deps /sitemap-generator/node_modules ./deploy/tools/sitemap-generato
|
||||
### MULTICHAIN CONFIG GENERATOR
|
||||
# Copy dependencies and source code, then build
|
||||
COPY --from=deps /multichain-config-generator/node_modules ./deploy/tools/multichain-config-generator/node_modules
|
||||
RUN cd ./deploy/tools/multichain-config-generator && yarn build
|
||||
RUN cd ./deploy/tools/multichain-config-generator && pnpm build
|
||||
|
||||
### ESSENTIAL DAPPS CHAINS CONFIG GENERATOR
|
||||
# Copy dependencies and source code, then build
|
||||
COPY --from=deps /essential-dapps-chains-config-generator/node_modules ./deploy/tools/essential-dapps-chains-config-generator/node_modules
|
||||
RUN cd ./deploy/tools/essential-dapps-chains-config-generator && yarn build
|
||||
RUN cd ./deploy/tools/essential-dapps-chains-config-generator && pnpm build
|
||||
|
||||
### llms.txt GENERATOR
|
||||
# Copy dependencies and source code, then build
|
||||
COPY --from=deps /llms-txt-generator/node_modules ./deploy/tools/llms-txt-generator/node_modules
|
||||
RUN cd ./deploy/tools/llms-txt-generator && yarn build
|
||||
RUN cd ./deploy/tools/llms-txt-generator && pnpm build
|
||||
|
||||
|
||||
# *****************************
|
||||
|
||||
+8
-10
@@ -1,16 +1,15 @@
|
||||
# Build stage
|
||||
FROM node:22.11.0-alpine AS builder
|
||||
FROM node:22.14.0-alpine AS builder
|
||||
|
||||
RUN apk add --no-cache libc6-compat python3 make g++ git
|
||||
RUN corepack enable && corepack prepare [email protected] --activate
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files
|
||||
COPY package.json yarn.lock ./
|
||||
COPY package.json pnpm-lock.yaml .npmrc ./
|
||||
COPY tsconfig.json ./
|
||||
COPY next.config.js ./
|
||||
COPY postcss.config.js ./
|
||||
COPY tailwind.config.ts ./
|
||||
|
||||
# Copy necessary directories
|
||||
COPY types ./types
|
||||
@@ -23,7 +22,6 @@ COPY nextjs ./nextjs
|
||||
COPY theme ./theme
|
||||
COPY icons ./icons
|
||||
COPY mocks ./mocks
|
||||
COPY jest ./jest
|
||||
COPY playwright ./playwright
|
||||
COPY deploy ./deploy
|
||||
COPY public ./public
|
||||
@@ -33,13 +31,14 @@ COPY stubs ./stubs
|
||||
COPY .env.production .env.local
|
||||
|
||||
# Install dependencies
|
||||
RUN yarn install --frozen-lockfile --network-timeout 100000
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
# Build the application
|
||||
RUN yarn build
|
||||
ENV NODE_OPTIONS="--max-old-space-size=8192"
|
||||
RUN pnpm build
|
||||
|
||||
# Production stage
|
||||
FROM node:22.11.0-alpine AS runner
|
||||
FROM node:22.14.0-alpine AS runner
|
||||
|
||||
RUN apk add --no-cache --upgrade bash curl jq unzip
|
||||
|
||||
@@ -52,7 +51,6 @@ RUN adduser --system --uid 1001 nextjs
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/public ./public
|
||||
|
||||
# Set permissions
|
||||
RUN chown -R nextjs:nodejs /app
|
||||
@@ -64,4 +62,4 @@ EXPOSE 3000
|
||||
ENV PORT=3000
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD ["node", "server.js"]
|
||||
CMD ["node", "server.js"]
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
icons_dir="./icons"
|
||||
target_dir="./public/icons"
|
||||
|
||||
yarn icons build -i $icons_dir -o $target_dir --optimize
|
||||
npx icons build -i $icons_dir -o $target_dir --optimize
|
||||
|
||||
create_registry_file() {
|
||||
# Create a temporary file to store the registry
|
||||
|
||||
@@ -4,7 +4,7 @@ master_url="${FAVICON_MASTER_URL:-$NEXT_PUBLIC_NETWORK_ICON}"
|
||||
export MASTER_URL="$master_url"
|
||||
|
||||
cd ./deploy/tools/favicon-generator
|
||||
yarn install --frozen-lockfile
|
||||
pnpm install --frozen-lockfile
|
||||
node "$(pwd)/index.js"
|
||||
if [ $? -ne 0 ]; then
|
||||
cd ../../../
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
cd ./deploy/tools/sitemap-generator
|
||||
yarn next-sitemap
|
||||
npx next-sitemap
|
||||
@@ -4,8 +4,8 @@
|
||||
"main": "index.js",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"compile_config": "yarn tsc -p ./tsconfig.json && yarn tsc-alias -p ./tsconfig.json",
|
||||
"build": "yarn webpack-cli -c ./webpack.config.js",
|
||||
"compile_config": "npx tsc -p ./tsconfig.json && npx tsc-alias -p ./tsconfig.json",
|
||||
"build": "npx webpack-cli -c ./webpack.config.js",
|
||||
"print_report": "node ./index.js",
|
||||
"dev": "./dev.sh"
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "yarn build && yarn generate:dev",
|
||||
"dev": "pnpm build && pnpm generate:dev",
|
||||
"build": "vite build --logLevel error",
|
||||
"generate": "node dist/index.js",
|
||||
"generate:dev": "dotenv -e ../../../configs/envs/.env.eth -- node dist/index.js"
|
||||
|
||||
+2
-1
@@ -25,7 +25,7 @@ const moduleExports = {
|
||||
);
|
||||
config.resolve.fallback = { fs: false, net: false, tls: false };
|
||||
config.externals.push('pino-pretty', 'lokijs', 'encoding');
|
||||
|
||||
|
||||
config.experiments = { ...config.experiments, topLevelAwait: true };
|
||||
// Tell webpack the target supports async/await so it stops warning about top-level await
|
||||
// Top-level await is belong to ES2017 specification that is adopted by all major browsers and Node.js.
|
||||
@@ -44,6 +44,7 @@ const moduleExports = {
|
||||
redirects,
|
||||
headers,
|
||||
output: 'standalone',
|
||||
outputFileTracingRoot: __dirname,
|
||||
productionBrowserSourceMaps: false,
|
||||
serverExternalPackages: ["@opentelemetry/sdk-node", "@opentelemetry/auto-instrumentations-node"],
|
||||
experimental: {
|
||||
|
||||
+20
-25
@@ -12,7 +12,7 @@
|
||||
"dev:preset": "./tools/scripts/dev.preset.sh",
|
||||
"dev:preset:sync": "tsc -p ./tools/preset-sync/tsconfig.json && node ./tools/preset-sync/index.js",
|
||||
"build": "next build",
|
||||
"build:next": "./deploy/scripts/download_assets.sh ./public/assets/configs && yarn svg:build-sprite && ./deploy/scripts/make_envs_script.sh && next build",
|
||||
"build:next": "./deploy/scripts/download_assets.sh ./public/assets/configs && pnpm svg:build-sprite && ./deploy/scripts/make_envs_script.sh && next build",
|
||||
"build:docker": "./tools/scripts/build.docker.sh",
|
||||
"start": "next start",
|
||||
"start:docker:local": "docker run -p 3000:3000 --env-file .env.local blockscout-frontend:local",
|
||||
@@ -29,10 +29,10 @@
|
||||
"svg:format": "svgo -r --config svgo.config.format.js ./icons ./toolkit/chakra/assets",
|
||||
"svg:build-sprite": "./deploy/scripts/build_sprite.sh",
|
||||
"test:pw": "./tools/scripts/pw.sh",
|
||||
"test:pw:local": "export NODE_PATH=$(pwd)/node_modules && yarn test:pw",
|
||||
"test:pw:local": "export NODE_PATH=$(pwd)/node_modules && pnpm test:pw",
|
||||
"test:pw:docker": "docker run --rm --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.57.0-noble ./tools/scripts/pw.docker.sh",
|
||||
"test:pw:docker:deps": "docker run --rm --ipc=host -v $(pwd):/work/ -w /work/ -it mcr.microsoft.com/playwright:v1.57.0-noble ./tools/scripts/pw.docker.deps.sh",
|
||||
"test:pw:ci": "yarn test:pw --project=$PW_PROJECT",
|
||||
"test:pw:ci": "pnpm test:pw --project=$PW_PROJECT",
|
||||
"test:pw:detect-affected": "node ./deploy/tools/affected-tests/index.js",
|
||||
"test:vitest": "vitest",
|
||||
"favicon:generate:dev": "./tools/scripts/favicon-generator.dev.sh",
|
||||
@@ -62,7 +62,6 @@
|
||||
"@metamask/providers": "^10.2.1",
|
||||
"@monaco-editor/react": "^4.7.0",
|
||||
"@multisender.app/multisender-react-widget": "0.2.3",
|
||||
"@next/bundle-analyzer": "15.5.9",
|
||||
"@nouns/assets": "^0.10.0",
|
||||
"@nouns/sdk": "^1.2.0",
|
||||
"@opentelemetry/api": "^1.4.1",
|
||||
@@ -74,7 +73,6 @@
|
||||
"@opentelemetry/sdk-node": "0.49.1",
|
||||
"@opentelemetry/sdk-trace-node": "1.22.0",
|
||||
"@opentelemetry/semantic-conventions": "1.22.0",
|
||||
"@openzeppelin/contracts": "5.4.0",
|
||||
"@reown/appkit": "1.7.20",
|
||||
"@reown/appkit-adapter-wagmi": "1.7.20",
|
||||
"@rollbar/react": "0.12.1",
|
||||
@@ -83,21 +81,17 @@
|
||||
"@specify-sh/sdk": "0.4.2",
|
||||
"@tanstack/react-query": "5.55.4",
|
||||
"@tanstack/react-query-devtools": "5.55.4",
|
||||
"@types/papaparse": "^5.3.5",
|
||||
"@types/react-scroll": "^1.8.4",
|
||||
"@uidotdev/usehooks": "2.4.1",
|
||||
"airtable": "^0.12.2",
|
||||
"bignumber.js": "^9.1.0",
|
||||
"blo": "^1.1.1",
|
||||
"brotli-compress": "1.3.3",
|
||||
"crypto-js": "^4.2.0",
|
||||
"cspell": "9.6.4",
|
||||
"d3": "^7.6.1",
|
||||
"dappscout-iframe": "0.4.0",
|
||||
"dayjs": "^1.11.5",
|
||||
"dom-to-image": "^2.6.0",
|
||||
"es-toolkit": "1.39.10",
|
||||
"esbuild": "0.25.12",
|
||||
"focus-visible": "^5.2.0",
|
||||
"gradient-avatar": "git+https://github.com/blockscout/gradient-avatar.git",
|
||||
"graphiql": "^4.1.2",
|
||||
@@ -141,7 +135,9 @@
|
||||
"@chakra-ui/cli": "3.30.0",
|
||||
"@eslint/compat": "1.2.2",
|
||||
"@eslint/js": "9.14.0",
|
||||
"@next/bundle-analyzer": "15.5.9",
|
||||
"@next/eslint-plugin-next": "15.0.3",
|
||||
"@openzeppelin/contracts": "5.4.0",
|
||||
"@playwright/experimental-ct-react": "1.57.0",
|
||||
"@playwright/test": "1.57.0",
|
||||
"@stylistic/eslint-plugin": "5.2.3",
|
||||
@@ -156,17 +152,21 @@
|
||||
"@types/js-cookie": "^3.0.2",
|
||||
"@types/mixpanel-browser": "^2.38.1",
|
||||
"@types/node": "20.16.7",
|
||||
"@types/papaparse": "^5.3.5",
|
||||
"@types/phoenix": "^1.5.4",
|
||||
"@types/qrcode": "^1.5.0",
|
||||
"@types/react": "19.1.7",
|
||||
"@types/react-dom": "19.1.6",
|
||||
"@types/react-google-recaptcha": "^2.1.5",
|
||||
"@types/react-scroll": "^1.8.4",
|
||||
"@types/swagger-ui-react": "5.18.0",
|
||||
"@types/ws": "^8.5.3",
|
||||
"@typescript-eslint/eslint-plugin": "^5.60.0",
|
||||
"@vitejs/plugin-react": "^4.0.0",
|
||||
"cspell": "9.6.4",
|
||||
"css-loader": "^6.7.3",
|
||||
"dotenv-cli": "^6.0.0",
|
||||
"esbuild": "0.25.12",
|
||||
"eslint": "9.39.2",
|
||||
"eslint-config-next": "15.4.10",
|
||||
"eslint-plugin-consistent-default-export-name": "^0.0.15",
|
||||
@@ -200,21 +200,16 @@
|
||||
"lint-staged": {
|
||||
"*.{js,jsx,ts,tsx}": "eslint --cache --fix"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "18.3.12",
|
||||
"@types/react-dom": "18.3.1",
|
||||
"wagmi/**/ws": "8.17.1",
|
||||
"@helia/verified-fetch/**/axios": "1.12.0",
|
||||
"@helia/verified-fetch/**/tar-fs": "2.1.4",
|
||||
"@helia/verified-fetch/**/node-forge": "1.3.2",
|
||||
"@multisender.app/multisender-react-widget/**/axios": "1.12.0",
|
||||
"@reown/appkit/**/node-forge": "1.3.2",
|
||||
"@reown/appkit-adapter-wagmi/**/node-forge": "1.3.2",
|
||||
"eslint/**/brace-expansion": "1.1.12",
|
||||
"swagger-ui-react/**/js-yaml": "4.1.1",
|
||||
"dappscout-iframe/**/ws": "8.17.1",
|
||||
"viem/**/@noble/hashes": "1.8.0",
|
||||
"@walletconnect/ethereum-provider/**/@reown/appkit/**/@noble/hashes": "1.8.0"
|
||||
"pnpm": {
|
||||
"overrides": {
|
||||
"ws": "8.17.1",
|
||||
"axios": "1.12.0",
|
||||
"tar-fs": "2.1.4",
|
||||
"node-forge": "1.3.2",
|
||||
"brace-expansion": "1.1.12",
|
||||
"js-yaml": "4.1.1",
|
||||
"@noble/hashes": "1.8.0"
|
||||
}
|
||||
},
|
||||
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
||||
"packageManager": "[email protected]"
|
||||
}
|
||||
|
||||
Generated
+16270
-8931
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: yarn dev:preset <preset_name>"
|
||||
echo "Usage: pnpm dev:preset <preset_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -29,13 +29,13 @@ dotenv \
|
||||
if [[ "$preset_name" == "optimism_superchain" ]]; then
|
||||
dotenv \
|
||||
-e $config_file \
|
||||
-- bash -c 'cd deploy/tools/multichain-config-generator && yarn install --silent && yarn build && yarn generate' || exit 1
|
||||
-- bash -c 'cd deploy/tools/multichain-config-generator && pnpm install --silent && pnpm build && pnpm generate' || exit 1
|
||||
fi
|
||||
|
||||
# generate essential dapps chains config if marketplace essential dapps enabled
|
||||
dotenv \
|
||||
-e $config_file \
|
||||
-- bash -c 'cd deploy/tools/essential-dapps-chains-config-generator && yarn install --silent && yarn build && yarn generate' || exit 1
|
||||
-- bash -c 'cd deploy/tools/essential-dapps-chains-config-generator && pnpm install --silent && pnpm build && pnpm generate' || exit 1
|
||||
|
||||
source ./deploy/scripts/build_sprite.sh
|
||||
echo ""
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Usage: yarn start:docker:preset <preset_name>"
|
||||
echo "Usage: pnpm start:docker:preset <preset_name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ master_url="https://raw.githubusercontent.com/blockscout/frontend/main/tools/scr
|
||||
|
||||
dotenv \
|
||||
-v MASTER_URL=$master_url \
|
||||
-- bash -c 'cd ./deploy/tools/favicon-generator && yarn install --frozen-lockfile && node "$(pwd)/index.js"'
|
||||
-- bash -c 'cd ./deploy/tools/favicon-generator && pnpm install --frozen-lockfile && node "$(pwd)/index.js"'
|
||||
|
||||
if [ -d "$favicon_folder" ]; then
|
||||
rm -r "$favicon_folder"
|
||||
|
||||
@@ -14,4 +14,4 @@ export npm_config_build_from_source=false
|
||||
export npm_config_prefer_offline=true
|
||||
export NODE_PATH=$(pwd)/node_modules_linux
|
||||
|
||||
yarn install --modules-folder node_modules_linux
|
||||
pnpm install --modules-folder node_modules_linux
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
export NODE_PATH=$(pwd)/node_modules_linux
|
||||
|
||||
yarn test:pw "$@"
|
||||
pnpm test:pw "$@"
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ dotenv \
|
||||
|
||||
# Important to set this variable here, so the sprite will be built correctly
|
||||
export NEXT_PUBLIC_APP_ENV=pw
|
||||
yarn svg:build-sprite
|
||||
pnpm svg:build-sprite
|
||||
|
||||
# Check if the "--affected" argument is present in the script args
|
||||
check_affected_flag() {
|
||||
|
||||
@@ -9,4 +9,4 @@ fi
|
||||
|
||||
dotenv \
|
||||
-e $config_file \
|
||||
-- bash -c 'cd ./deploy/tools/sitemap-generator && yarn && yarn next-sitemap'
|
||||
-- bash -c 'cd ./deploy/tools/sitemap-generator && pnpm install && npx next-sitemap'
|
||||
Reference in New Issue
Block a user