File tree 2 files changed +64
-0
lines changed
2 files changed +64
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Introduction
2
+
3
+ Module ` semvar ` implements a comparison of semantic version strings.
4
+ In this module, semantic version strings must begin with a leading "v",
5
+ as in "v1.0.0".
6
+
7
+ The general form of a semantic version string accepted by this module is
8
+
9
+ vMAJOR[.MINOR[.PATCH[-PRERELEASE][+BUILD]]]
10
+
11
+ where square brackets indicate optional parts of the syntax;
12
+ MAJOR, MINOR, and PATCH are decimal integers without extra leading zeros;
13
+ PRERELEASE and BUILD are each a series of non-empty dot-separated identifiers
14
+ using only alphanumeric characters and hyphens; and
15
+ all-numeric PRERELEASE identifiers must not have leading zeros.
16
+
17
+ This module follows Semantic Versioning 2.0.0 (see semver.org)
18
+ with two exceptions. First, it requires the "v" prefix. Second, it recognizes
19
+ vMAJOR and vMAJOR.MINOR (with no prerelease or build suffixes)
20
+ as shorthands for vMAJOR.0.0 and vMAJOR.MINOR.0.
21
+
22
+ ## How to Use
23
+
24
+ + Add the dependency
25
+
26
+ ``` shell
27
+ kcl mod add semver
28
+ ```
29
+
30
+ ``` python
31
+ import semver
32
+
33
+ valid_semver = semver.is_valid(" v1.1.0" ) # True
34
+ ```
35
+
36
+ ## Resource
37
+
38
+ The code source and document are [ here] ( https://github.com/kcl-lang/artifacthub/tree/main/semver )
Original file line number Diff line number Diff line change
1
+ version : 0.1.1
2
+ name : semver
3
+ displayName : semver
4
+ createdAt : " 2023-11-06T09:45:05Z"
5
+ description : Module semver implements comparison of semantic version strings. In this
6
+ module, semantic version strings must begin with a leading `v`, as in `v1.0.0`.
7
+ links :
8
+ - name : KCL homepage
9
+ url : https://kcl-lang.io/
10
+ - name : KCL repo
11
+ url : https://github.com/kcl-lang/kcl
12
+ install : |
13
+ #### Add `semver` with tag `0.1.1` as dependency
14
+ ```
15
+ kpm add semver:0.1.1
16
+ ```
17
+
18
+ #### Pull `semver` with tag `0.1.1` to local
19
+ ```
20
+ kpm pull semver:0.1.1
21
+ ```
22
+ maintainers :
23
+ - name : kcl-lang.io
24
+
25
+ provider :
26
+ name : kcl-lang.io
You can’t perform that action at this time.
0 commit comments