package-versioner 0.0.1
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/LICENCE.md +7 -0
- package/README.md +89 -0
- package/dist/index.cjs +667 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +648 -0
- package/package-versioner.schema.json +90 -0
- package/package.json +72 -0
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"$schema": {
|
|
6
|
+
"type": "string",
|
|
7
|
+
"description": "JSON schema reference"
|
|
8
|
+
},
|
|
9
|
+
"tagPrefix": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1,
|
|
12
|
+
"description": "The prefix used for Git tags",
|
|
13
|
+
"default": "v"
|
|
14
|
+
},
|
|
15
|
+
"preset": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["angular", "conventional"],
|
|
18
|
+
"default": "angular",
|
|
19
|
+
"description": "The commit message convention preset"
|
|
20
|
+
},
|
|
21
|
+
"baseBranch": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"description": "The main branch for versioning",
|
|
25
|
+
"default": "main"
|
|
26
|
+
},
|
|
27
|
+
"synced": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"default": false,
|
|
30
|
+
"description": "Whether packages should be versioned together"
|
|
31
|
+
},
|
|
32
|
+
"packages": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"items": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"minLength": 1
|
|
37
|
+
},
|
|
38
|
+
"default": [],
|
|
39
|
+
"description": "List of packages to include in versioning"
|
|
40
|
+
},
|
|
41
|
+
"versionStrategy": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"enum": ["branchPattern", "commitMessage"],
|
|
44
|
+
"default": "commitMessage",
|
|
45
|
+
"description": "How to determine version changes"
|
|
46
|
+
},
|
|
47
|
+
"branchPattern": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"items": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"minLength": 1
|
|
52
|
+
},
|
|
53
|
+
"default": ["major:", "minor:", "patch:"],
|
|
54
|
+
"description": "Patterns to match against branch names"
|
|
55
|
+
},
|
|
56
|
+
"updateInternalDependencies": {
|
|
57
|
+
"type": "string",
|
|
58
|
+
"enum": ["major", "minor", "patch", "no-internal-update"],
|
|
59
|
+
"default": "patch",
|
|
60
|
+
"description": "How to update dependencies between packages"
|
|
61
|
+
},
|
|
62
|
+
"skip": {
|
|
63
|
+
"type": "array",
|
|
64
|
+
"items": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"minLength": 1
|
|
67
|
+
},
|
|
68
|
+
"default": [],
|
|
69
|
+
"description": "Packages to exclude from versioning"
|
|
70
|
+
},
|
|
71
|
+
"commitMessage": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"minLength": 1,
|
|
74
|
+
"default": "chore(release): v${version}",
|
|
75
|
+
"description": "Template for commit messages"
|
|
76
|
+
},
|
|
77
|
+
"prereleaseIdentifier": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"minLength": 1,
|
|
80
|
+
"description": "Identifier for prerelease versions"
|
|
81
|
+
},
|
|
82
|
+
"skipHooks": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"default": false,
|
|
85
|
+
"description": "Whether to skip Git hooks"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"required": ["tagPrefix", "preset", "updateInternalDependencies"],
|
|
89
|
+
"additionalProperties": false
|
|
90
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "package-versioner",
|
|
3
|
+
"description": "A powerful CLI tool for automated semantic versioning based on Git history and conventional commits. Supports monorepos with synchronized or independent package versioning strategies.",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"author": {
|
|
10
|
+
"name": "Sam Maister",
|
|
11
|
+
"email": "goosewobbler@protonmail.com"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/goosewobbler/package-versioner",
|
|
16
|
+
"homepage": "https://github.com/goosewobbler/package-versioner"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"version",
|
|
20
|
+
"semver",
|
|
21
|
+
"git",
|
|
22
|
+
"package"
|
|
23
|
+
],
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist/**",
|
|
27
|
+
"package-versioner.schema.json"
|
|
28
|
+
],
|
|
29
|
+
"bin": {
|
|
30
|
+
"package-versioner": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"lint-staged": {
|
|
33
|
+
"*.{js,ts,jsx,tsx}": [
|
|
34
|
+
"biome check --apply",
|
|
35
|
+
"biome format --write"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"@biomejs/biome": "^1.9.4",
|
|
40
|
+
"@types/figlet": "^1.5.5",
|
|
41
|
+
"@types/node": "^18.14.0",
|
|
42
|
+
"@types/semver": "^7.3.13",
|
|
43
|
+
"@vitest/coverage-v8": "^3.1.1",
|
|
44
|
+
"husky": "^9.1.7",
|
|
45
|
+
"lint-staged": "^15.5.0",
|
|
46
|
+
"tsup": "^5.10.1",
|
|
47
|
+
"typescript": "^5.8.3",
|
|
48
|
+
"vitest": "^3.1.1"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@manypkg/get-packages": "^2.2.2",
|
|
52
|
+
"chalk": "^5.4.1",
|
|
53
|
+
"commander": "^13.1.0",
|
|
54
|
+
"conventional-changelog-angular": "^8.0.0",
|
|
55
|
+
"conventional-recommended-bump": "^11.0.0",
|
|
56
|
+
"figlet": "^1.8.0",
|
|
57
|
+
"git-semver-tags": "^8.0.0",
|
|
58
|
+
"semver": "^7.7.1"
|
|
59
|
+
},
|
|
60
|
+
"scripts": {
|
|
61
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
62
|
+
"dev": "tsup src/index.ts --format esm,cjs --watch --dts",
|
|
63
|
+
"clean": "rm -rf node_modules && rm -rf dist",
|
|
64
|
+
"test": "vitest run --coverage",
|
|
65
|
+
"test:watch": "vitest --coverage",
|
|
66
|
+
"lint": "biome check .",
|
|
67
|
+
"lint:fix": "biome check --apply .",
|
|
68
|
+
"format": "biome format --write .",
|
|
69
|
+
"format:check": "biome format .",
|
|
70
|
+
"fix": "pnpm run lint:fix && pnpm run format"
|
|
71
|
+
}
|
|
72
|
+
}
|