Skip to content

fix: target es2024 with meteor bundle#1775

Merged
Julusian merged 1 commit into
mainfrom
fix/meteor-js-target
Jun 22, 2026
Merged

fix: target es2024 with meteor bundle#1775
Julusian merged 1 commit into
mainfrom
fix/meteor-js-target

Conversation

@Julusian

@Julusian Julusian commented Jun 15, 2026

Copy link
Copy Markdown
Member

About the Contributor

This pull request is posted on behalf of Superfly

Type of Contribution

This is a: Bug fix

Current Behavior

There have been some unexpected runtime errors in the meteor application (eg #1772)

Looking into this, I believe this to be because meteor is building our application code to target a really old ES standard, resulting in code like:

_class_private_field_set(_this, _rundownsLiveQuery, (yield _RundownsObserver__rspack_import_7.RundownsObserver.create(activePlaylistId, (rundownIds)=>_async_to_generator(function*() {
    _logging__rspack_import_4.logger.silly(`Creating new RundownContentObserver`);
    const obs1 = yield _RundownContentObserver__rspack_import_6.RundownContentObserver.create(activePlaylistId, showStyleBaseId, rundownIds, (cache)=>{
        return _class_private_field_get(this, _rundownContentChanged).call(this, showStyleBaseId, cache);
    });
    return ()=>{
        obs1.stop();
    };
})())));

New Behavior

This adjusts the meteor build config to target the version of node that meteor runs with (22) instead of aiming for browser backwards compatibility. We don't need browser compatibility because our webui is packaged by vite instead.

This includes a yarn patch currently, I shall offer this upstream to see what can be done to avoid needing this going forward

After merging, devs may need to run rm -rf meteor/node_modules/.cache/rspack to clear the rspack cache and generate code with the new config

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

I have inspected the built app.js file and confirmed that the amount of polyfil is dramatically reduced in our code.

Affected areas

Time Frame

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

meteor/package.json gains @swc/core at ^1.15.41 in its dependencies and a Yarn patch: override for @meteorjs/rspack (pinned to the 2.0.1 patch file) in the resolutions section.

Changes

Dependency and resolution updates

Layer / File(s) Summary
Add @swc/core dep and @meteorjs/rspack patch resolution
meteor/package.json
Adds @swc/core at ^1.15.41 to dependencies; adds a patch: Yarn resolution override for @meteorjs/rspack pinned to the 2.0.1 patch file alongside the existing @sofie-automation/shared-lib portal resolution.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: target es2024 with meteor bundle' directly describes the main change: adjusting Meteor's build configuration to target ES2024 (Node 22) instead of older standards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The pull request description clearly explains the issue (unexpected runtime errors due to overly aggressive transpilation targeting old ES standards), the solution (adjusting build config to target Node.js 22), and testing performed (inspection of built app.js). The description directly relates to the changeset in meteor/package.json which adds @swc/core dependency and rspack patch.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/meteor-js-target

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@sonarqubecloud

Copy link
Copy Markdown

@jstarpl jstarpl added the Contribution from SuperFly.tv Contributions sponsored by SuperFly.tv label Jun 17, 2026
@Julusian Julusian merged commit a3742f1 into main Jun 22, 2026
49 checks passed
@Julusian Julusian deleted the fix/meteor-js-target branch June 22, 2026 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution from SuperFly.tv Contributions sponsored by SuperFly.tv

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants