Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(bridge-ui): bump dependencies #16960

Merged
merged 3 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions packages/bridge-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@
"devDependencies": {
"@playwright/test": "^1.43.1",
"@sveltejs/adapter-auto": "^3.2.0",
"@sveltejs/adapter-static": "^2.0.3",
"@sveltejs/kit": "^1.30.4",
"@sveltejs/kit": "^2.5.7",
"@sveltejs/vite-plugin-svelte": "^3.1.0",
"@types/debug": "^4.1.12",
"@types/object-hash": "^3.0.6",
"@typescript-eslint/eslint-plugin": "^7.4.0",
"@typescript-eslint/parser": "^7.7.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@vitest/coverage-v8": "^1.4.0",
"@wagmi/cli": "^2.1.4",
"abitype": "^1.0.2",
"ajv": "^8.12.0",
"autoprefixer": "^10.4.18",
"daisyui": "^4.7.2",
"daisyui": "^4.10.3",
"dotenv": "^16.4.5",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
Expand All @@ -45,23 +45,23 @@
"lokijs": "^1.5.12",
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"prettier-plugin-svelte": "^3.2.2",
"svelte": "^4.2.12",
"svelte-check": "^3.6.9",
"prettier-plugin-svelte": "^3.2.3",
"svelte": "^4.2.15",
"svelte-check": "^3.7.0",
"tailwindcss": "^3.4.3",
"ts-morph": "^19.0.0",
"tslib": "^2.6.2",
"typescript": "^5.4.3",
"vite": "^4.5.3",
"vite": "^5.2.10",
"vite-tsconfig-paths": "^4.3.2",
"vitest": "^0.32.4",
"vitest": "^1.5.3",
"vitest-fetch-mock": "^0.2.2",
"vitest-mock-extended": "1.3.1"
},
"type": "module",
"dependencies": {
"@wagmi/connectors": "^4.1.18",
"@wagmi/core": "^2.8.0",
"@wagmi/connectors": "^4.3.1",
"@wagmi/core": "^2.8.1",
"@walletconnect/ethereum-provider": "^2.12.2",
"@walletconnect/modal": "^2.6.2",
"@web3modal/wagmi": "^4.1.11",
Expand All @@ -71,7 +71,7 @@
"debug": "^4.3.4",
"events": "^3.3.0",
"object-hash": "^3.0.0",
"svelte-i18n": "^3.7.4",
"svelte-i18n": "^4.0.0",
"viem": "^2.9.29"
}
}
29 changes: 29 additions & 0 deletions packages/bridge-ui/scripts/setupTestEnvironmentCompatibility.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Source: https://github.com/vitest-dev/vitest/issues/4043#issuecomment-1905172846

// This file is needed in order to support Uint8Array with vitest and jsdom.
if (process.env.VITEST === 'true') {
class ESBuildAndJSDOMCompatibleTextEncoder extends TextEncoder {
constructor() {
super();
}

encode(input: string) {
if (typeof input !== 'string') {
throw new TypeError('`input` must be a string');
}

const decodedURI = decodeURIComponent(encodeURIComponent(input));
const arr = new Uint8Array(decodedURI.length);
const chars = decodedURI.split('');
for (let i = 0; i < chars.length; i++) {
arr[i] = decodedURI[i].charCodeAt(0);
}
return arr;
}
}

Object.defineProperty(global, 'TextEncoder', {
value: ESBuildAndJSDOMCompatibleTextEncoder,
writable: true,
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@

<script lang="ts">
import { SvelteToast } from '@zerodevx/svelte-toast';
import type { SvelteToastOptions } from '@zerodevx/svelte-toast/stores';
const options: SvelteToastOptions = {
const options = {
duration: toastConfig.duration,
};
</script>
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/kit/vite';
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand Down
4 changes: 2 additions & 2 deletions packages/bridge-ui/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sveltekit } from '@sveltejs/kit/vite';
import dotenv from 'dotenv';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineProject } from 'vitest/dist/config';

import { generateBridgeConfig } from './scripts/vite-plugins/generateBridgeConfig';
import { generateChainConfig } from './scripts/vite-plugins/generateChainConfig';
Expand All @@ -13,7 +13,7 @@ if (process.env.NODE_ENV === 'test') {
dotenv.config({ path: './.env.test' });
}

export default defineProject({
export default defineConfig({
build: {
sourcemap: true,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-ui/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default defineProject({
test: {
environment: 'jsdom',
// setupFiles: ['./../../setup.ts'],
setupFiles: ['./src/tests/setup.ts'],
setupFiles: ['./scripts/setupTestEnvironmentCompatibility.ts', './src/tests/setup.ts'],
globals: true,
include: ['./**/*.{test,spec}.{js,ts}'],
},
Expand Down
Loading