From 874ca6d009967a63eeb7547ef441d615bbfcc9e4 Mon Sep 17 00:00:00 2001 From: albertfolch-redeemeum Date: Thu, 25 Sep 2025 16:53:55 +0200 Subject: [PATCH 01/10] chore: migrate create-react-app to vite --- public/index.html => index.html | 46 +- package-lock.json | 2453 ++++++++++++----- package.json | 21 +- .../SwapCurrencyInputPanel.tsx | 2 +- .../typechain/BosonSnapshotGate.js | 2 - .../BosonSnapshotGate/typechain/common.js | 2 - .../factories/BosonSnapshotGate__factory.js | 9 +- .../typechain/factories/index.js | 14 +- .../BosonSnapshotGate/typechain/index.js | 60 +- .../DetailWidget/DetailDisputeResolver.tsx | 2 +- .../miniPortfolio/PortfolioLogo.tsx | 2 +- .../components/Profile/ChooseProfileType.tsx | 2 +- .../modal/components/Profile/utils.ts | 6 +- src/components/price/CurrencyIcon.tsx | 4 +- .../routingDiagram/RoutingDiagram.tsx | 2 +- src/components/settings/menuButton/index.tsx | 2 +- src/components/swap/ConfirmSwapModal.tsx | 2 +- src/components/swap/GasEstimateTooltip.tsx | 2 +- .../swap/pendingModalContent/Logos.tsx | 2 +- .../swap/pendingModalContent/index.tsx | 2 +- src/components/timeline/Timeline.tsx | 4 +- .../__generated__/types-and-hooks.ts | 0 src/{graphql/data => graphqlData}/apollo.ts | 0 src/{graphql/data => graphqlData}/util.tsx | 4 +- src/index.tsx | 2 +- src/lib/config.ts | 75 +- src/lib/types/externals.d.ts | 24 + src/lib/utils/hooks/useUSDPrice.ts | 4 +- .../utils/hooks/useUniswapXSwapCallback.ts | 2 +- src/lib/utils/nativeTokens.ts | 4 +- src/lib/utils/splitHiddenTokens.tsx | 2 +- src/state/transactions/hooks.tsx | 2 +- vite.config.js | 67 + 33 files changed, 1945 insertions(+), 882 deletions(-) rename public/index.html => index.html (63%) delete mode 100644 src/components/detail/DetailWidget/BosonSnapshotGate/typechain/BosonSnapshotGate.js delete mode 100644 src/components/detail/DetailWidget/BosonSnapshotGate/typechain/common.js rename src/{graphql/data => graphqlData}/__generated__/types-and-hooks.ts (100%) rename src/{graphql/data => graphqlData}/apollo.ts (100%) rename src/{graphql/data => graphqlData}/util.tsx (96%) create mode 100644 vite.config.js diff --git a/public/index.html b/index.html similarity index 63% rename from public/index.html rename to index.html index 806ab9526..a08d5a5f3 100644 --- a/public/index.html +++ b/index.html @@ -1,11 +1,14 @@ - + - + - + - + - - + Boson dApp | Buy/Sell physical products as rNFTs - - - + + + - - + + @@ -59,6 +66,7 @@ >
+ ${target}`); symlinkSync(target, linkPath, "junction"); } - if (package.mode === "copy") { + if (pkg.mode === "copy") { console.log(`Copy ${target} into ${linkPath}`); cpSync(target, linkPath, { recursive: true, diff --git a/scripts/link-to-local-core-components.js b/scripts/link-to-local-core-components.cjs similarity index 87% rename from scripts/link-to-local-core-components.js rename to scripts/link-to-local-core-components.cjs index 6f9464d3b..875aa20b7 100644 --- a/scripts/link-to-local-core-components.js +++ b/scripts/link-to-local-core-components.cjs @@ -26,9 +26,9 @@ const packages = [ ]; async function main() { - for (const package of packages) { - for (const folder of package.folders) { - const target = `${resolve(ccRepo, "packages", package.path, folder)}`; + for (const pkg of packages) { + for (const folder of pkg.folders) { + const target = `${resolve(ccRepo, "packages", pkg.path, folder)}`; if (!existsSync(target)) { console.error(`Target ${target} does not exist.`); continue; @@ -37,7 +37,7 @@ async function main() { __dirname, "..", "node_modules/@bosonprotocol", - package.path, + pkg.path, folder )}`; while (existsSync(linkPath)) { @@ -45,11 +45,11 @@ async function main() { rmSync(linkPath, { recursive: true }); await new Promise((r) => setTimeout(r, 200)); } - if (package.mode === "link") { + if (pkg.mode === "link") { console.log(`Create link ${linkPath} --> ${target}`); symlinkSync(target, linkPath, "junction"); } - if (package.mode === "copy") { + if (pkg.mode === "copy") { console.log(`Copy ${target} into ${linkPath}`); cpSync(target, linkPath, { recursive: true, From 6217122afc6d0e0bd8fd36da307ef241cdd14325 Mon Sep 17 00:00:00 2001 From: Ludovic Levalleux Date: Wed, 1 Oct 2025 11:44:30 +0100 Subject: [PATCH 10/10] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 48b3cd18a..2985077c4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ }, "scripts": { "dev": "vite", - "build": "NODE_OPTIONS='--max-old-space-size=8192' vite build", + "build": "cross-env NODE_OPTIONS='--max-old-space-size=8192' vite build", "preview": "vite preview", "build:nomaps": "cross-env GENERATE_SOURCEMAP=false vite build", "analyze": "cross-env ANALYZE_BUNDLE=true vite build",