Skip to content

Conversation

@cwillisf
Copy link
Contributor

Resolves

  • Attempts to update scratch-paint in scratch-gui are currently failing due to a dependency conflict between versions of the typescript package.

Proposed Changes

Update jest and ts-jest to version 29.

Supporting change: scratch-vm now explicitly exports block types.

BREAKING CHANGE: scratch-vm now lists default exports under ".", which may be incompatible with some tools.

Reason for Changes

The old version of ts-jest was only compatible with typescript@<4. Since scratch-paint indirectly requires typescript@^5, that was a problem.

Updating to a newer version of ts-jest required updating jest and (in our case) adding jest-environment-jsdom. Major version mismatches in that group can cause very strange failures, such as jestjs/jest#15674.

This caused some minor changes in snapshot behavior and async timing, so I fixed up some unit tests for that.

Updating to a newer jest also caused a change in module resolution, breaking the import of scratch-vm's BlockType enum in scratch-gui/test/unit/util/define-dynamic-block.test.js. To fix that, I added an explicit export for block-type in the exports section of scratch-vm's package.json file.

Adding a sub-path export to scratch-vm's exports meant adjusting the top-level exports to all be subpaths, moving the existing conditional exports underneath the "." subpath.

I don't know why she swallowed the fly.

Test Coverage

Covered by existing tests.

Supporting change: `scratch-vm` now explicitly exports block types.

BREAKING CHANGE: `scratch-vm` now lists default exports under ".",
which may be incompatible with some tools.
@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Test report for scratch-render

  1 files  ±0   55 suites  ±0   2s ⏱️ -1s
209 tests ±0  209 ✅ ±0  0 💤 ±0  0 ❌ ±0 
279 runs  ±0  279 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit 8f42e67. ± Comparison against base commit 58664aa.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Test report for scratch-gui

  2 files  ±0   62 suites  ±0   9m 36s ⏱️ - 1m 4s
398 tests ±0  390 ✅ ±0  8 💤 ±0  0 ❌ ±0 
416 runs  ±0  408 ✅ ±0  8 💤 ±0  0 ❌ ±0 

Results for commit 8f42e67. ± Comparison against base commit 58664aa.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 23, 2025

Test report for scratch-vm

    1 files  ±0    770 suites  ±0   1m 5s ⏱️ ±0s
1 686 tests ±0  1 686 ✅ ±0   0 💤 ±0  0 ❌ ±0 
4 891 runs  ±0  4 861 ✅ ±0  30 💤 ±0  0 ❌ ±0 

Results for commit 8f42e67. ± Comparison against base commit 58664aa.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

Test report for scratch-svg-renderer

  1 files  ±0   60 suites  ±0   0s ⏱️ ±0s
124 tests ±0  124 ✅ ±0  0 💤 ±0  0 ❌ ±0 
276 runs  ±0  275 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 8f42e67. ± Comparison against base commit 58664aa.

@KManolov3
Copy link
Contributor

Looks good.. changes as a whole seem tame enough, given the major version bumps.
Hopefully we don't reach the latter verses of the rhyme :)

@cwillisf cwillisf marked this pull request as ready for review October 24, 2025 13:48
@cwillisf cwillisf requested a review from a team as a code owner October 24, 2025 13:48
@cwillisf cwillisf added this pull request to the merge queue Oct 24, 2025
Merged via the queue into develop with commit b079e04 Oct 24, 2025
20 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Oct 24, 2025
@cwillisf cwillisf deleted the jest-family-29 branch October 24, 2025 14:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants