8000
Skip to content

modules: refactor to be able to load modules without running#5239

Merged
mstoykov merged 2 commits intomasterfrom
moduleResoverExtraction
Oct 15, 2025
Merged

modules: refactor to be able to load modules without running#5239
mstoykov merged 2 commits intomasterfrom
moduleResoverExtraction

Conversation

@mstoykov
Copy link
Copy Markdown
Contributor

What?

Let us have a module resolver that just loads a main module and all of its dependencies without running an js code.

This is useful if we need to do more checks or something else and we need the modules that will be loaded but not actually run it.

Will be used for #5166 among other stuff including removing k6deps and esbuild for doing the auto extension resolution.

Why?

This is basically split from #4866 so it isn't just one huge change.

And this is one of those changes where the majority of the line changes are in test updates.

Checklist

  • I have performed a self-review of my code.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests for my changes.
  • I have run linter and tests locally (make check) and all pass.

Checklist: Documentation (only for k6 maintainers and if relevant)

Please do not merge this PR until the following items are filled out.

  • I have added the correct milestone and labels to the PR.
  • I have updated the release notes: link
  • I have updated or added an issue to the k6-documentation: grafana/k6-docs#NUMBER if applicable
  • I have updated or added an issue to the TypeScript definitions: grafana/k6-DefinitelyTyped#NUMBER if applicable

Related PR(s)/Issue(s)

@mstoykov mstoykov added this to the v1.4.0 milestone Oct 10, 2025
@mstoykov mstoykov requested a review from a team as a code owner October 10, 2025 13:28
@mstoykov mstoykov requested review from AgnesToulet and ankur22 and removed request for a team October 10, 2025 13:28
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 10, 2025 13:34 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 10, 2025 13:37 — with GitHub Actions Inactive
@mstoykov mstoykov requested a review from joanlopez October 13, 2025 14:40
Let us have a module resolver that just loads a main module and all of
its dependencies without running an js code.

This is useful if we need to do more checks or something else and we
need the modules that will be loaded but not actually run it.

Will be used for #5166 among other stuff including removing k6deps and
esbuild for doing the auto extension resolution.
@mstoykov mstoykov force-pushed the moduleResoverExtraction branch from debf652 to 43b615c Compare October 14, 2025 09:23
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 14, 2025 09:28 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 14, 2025 09:30 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 14, 2025 15:05 — with GitHub Actions Inactive
@mstoykov mstoykov temporarily deployed to azure-trusted-signing October 14, 2025 15:07 — with GitHub Actions Inactive
@mstoykov mstoykov merged commit 8a9b552 into master Oct 15, 2025
56 of 62 checks passed
@mstoykov mstoykov deleted the moduleResoverExtraction branch October 15, 2025 15:26
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

0