Skip to content

Commit

Permalink
fix: remove bundle errors (FuelLabs#360)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizstacio authored Dec 14, 2022
1 parent 1885f39 commit cff9191
Show file tree
Hide file tree
Showing 11 changed files with 187 additions and 247 deletions.
6 changes: 6 additions & 0 deletions .changeset/fresh-dolls-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fuel-wallet/sdk": patch
"@fuel-wallet/types": patch
---

Update fuels deps
12 changes: 0 additions & 12 deletions packages/app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,6 @@
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fuels Wallet</title>
<script>
window.global = window;
</script>
<script type="module">
import process from "process";
import { Buffer } from "buffer";
import EventEmitter from "events";

window.Buffer = Buffer;
window.process = process;
window.EventEmitter = EventEmitter;
</script>
</head>
<body>
<div id="root"></div>
Expand Down
14 changes: 5 additions & 9 deletions packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@
"xstate:typegen": "xstate typegen 'src/**/*.ts?(x)'"
},
"dependencies": {
"@esbuild-plugins/node-globals-polyfill": "^0.1.1",
"@fontsource/source-code-pro": "^4.5.12",
"@fuel-ts/mnemonic": "0.24.1",
"@fuel-ts/providers": "0.24.1",
"@fuel-ts/wallet": "0.24.1",
"@fuel-ts/wallet-manager": "0.24.1",
"@fuel-ts/mnemonic": "0.24.2",
"@fuel-ts/wallet": "0.24.2",
"@fuel-ts/wallet-manager": "0.24.2",
"@fuel-ui/config": "^0.10.1",
"@fuel-ui/css": "^0.10.1",
"@fuel-ui/react": "^0.10.1",
Expand All @@ -34,17 +32,15 @@
"@hookform/resolvers": "^2.9.10",
"@react-aria/utils": "^3.14.1",
"@xstate/react": "^3.0.1",
"buffer": "^6.0.3",
"cross-fetch": "^3.1.5",
"dexie": "^3.2.2",
"dexie-observable": "4.0.0-beta.13",
"dexie-react-hooks": "^1.1.1",
"events": "^3.3.0",
"fake-indexeddb": "^4.0.1",
"framer-motion": "^7.6.15",
"fuels": "0.24.1",
"fuels": "0.24.2",
"json-rpc-2.0": "^1.4.1",
"process": "^0.11.10",
"react": "^18.2.0",
"react-content-loader": "^6.2.0",
"react-dom": "^18.2.0",
Expand All @@ -53,7 +49,6 @@
"react-hook-form": "^7.40.0",
"react-qr-code": "^2.0.8",
"react-router-dom": "^6.4.4",
"util": "^0.12.5",
"xstate": "^4.35.0",
"yup": "^0.32.11"
},
Expand Down Expand Up @@ -93,6 +88,7 @@
"ts-jest-mock-import-meta": "^0.12.0",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^4.9.3",
"util": "^0.12.5",
"vite": "^3.2.5",
"vite-plugin-static-copy": "^0.12.0",
"vite-plugin-zip-pack": "^1.0.4",
Expand Down
1 change: 1 addition & 0 deletions packages/app/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { E2E_PORT = 9000 } = process.env;
const distDirectory = join(__dirname, './dist');

const config: PlaywrightTestConfig = {
workers: 1,
testMatch: join(__dirname, './playwright/**/*.test.ts'),
testDir: join(__dirname, './playwright/'),
webServer: {
Expand Down
3 changes: 3 additions & 0 deletions packages/app/playwright/crx/crx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { expect } from '@playwright/test';
import { test } from './utils';

test.describe('CRX FuelWallet', () => {
test.afterAll(({ context }) => {
context.close();
});
test('On install sign-up page is open', async ({ context }) => {
const page = await context.waitForEvent('page', {
predicate: (page) => page.url().includes('sign-up'),
Expand Down
12 changes: 0 additions & 12 deletions packages/app/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@
overflow: hidden;
}
</style>
<script>
window.global = window;
</script>
<script type="module">
import process from "process";
import { Buffer } from "buffer";
import EventEmitter from "events";

window.Buffer = Buffer;
window.process = process;
window.EventEmitter = EventEmitter;
</script>
</head>
<body>
<div id="root"></div>
Expand Down
27 changes: 0 additions & 27 deletions packages/app/vite-utils/vite.base.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import GlobalPolyFill from '@esbuild-plugins/node-globals-polyfill';
import react from '@vitejs/plugin-react';
import { resolve } from 'path';
import type { UserConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';

Expand All @@ -24,37 +22,12 @@ const baseConfig: UserConfig = {
define: {
global: 'globalThis',
},
plugins: [
GlobalPolyFill({
process: true,
buffer: true,
}),
],
},
},
plugins: [react(), tsconfigPaths()],
server: {
port: process.env.NODE_ENV === 'test' ? 3001 : 3000,
},
resolve: {
/**
* We need this to get right build script and use PNPM link correctly
*/
alias: {
'@fuel-ui/react': resolve(
__dirname,
'../node_modules/@fuel-ui/react/dist/index.mjs'
),
'@fuel-ui/css': resolve(
__dirname,
'../node_modules/@fuel-ui/css/dist/index.mjs'
),
process: 'process/browser',
stream: 'stream-browserify',
zlib: 'browserify-zlib',
util: 'util',
},
},
...(Boolean(process.env.CI) && {
logLevel: 'silent',
}),
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"acorn-walk": "^8.2.0",
"dotenv": "^16.0.3",
"framer-motion": "^7.6.15",
"fuels": "0.24.1",
"fuels": "0.24.2",
"globby": "^13.1.2",
"gray-matter": "^4.0.3",
"hast-util-heading-rank": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"dependencies": {
"dexie-observable": "4.0.0-beta.13",
"events": "^3.3.0",
"fuels": "0.24.1",
"fuels": "0.24.2",
"json-rpc-2.0": "^1.4.1",
"uuid": "^9.0.0",
"xstate": "^4.35.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"dependencies": {
"@types/chrome": "^0.0.203",
"dexie-observable": "4.0.0-beta.13",
"fuels": "0.24.1",
"fuels": "0.24.2",
"json-rpc-2.0": "^1.4.1"
}
}
Loading

0 comments on commit cff9191

Please sign in to comment.