Skip to content

Commit 1277ae6

Browse files
chore: upgrade vite related dependencies (#3698)
* chore: bump `vitest` based dependencies * chore: use valid hex * chore: added `clearAllMocks` * chore: remove expectation of an error to match the thrown error * changeset
1 parent 6eb113c commit 1277ae6

File tree

18 files changed

+704
-215
lines changed

18 files changed

+704
-215
lines changed

Diff for: .changeset/curvy-peaches-wonder.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"create-fuels": patch
3+
"@fuel-ts/utils": patch
4+
---
5+
6+
chore: upgrade `vite` related dependencies

Diff for: apps/create-fuels-counter-guide/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"tailwindcss": "3.4.14",
4242
"typescript": "5.7.3",
4343
"typescript-eslint": "8.23.0",
44-
"vite": "5.4.12",
45-
"vitest": "2.1.9"
44+
"vite": "6.1.0",
45+
"vitest": "3.0.5"
4646
}
4747
}

Diff for: apps/demo-react-vite/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@
2626
"eslint-plugin-react-hooks": "4.6.2",
2727
"eslint-plugin-react-refresh": "0.4.19",
2828
"typescript": "5.7.3",
29-
"vite": "5.4.12"
29+
"vite": "6.1.0"
3030
}
3131
}

Diff for: package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@
8585
"@types/web": "0.0.202",
8686
"@typescript-eslint/eslint-plugin": "6.9.1",
8787
"@typescript-eslint/parser": "6.21.0",
88-
"@vitest/browser": "2.1.9",
89-
"@vitest/coverage-istanbul": "2.1.9",
88+
"@vitest/browser": "3.0.5",
89+
"@vitest/coverage-istanbul": "3.0.5",
9090
"compare-versions": "6.1.1",
9191
"coverage-diff": "3.2.0",
9292
"eslint": "8.57.0",
@@ -117,11 +117,11 @@
117117
"tsx": "4.19.2",
118118
"turbo": "2.4.0",
119119
"typescript": "5.7.3",
120-
"vite": "5.4.12",
120+
"vite": "6.1.0",
121121
"vite-plugin-json5": "1.1.6",
122122
"vite-plugin-node-polyfills": "0.23.0",
123123
"vite-plugin-plain-text": "1.4.2",
124-
"vitest": "2.1.9"
124+
"vitest": "3.0.5"
125125
},
126126
"pnpm": {
127127
"overrides": {

Diff for: packages/abi-typegen/test/utils/getNewAbiTypegen.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export function getNewAbiTypegen(
8787
];
8888

8989
const stubAbi = JSON.stringify({ types, functions, configurables }, null, 2);
90-
const stubBin = '0x000';
90+
const stubBin = '0x0000';
9191
const stubSlot = '[]';
9292

9393
const abiFiles: IFile[] = [

Diff for: packages/account/src/assets/asset-api.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ const mockFetch = () => {
1818
* @group browser
1919
*/
2020
describe('Asset API', () => {
21+
afterEach(() => {
22+
vi.clearAllMocks();
23+
});
24+
2125
describe('getAssetById', () => {
2226
it('should get an asset by id [Base Asset - Verified]', async () => {
2327
const expected = {

Diff for: packages/account/src/test-utils/launchNode.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ vi.mock('fs', async () => {
2929
* @group node
3030
*/
3131
describe('launchNode', () => {
32+
afterEach(() => {
33+
vi.clearAllMocks();
34+
});
35+
3236
test('using ephemeral port 0 is possible', async () => {
3337
const { cleanup, port, url } = await launchNode({ port: '0', loggingEnabled: false });
3438
expect(await fetch(url)).toBeTruthy();

Diff for: packages/create-fuels/src/lib/installFuelUp.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ const mockAllDeps = (params: { shouldThrow: boolean }) => {
4747
* @group node
4848
*/
4949
describe('installFuelUp', () => {
50+
afterEach(() => {
51+
vi.clearAllMocks();
52+
});
53+
5054
it('should install fuelup successfully', () => {
5155
// Arrange
5256
const { execSync, ora, oraInstance } = mockAllDeps({ shouldThrow: false });

Diff for: packages/create-fuels/src/utils/logger.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ describe('logger', () => {
1313
configureLogging(loggingBackup);
1414
});
1515

16+
afterEach(() => {
17+
vi.clearAllMocks();
18+
});
19+
1620
test('should configure logging', () => {
1721
configureLogging({ isLoggingEnabled: true, isDebugEnabled: false });
1822
expect(loggingConfig.isLoggingEnabled).toEqual(true);

Diff for: packages/errors/src/test-utils/expect-to-throw-fuel-error.ts

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ export const expectToThrowFuelError = async (
5656
}
5757

5858
expect(thrownError.name).toEqual('FuelError');
59-
expect(thrownError).toMatchObject(expectedError);
6059

6160
return thrownError;
6261
};

Diff for: packages/fuels/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
"devDependencies": {
9595
"@types/lodash.camelcase": "4.3.9",
9696
"@types/rimraf": "3.0.2",
97-
"vite": "5.4.12"
97+
"vite": "6.1.0"
9898
},
9999
"keywords": [
100100
"ethereum",

Diff for: packages/fuels/src/cli/commands/build/buildSwayProgram.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ describe('buildSwayPrograms', () => {
2424
mockLogger();
2525
});
2626

27+
afterEach(() => {
28+
vi.clearAllMocks();
29+
});
30+
2731
function mockAll(params: { shouldError: boolean } = { shouldError: false }) {
2832
const spawnMocks = {
2933
// eslint-disable-next-line @typescript-eslint/no-explicit-any

Diff for: packages/fuels/src/cli/utils/logger.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,15 @@ import { configureLogging, debug, error, log, loggingConfig, warn } from './logg
88
*/
99
describe('logger', () => {
1010
const loggingBackup = structuredClone(loggingConfig);
11+
1112
beforeEach(() => {
1213
configureLogging(loggingBackup);
1314
});
15+
16+
afterEach(() => {
17+
vi.clearAllMocks();
18+
});
19+
1420
test('should configure logging', () => {
1521
configureLogging({ isLoggingEnabled: true, isDebugEnabled: false });
1622
expect(loggingConfig.isLoggingEnabled).toEqual(true);

Diff for: packages/utils/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
"fflate": "0.8.2"
5454
},
5555
"peerDependencies": {
56-
"vitest": "2.1.9"
56+
"vitest": "3.0.5"
5757
}
5858
}

Diff for: packages/versions/src/lib/getSystemVersions.test.ts

+4
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ function mockAllDeps(params: {
4444
* @group node
4545
*/
4646
describe('getSystemVersions', () => {
47+
afterEach(() => {
48+
vi.clearAllMocks();
49+
});
50+
4751
test('should get user versions just fine', () => {
4852
// mocking
4953
const systemForcVersion = '1.0.0';

Diff for: pnpm-lock.yaml

+655-201
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: templates/nextjs/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"postcss": "8.5.1",
3838
"tailwindcss": "3.4.14",
3939
"typescript": "5.7.3",
40-
"vitest": "2.1.9"
40+
"vitest": "3.0.5"
4141
},
4242
"overrides": {
4343
"whatwg-url": "14.1.0"

Diff for: templates/vite/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
"tailwindcss": "3.4.14",
4141
"typescript": "5.7.3",
4242
"typescript-eslint": "8.23.0",
43-
"vite": "5.4.12",
44-
"vitest": "2.1.9"
43+
"vite": "6.1.0",
44+
"vitest": "3.0.5"
4545
},
4646
"overrides": {
4747
"whatwg-url": "14.1.0"

0 commit comments

Comments
 (0)