Skip to content

chore: fix review comments leftovers [ED-24451]#43

Merged
davseve merged 10 commits into
mainfrom
ED-24451-fix
Jul 15, 2026
Merged

chore: fix review comments leftovers [ED-24451]#43
davseve merged 10 commits into
mainfrom
ED-24451-fix

Conversation

@davseve

@davseve davseve commented Jul 15, 2026

Copy link
Copy Markdown
Member

✨ PR Description

1. Problem & Context

Fixes review comments from ED-24451: removes custom semver sorting logic, delegates to semver library, and sanitizes regex pattern to prevent unintended global/sticky matching.

2. What Changed (Where)

  • version-files.ts: Import semver, add normalizeVersion() helper, replace inline sorting with semver.compare(), remove global flag from version regex, sanitize pattern flags.
  • package.json: Add semver ^7.7.2 dependency; remove stale ansi-styles dependency.

3. How It Works

Tag parsing now: (1) creates safe pattern by stripping g/y flags to avoid stateful matching bugs, (2) normalizes beta versions (e.g., 1.0.0-beta11.0.0-beta.1), (3) filters valid semver tags, (4) sorts using standard semver comparison instead of custom logic. Removes comment separator line as cleanup.

4. Risks

None — semver library is well-tested and handles edge cases better than custom sorting. Pattern sanitization prevents potential bugs with stateful regexes. Normalization required since semver.valid() expects dots between version parts.

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how

@davseve davseve changed the title chore: fix review comments leftovers. chore: fix review comments leftovers [ED-24451] Jul 15, 2026
@wiz-9a149474ff

wiz-9a149474ff Bot commented Jul 15, 2026

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 2 Medium
Software Management Finding Software Management Findings -
Total 2 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

davseve and others added 3 commits July 15, 2026 14:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses leftover review feedback for ED-24451 by refactoring tag parsing/sorting to use semver, tightening a PHP version replacement regex, and cleaning up section structure in the version utility.

Changes:

  • Refactored parseLatestTagFromLsRemote() to sanitize regex flags, validate tags via semver.valid(), and sort with semver.compare() (with -betaN normalization).
  • Adjusted the patchPhpVersion() regex to remove the global flag.
  • Added a local normalizeVersion() helper for beta tag normalization.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/editor-github-actions-utils/src/version-files.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 4 changed files in this pull request and generated 1 comment.

Comment thread packages/editor-github-actions-utils/src/version-files.ts
Ntnelbaba
Ntnelbaba previously approved these changes Jul 15, 2026
@davseve
davseve merged commit c1f73a3 into main Jul 15, 2026
19 of 20 checks passed
@davseve
davseve deleted the ED-24451-fix branch July 15, 2026 14:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 6 changed files in this pull request and generated 1 comment.

Comment on lines 15 to 19
"dependencies": {
"@actions/core": "^1.11.1",
"ansi-styles": "^6.2.1"
"ansi-styles": "^6.2.1",
"semver": "^7.7.2"
},
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.

3 participants