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

fix: add utility functions to get module type #3405

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jonasclaes
Copy link

Description

This PR will add more complete handling with regards to the CommonJS and ESM standards. This PR should solve #3203 and #2661.

We now look at the extension first, if it's .cjs or .mjs, great, that's easy to resolve. Otherwise, we look for the first package.json we come across, check it's module type, and then determine the project's standards.

The esbuild has been updated to accomodate this change as well.

Pre-merge checklist

This is for use by the Artillery team. Please leave this in if you're contributing to Artillery.

  • Does this require an update to the docs?
  • Does this require a changelog entry?

This PR will add more complete handling with regards to the CommonJS and ESM standards. This PR should solve artilleryio#3203 and artilleryio#2661.

We now look at the extension first, if it's .cjs or .mjs, great, that's easy to resolve. Otherwise, we look for the first package.json we come across, check it's module type, and then determine the project's standards.

The esbuild has been updated to accomodate this change as well.
@CLAassistant
Copy link

CLAassistant commented Nov 13, 2024

CLA assistant check
All committers have signed the CLA.

@hassy
Copy link
Member

hassy commented Nov 20, 2024

thank you @jonasclaes! will aim to review & release in the next version of Artillery

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