versimo 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/LICENSE +21 -0
- package/README.md +107 -2
- package/dist/bucket.d.ts +13 -0
- package/dist/bucket.js +60 -0
- package/dist/client.d.ts +24 -0
- package/dist/client.js +85 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +8 -0
- package/dist/provider.d.ts +28 -0
- package/dist/provider.js +51 -0
- package/dist/resolve.d.ts +5 -0
- package/dist/resolve.js +22 -0
- package/dist/semver.d.ts +11 -0
- package/dist/semver.js +56 -0
- package/dist/transitions.d.ts +14 -0
- package/dist/transitions.js +49 -0
- package/dist/types.d.ts +47 -0
- package/dist/types.js +8 -0
- package/dist/validate.d.ts +6 -0
- package/dist/validate.js +77 -0
- package/docs/api.md +147 -0
- package/docs/concepts.md +63 -0
- package/docs/porting.md +111 -0
- package/docs/record-format.md +61 -0
- package/docs/usage.md +178 -0
- package/package.json +49 -4
- package/schema/examples/billing.json +15 -0
- package/schema/module-record.schema.json +49 -0
package/package.json
CHANGED
|
@@ -1,6 +1,51 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "versimo",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Release model with no staging. Resolve last, current and next versions of a module for each user.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Lucasia Ltd",
|
|
8
|
+
"homepage": "https://versimo.dev",
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/luca-sia/versimo.git"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/luca-sia/versimo/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": ["release", "rollout", "feature-flags", "openfeature", "versioning"],
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=20"
|
|
19
|
+
},
|
|
20
|
+
"sideEffects": false,
|
|
21
|
+
"main": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./schema": "./schema/module-record.schema.json",
|
|
29
|
+
"./package.json": "./package.json"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"schema",
|
|
34
|
+
"docs",
|
|
35
|
+
"README.md",
|
|
36
|
+
"CHANGELOG.md",
|
|
37
|
+
"LICENSE"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc -p tsconfig.build.json",
|
|
41
|
+
"typecheck": "tsc --noEmit",
|
|
42
|
+
"spec:generate": "node --import tsx spec/generate.ts",
|
|
43
|
+
"test": "node --import tsx --test test/*.test.ts",
|
|
44
|
+
"prepare": "npm run build"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/node": "^20.14.0",
|
|
48
|
+
"tsx": "^4.19.0",
|
|
49
|
+
"typescript": "^5.6.0"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://versimo.dev/schema/module-record.schema.json",
|
|
3
|
+
"module": "billing",
|
|
4
|
+
"last": "2.3.1",
|
|
5
|
+
"current": "2.4.0",
|
|
6
|
+
"next": "2.5.0",
|
|
7
|
+
"rollout": 10,
|
|
8
|
+
"healthy": true,
|
|
9
|
+
"updatedAt": "2026-03-12T09:30:00Z",
|
|
10
|
+
"history": [
|
|
11
|
+
{ "at": "2026-02-20T10:00:00Z", "action": "promote", "from": "2.3.1", "to": "2.4.0", "by": "alex" },
|
|
12
|
+
{ "at": "2026-03-10T14:00:00Z", "action": "draft", "from": "2.4.0", "to": "2.5.0", "by": "alex" },
|
|
13
|
+
{ "at": "2026-03-12T09:30:00Z", "action": "rollout", "from": "0", "to": "10", "by": "alex" }
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://versimo.dev/schema/module-record.schema.json",
|
|
4
|
+
"title": "Versimo module record",
|
|
5
|
+
"description": "The release state of one module: last, current and next versions, and the share of users on next.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["module", "last", "current", "next", "rollout", "healthy", "updatedAt"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"$schema": { "type": "string" },
|
|
11
|
+
"module": {
|
|
12
|
+
"description": "Lower-case slug.",
|
|
13
|
+
"type": "string",
|
|
14
|
+
"pattern": "^[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
15
|
+
},
|
|
16
|
+
"last": { "description": "Previous current. The rollback target.", "oneOf": [{ "$ref": "#/$defs/semver" }, { "type": "null" }] },
|
|
17
|
+
"current": { "description": "The version most users get.", "$ref": "#/$defs/semver" },
|
|
18
|
+
"next": { "description": "The version in UAT on live.", "oneOf": [{ "$ref": "#/$defs/semver" }, { "type": "null" }] },
|
|
19
|
+
"rollout": {
|
|
20
|
+
"description": "Share of users on next, as a whole percentage.",
|
|
21
|
+
"type": "integer",
|
|
22
|
+
"minimum": 0,
|
|
23
|
+
"maximum": 100
|
|
24
|
+
},
|
|
25
|
+
"healthy": { "description": "Health of current. When false, users fall back to last.", "type": "boolean" },
|
|
26
|
+
"updatedAt": { "type": "string", "format": "date-time" },
|
|
27
|
+
"history": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"items": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"required": ["at", "action", "from", "to"],
|
|
33
|
+
"properties": {
|
|
34
|
+
"at": { "type": "string", "format": "date-time" },
|
|
35
|
+
"action": { "enum": ["draft", "promote", "rollback", "rollout", "patch"] },
|
|
36
|
+
"from": { "type": ["string", "null"] },
|
|
37
|
+
"to": { "type": ["string", "null"] },
|
|
38
|
+
"by": { "type": "string" }
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"$defs": {
|
|
44
|
+
"semver": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|