Skip to content

Conversation

@dmail
Copy link
Member

@dmail dmail commented Jun 5, 2025

This PR is based on #81 (thank you @kayahr).

It adds unit tests to ensure the config file work as expected.

The test saves html being produced into https://github.com/jsenv/importmap-node-module/blob/90b3055c0b31ba243eb263d3a4168d0a6438cb87/tests/cli/config_file/snapshots/index.html

And it executes that html alongside its files to ensure all works as expected when axios is remapped in

const actual = await executeHtml(`${buildServer.origin}/index.html`);
const expect = "axios";
assert({ actual, expect });

I'm about to merge this PR that will publish version 7.3.0

@github-actions
Copy link

github-actions bot commented Jun 5, 2025

Performance impact

Impact on 9 metrics when merging config_file into main. Before drawing conclusion, keep in mind performance variability.

package metrics (+0.1%)
Metric Before merge After merge Impact
import duration 0.2 second 0.2 second -0.003 second / -2% ↘️
import memory heap used 8.9 MB 8.9 MB -704 B / -0.008% ↘️
npm tarball size 26.5 kB 26.8 kB +321 B / +1% ↗️
npm tarball unpacked size 115 kB 116 kB +1.1 kB / +1% ↗️
npm tarball file count 23 23 👻
write importmap metrics (+0.2%)
Metric Before merge After merge Impact
write importmap duration 0.2 second 0.2 second +0.001 second / +0.5% ↗️
write importmap memory heap used 9 MB 9 MB -1.5 kB / -0.02% ↘️
number of fs read operation 0 0 👻
number of fs write operation 8 8 👻
Generated by @jsenv/performance-impact during performance_impact#15468655885 on 70a9d74

@dmail dmail merged commit ac106ac into main Jun 5, 2025
5 checks passed
@dmail dmail deleted the config_file branch June 5, 2025 13:48
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.

3 participants