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: rspack_version macro support match alpha version #8880

Merged
merged 1 commit into from
Dec 30, 2024
Merged

Conversation

jerrykingxyz
Copy link
Contributor

@jerrykingxyz jerrykingxyz commented Dec 30, 2024

Summary

rspack_version!() macro support match alpha version like 1.2.0-alpha.0

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: bug fix release: bug related release(mr only) labels Dec 30, 2024
Copy link

netlify bot commented Dec 30, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 6d455db
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67723c409a0eb60008cf2183

Copy link

codspeed-hq bot commented Dec 30, 2024

CodSpeed Performance Report

Merging #8880 will not alter performance

Comparing jerry/version (6d455db) with main (2f5cf2f)

Summary

✅ 3 untouched benchmarks

@@ -1,5 +1,5 @@
pub fn rspack_version() -> String {
let re = regex::Regex::new(r#""version": ?"([0-9\.]+)""#).expect("should create regex");
let re = regex::Regex::new(r#""version": ?"([0-9a-zA-Z\.-]+)""#).expect("should create regex");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is kind of too hacky, even formatter will kill this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not using json parse?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our package.json is in a standard json format, so there should be no problem in theory.

@hardfist hardfist merged commit 4542c8e into main Dec 30, 2024
37 checks passed
@hardfist hardfist deleted the jerry/version branch December 30, 2024 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants