Skip to content

Commit

Permalink
feat: supports “prerelease” versions (#271)
Browse files Browse the repository at this point in the history
* feat: supports “prerelease” versions

* feat: supports “prerelease” versions

* reslang version

* reslang version
  • Loading branch information
xufulin1994 authored Mar 27, 2024
1 parent 05027aa commit 7e98d1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions docs/releases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.2.6 3/25/2024
- The definition of version in Reslang support semver format goes something like (Major.Minor.Patch-<pre-release>).


## 6.2.5 2/23/2023
- Add `required` attribute to httpHeader. Support optional HTTP request headers.

Expand Down
2 changes: 1 addition & 1 deletion src/grammar/base.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ description = "\"" _ inner:(!"\"" i:. {return i})* "\"" {
}

// version
semver = semver:([0-9]+ "." [0-9]+ "." [0-9]+) { return semver.flat().join(""); }
semver = semver:([0-9]+ "." [0-9]+ "." [0-9]+ ("-" [a-zA-Z0-9.-]+)?) { return semver.flat(2).join(""); }

// whitespace or comment
_ = ([ \t\r\n]+ / comment)*
Expand Down
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import JsonSchemaGen from "./genjsonschema"
const RULES = "rules.json"
const LOCAL_RULES = lpath.join(__dirname, "library", RULES)

export const VERSION = "v6.2.5"
export const VERSION = "v6.2.6"

// parse the cmd line
const args = yargs
Expand Down Expand Up @@ -130,7 +130,7 @@ const files = args._
// read in the rules structure
const rulesData = readFile(args.rulefile || LOCAL_RULES)
const rules = JSON.parse(rulesData) as IRules
rules.ignoreRules = args.ignorerules ? true : false
rules.ignoreRules = !!args.ignorerules

const testwrite = args.testwrite
if (testwrite) {
Expand Down

0 comments on commit 7e98d1f

Please sign in to comment.