-
Notifications
You must be signed in to change notification settings - Fork 1
fix: core, install & config audit compliance #179
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,4 +47,4 @@ analysis/ | |
| gaps.md | ||
| /improve.md | ||
| philosophy.md | ||
| autoresearch-results.tsv | ||
| /autoresearch-results.tsv | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,33 @@ | ||
| /** MaxsimCLI version — auto-injected from package.json at build time. */ | ||
| export const VERSION = '5.10.0'; | ||
| export const VERSION = '5.12.0'; | ||
|
|
||
| /** | ||
| * Parse a semantic version string into components. | ||
| * Returns null if the string is not a valid semver. | ||
| */ | ||
| export function parseVersion(versionStr: string): { major: number; minor: number; patch: number } | null { | ||
| const match = versionStr.match(/^(\d+)\.(\d+)\.(\d+)/); | ||
| if (!match) return null; | ||
| return { | ||
| major: Number.parseInt(match[1], 10), | ||
| minor: Number.parseInt(match[2], 10), | ||
| patch: Number.parseInt(match[3], 10), | ||
| }; | ||
|
Comment on lines
+5
to
+15
|
||
| } | ||
|
|
||
| /** | ||
| * Check if the current VERSION is at least the given minimum version. | ||
| */ | ||
| export function isVersionAtLeast(minimum: string): boolean { | ||
| const current = parseVersion(VERSION); | ||
| const target = parseVersion(minimum); | ||
| if (!current || !target) return false; | ||
| if (current.major !== target.major) return current.major > target.major; | ||
| if (current.minor !== target.minor) return current.minor > target.minor; | ||
| return current.patch >= target.patch; | ||
| } | ||
|
|
||
| /** Get the current version string. */ | ||
| export function getVersion(): string { | ||
| return VERSION; | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback branch that rewrites
src/core/version.tswhen the file is missing (or lacks a VERSION export) only writes the VERSION constant, but this PR now relies on additional exports (parseVersion,isVersionAtLeast,getVersion). If this branch ever runs, the build/tests will break because those exports disappear. Update the generated template content to include all expected exports, not just VERSION.