chore: Монорепо с общими пакетами

This commit is contained in:
2026-03-04 16:31:57 +03:00
parent 8f2c799235
commit 915c56351b
420 changed files with 13403 additions and 7071 deletions

43
docs/git-installation.md Normal file
View File

@@ -0,0 +1,43 @@
# Git installation (SSH + tags)
This repository is consumed directly from Git tags, not from npm.
## Requirements
- You have SSH access to the repository (`git@github.com:ORG/REPO.git`).
- Release tags already exist in remote.
- `dist/` is committed in the tagged commit.
## Tag naming
Use package-specific tags:
- `tach-typography-vX.Y.Z`
- `video-player-vX.Y.Z`
- `content-suggestions-vX.Y.Z`
## Yarn template
Always wrap the dependency string in quotes because of `&tag=`.
```bash
yarn add "@hublib-web/<package>@git+ssh://git@github.com/ORG/REPO.git#workspace=@hublib-web/<package>&tag=<package>-vX.Y.Z"
```
## Package examples
```bash
yarn add "@hublib-web/tach-typography@git+ssh://git@github.com/ORG/REPO.git#workspace=@hublib-web/tach-typography&tag=tach-typography-v0.1.0"
yarn add "@hublib-web/video-player@git+ssh://git@github.com/ORG/REPO.git#workspace=@hublib-web/video-player&tag=video-player-v0.1.0"
yarn add "@hublib-web/content-suggestions@git+ssh://git@github.com/ORG/REPO.git#workspace=@hublib-web/content-suggestions&tag=content-suggestions-v0.1.0"
```
## Update package version in a consumer app
```bash
yarn up "@hublib-web/video-player@git+ssh://git@github.com/ORG/REPO.git#workspace=@hublib-web/video-player&tag=video-player-v0.2.0"
```
## Related docs
- Release policy: [release-policy.md](./release-policy.md)

54
docs/release-policy.md Normal file
View File

@@ -0,0 +1,54 @@
# Release policy
This monorepo is released through Git tags. We do not use Changesets or npm publish.
## Principles
- Every release points to a commit where the package `dist/` is already built and committed.
- Tags are package-specific, so each package can be released independently.
- Consumers install by tag using Git SSH URLs.
## Tag format
- `tach-typography-vX.Y.Z`
- `video-player-vX.Y.Z`
- `content-suggestions-vX.Y.Z`
`X.Y.Z` must match the version in the package's `package.json`.
## Release checklist (single package)
1. Update package version in `packages/<package>/package.json`.
2. Build package:
```bash
yarn workspace @hublib-web/<package> build
```
3. Verify that `dist/` and `package.json` contain the release changes.
4. Commit release files:
```bash
git add packages/<package>/package.json packages/<package>/dist
git commit -m "release(<package>): vX.Y.Z"
```
5. Create annotated tag:
```bash
git tag -a <package>-vX.Y.Z -m "@hublib-web/<package> vX.Y.Z"
```
6. Push commit and tags:
```bash
git push origin main --follow-tags
```
## Multi-package release
If one commit releases several packages, create one tag per package on the same commit.
## Consumer installation
Use the package-specific tag in dependency spec. See [git-installation.md](./git-installation.md).