KEMBAR78
feat: Use dynamic import for external JS by Nerivec · Pull Request #26522 · Koenkk/zigbee2mqtt · GitHub
Skip to content

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
  • Skip and rename invalid external JS on Z2M start

TODO:

@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 5 times, most recently from 849dcb7 to 373d1a5 Compare March 13, 2025 23:10
@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch from 373d1a5 to f4775f5 Compare March 15, 2025 14:13
Nerivec added a commit to Nerivec/zigbee2mqtt.io that referenced this pull request Mar 15, 2025
Nerivec added a commit to Nerivec/zigbee-herdsman-converters that referenced this pull request Mar 15, 2025
Nerivec added a commit to Nerivec/zigbee-herdsman-converters that referenced this pull request Mar 16, 2025
@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch 2 times, most recently from 4fdb7a9 to cd7043d Compare March 17, 2025 23:22
@Nerivec

This comment was marked as outdated.

@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch from c6bdd1c to a2783a9 Compare March 18, 2025 20:46
@Nerivec Nerivec marked this pull request as ready for review March 18, 2025 22:21
@Nerivec
Copy link
Collaborator Author

Nerivec commented Mar 18, 2025

Koenkk I'll let you give it a run or two before merging, just to be sure I haven't missed something!

@Nerivec Nerivec force-pushed the externaljs-dynamic-import branch from a2783a9 to b4883a3 Compare March 19, 2025 20:42
Koenkk pushed a commit to Koenkk/zigbee-herdsman-converters that referenced this pull request Mar 20, 2025
Koenkk pushed a commit to Koenkk/zigbee2mqtt.io that referenced this pull request Mar 20, 2025
@Koenkk
Copy link
Owner

Koenkk commented Mar 20, 2025

Works, another step forward, thanks!

@Koenkk Koenkk merged commit badf107 into Koenkk:dev Mar 20, 2025
11 checks passed
@Nerivec Nerivec deleted the externaljs-dynamic-import branch March 20, 2025 20:15
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.

2 participants