Skip to content

Commit 43f8aaa

Browse files
authored
chore: replace Python scripts with tools package (#9)
Replaces scripts written in Python for use with release, changelog, and conventional commit parsing with TypeScript implementations. The latter are grouped in a `tools` package. - removes all remaining Python code - removes unused `changelog.ts` script - adds `tools` package with CLIs for: - changelog - commitlint - release - updates docs
1 parent 815e051 commit 43f8aaa

File tree

29 files changed

+811
-423
lines changed

29 files changed

+811
-423
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
with:
4848
tag_name: v${{ steps.vars.outputs.version }}
4949
release_name: Release v${{ steps.vars.outputs.version }}
50-
body_path: changeset.md
50+
body_path: CHANGELOG.md
5151
draft: false
5252
prerelease: false
5353

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ will pick up changes only after running `pnpm build`, not when source files chan
109109
2. Create release commit on the branch
110110

111111
```sh
112-
pnpm release major|minor|patch
112+
pnpm exec release major|minor|patch
113113
```
114114

115115
or to release an alpha version
116116

117117
```sh
118-
pnpm release premajor|preminor|prepatch|prerelease
118+
pnpm exec release premajor|preminor|prepatch|prerelease
119119
```
120120

121121
3. Push release branch

changeset.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

dprint.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"icons/src",
1818
"icons/svgo_config.yml",
1919
"CHANGELOG.md",
20-
"changeset.md",
2120
"pnpm-lock.yaml"
2221
],
2322
"plugins": [

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,13 @@
1111
"scripts": {
1212
"backstage:local": "npx --yes @techdocs/cli serve -v -i artifacts.se.axis.com/axis/backstage-techdocs",
1313
"build": "pnpm -r build",
14-
"changelog": "node --require ts-node/register scripts/changelog.ts",
1514
"check": "pnpm format:check && pnpm lint",
1615
"check:unused-deps": "pnpm -r check:unused-deps",
1716
"clear:deps": "find . -type d -name node_modules -prune -exec rm -rf {} \\;",
18-
"commitlint": "sbin/commitlint.py",
1917
"dev": "pnpm --filter examples dev",
2018
"format": "dprint fmt",
2119
"format:check": "dprint check",
2220
"lint": "pnpm -r lint",
23-
"release": "sbin/release.py",
2421
"sort:check": "sort-package-json '**/package.json' '!**/node_modules/**/package.json' --check",
2522
"sort:run": "sort-package-json '**/package.json' '!**/node_modules/**/package.json'",
2623
"test": "pnpm -r test"
@@ -38,8 +35,8 @@
3835
"eslint-plugin-deprecation": "^1.3.3",
3936
"eslint-plugin-react": "^7.32.2",
4037
"eslint-plugin-react-hooks": "^4.6.0",
41-
"semver": "^7.3.7",
4238
"sort-package-json": "2.5.1",
39+
"tools": "file:tools",
4340
"ts-node": "^10.9.1",
4441
"typescript": "^4.5.5"
4542
},

pnpm-lock.yaml

Lines changed: 58 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ packages:
55
- "icons"
66
- "styles"
77
- "theme"
8+
- "tools"

sbin/commitlint.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

sbin/release.py

Lines changed: 0 additions & 54 deletions
This file was deleted.

sbin/utils.py

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)