sku@14.8.0
Minor Changes
-
deps: Jest 30 (#1295)
This major Jest release includes breaking changes. See the Jest 30 announcement for more information.
Notable changes that may affect your tests:
- JSDOM no longer allows mocking
window.location: If your tests mockwindow.location, or you use thejest-location-mockpackage, you may need to patch jsdom. It's also worth considering whether you can avoid mockingwindow.locationentirely by usingreact-router'sMemoryRouterorcreateRoutesStub. - Updated expect aliases: Expect aliases have been removed which may affect your test assertions. Please run
sku formatto update your test files automatically if you are still using these old aliases. - Updated snapshot printing: Jest have updated the way snapshots are printed, which may require you to update your snapshot tests.
In this release, we have enabled the global cleanup feature by default. This automatically cleans up global state between test files, helping to prevent memory leaks and ensure test isolation.
If you need to revert to the previous behavior, you can configure the
globalsCleanupoption viadangerouslySetJestConfigin yoursku.config.tsfile:export default { dangerouslySetJestConfig: (config) => ({ ...config, testEnvironmentOptions: { globalsCleanup: 'soft', // Jest default or `'off'` to disable completely }, }), };
- JSDOM no longer allows mocking
Patch Changes
-
Modify
webpack-dev-serverdependency range to<=5.2.0(#1293)webpack-dev-server@5.2.1introduced a CORS change that can break local development in some cases. Although 5.2.2 allegedly addresses this issue, it did not fix the issue insku. Until a proper fix is available, we are pinning the version to<=5.2.0to prevent the dependency from being updated during lockfile maintenance. -
Update
prettierdependency to~3.6.2(#1297)