-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement import.meta.resolve() (#3873)
* Implement import.meta.resolve() This implements and tests `import.meta.resolve()` a way to get the path to a module the same way ESM and/or `require` will do. This doesn't read or load the file in question from the file. This also showed that we currently always parse code as ECMAScript modules. Even when the parsed/compiled file was to be wrapped as CommonJS. This likely had no other side effects as all other ESM specific syntax is also either not implemented in k6 or forces CommonJS wrapping disabled. Closes #3856 * Update js/modules/require_impl.go Co-authored-by: Joan López de la Franca Beltran <[email protected]> * panic on error --------- Co-authored-by: Joan López de la Franca Beltran <[email protected]>
- Loading branch information
Showing
6 changed files
with
253 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters