Skip to content

refactor(server): migrate ip_access_control to ESM - #4316

Merged
khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:esm-ip
Oct 25, 2026
Merged

khassel merged 1 commit into
MagicMirrorOrg:developfrom
KristjanESPERANTO:esm-ip

Conversation

@KristjanESPERANTO

Copy link
Copy Markdown
Collaborator

Follow-up to #4314.

I've converted ip_access_control to ESM. It's a small, self-contained file that is only used by the server, so it's a good next candidate.

I added the new file to the same ESLint rules as app.mjs for now. Otherwise the stricter default rules for .mjs files would force a lot of style changes, and the diff would become much bigger than the actual change. Once the ESM migration is done, it would make sense to revisit the ESLint rules for all of these files together.

@khassel
khassel merged commit 9394c17 into MagicMirrorOrg:develop Oct 25, 2026
13 checks passed
@KristjanESPERANTO
KristjanESPERANTO deleted the esm-ip branch October 25, 2026 16:31
khassel pushed a commit that referenced this pull request Oct 28, 2026
Follow-up to #4316.

I've converted `server.js` and `vendor.js` to ESM. I did them together
because the server is the only place on the Node side that uses
`vendor`. The browser loader just imports the renamed file.

For the e2e tests I added a small `global-setup.mjs` wrapper, so ESM
specs can import the helpers without touching the existing ones.
`vendor_spec.js` is the first spec using it. The old specs work as
before. Importing `global-setup.js` directly doesn't work, because then
Vitest would run the app inside its own module loader.
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