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: Use dynamic import for external JS #26522

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Nerivec
Copy link
Collaborator

@Nerivec Nerivec commented Feb 26, 2025

  • Replace node:vm logic with dynamic importing
  • Allow .js, .cjs and .mjs code
  • [live-reload] Version file naming on MQTT save when file already exists (also allows to bypass node module caching)
  • Update typing
  • Add MJS-specific tests
  • Update test sample converters to use importing for better representation

TODO:

  • docs
  • fix tests to use mockMQTTEvents.message if possible
  • fix loading latest version only from file system
    • alternative to versioning to bypass module caching?
  • handle removing old versions

@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch 2 times, most recently from 22e99d2 to 54083d7 Compare March 1, 2025 22:46
@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch 2 times, most recently from 73a09f0 to 250649f Compare March 5, 2025 02:49
@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch from 250649f to 3536633 Compare March 7, 2025 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant