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

added tests around minified runtime versions of semver functions #11280

Merged
merged 2 commits into from Aug 6, 2020

Conversation

mpeyper
Copy link
Contributor

@mpeyper mpeyper commented Aug 5, 2020

In #11271 I wrote some tests to help try an work out what was happening with the runtime versions of the semver functions. I offered to add them to the test suite in that PR and @sokra suggested as a seperate PR to not hold up the bug fix getting through.

There's some pretty nasty code in here to generate the functions with a dummy RuntimeTemplate and evaluate the functions to be runnable in the test suite, so I'm happy to take suggestions on how to make those parts less nasty. I did investigate using new Function(...) instead of eval, but there was an issue with accessing other functions in the module's scope when executing it in a NodeJS environment (some details in the MSDN docs).

What kind of change does this PR introduce?

Tests only.

Did you add tests for your changes?

I only added tests.

Does this PR introduce a breaking change?

No.

What needs to be documented once your changes are merged?

Nothing.

@webpack-bot
Copy link
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

test/SemVer.unittest.js Outdated Show resolved Hide resolved
@webpack-bot
Copy link
Contributor

@mpeyper Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@sokra Please review the new changes.

@sokra sokra merged commit be3a959 into webpack:master Aug 6, 2020
@sokra
Copy link
Member

sokra commented Aug 6, 2020

Thanks

@mpeyper mpeyper deleted the chore/semver-runtime-tests branch July 3, 2021 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants