@ubic/release-it-config 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -4,47 +4,41 @@
4
4
 
5
5
  ## Требования
6
6
 
7
- - Node.js 20.\* [https://nodejs.org](https://nodejs.org/en/)
8
- - Yarn 4.\* [https://yarnpkg.com](https://yarnpkg.com/)
7
+ - `release-it` 18 и новее. [https://github.com/release-it/release-it](https://github.com/release-it/release-it)
8
+ - `@release-it/conventional-changelog` 10 и новее.\* [https://github.com/release-it/conventional-changelog](@release-it/conventional-changelog)
9
9
 
10
- ## Скрипты
10
+ ## Установка
11
11
 
12
- ```sh
13
- # запускает режим разработки
14
- yarn dev
15
-
16
- # собирает пакет для публикации
17
- yarn build
12
+ Установить в проект конфиг и пакеты утилиты:
18
13
 
19
- # проверяет код на ошибки
20
- yarn lint
21
-
22
- # собирает пакет и запускает его в режиме production
23
- yarn start
14
+ ```
15
+ yarn add -D release-it @release-it/conventional-changelog @ubic/release-it-config
24
16
  ```
25
17
 
26
- ## Разработка
18
+ ## Настройка
27
19
 
28
- Используемый язык - typescript. В проекте используется esbuild для сборки. Разработка ведется внутри директории `/src`.
20
+ Создать файл конфигурации `.release-it.ts` в корне проекта:
29
21
 
30
- > **Важно!** В итоговый бандл попадают только модули из файла `/src/index.ts`.
22
+ ```ts
23
+ import { releaseItConfig } from '@ubic/release-it-config';
31
24
 
32
- ## Сборка и публикация
25
+ export default releaseItConfig;
26
+ ```
33
27
 
34
- В registry попадет только содержимое `/dist` + `package.json`, `README.md` и т.д.
35
- Пакет собирается в оба формата (CommonJS, ES Modules), и типы в отдельном d.ts файле.
28
+ Добавить в package.json скрипт для релиза
36
29
 
37
- При сборке git-тега, он автоматически запушится в репозиторий. Публикация пакета происходит автоматически для каждого тега на уровне CI/CD в 2 registries ([NPM](https://www.npmjs.com/org/ubic), [Nexus](https://nexus.ubic.tech/#browse/browse:npm-hosted-front)).
30
+ ```sh
31
+ npm pkg set scripts.release="release-it"
32
+ ```
38
33
 
39
- Для публикации **обязательно добавить в gitlab ENV**: `NEXUS_TOKEN`, `NPM_TOKEN`. В них должны содержаться access-токены для обоих registries. Получить их можно в профиле: [NPM](https://www.npmjs.com/) -> Profile -> Access Tokens, [Nexus](https://nexus.ubic.tech/#user/nugetapitoken). Если есть проблемы с токенами, обратись к мейнтейнеру репозитория.
34
+ ### Указание пути до файла конфига
40
35
 
41
- ## Используемые технологии и инструменты
36
+ При желании, можно изменить расположение файла конфига и указать его в скрипте:
42
37
 
43
- - [Typescript](https://www.typescriptlang.org/)
44
- - [esbuild](https://esbuild.github.io/)
45
- - [ESLint](https://eslint.org/)
46
- - [Prettier](https://prettier.io/)
47
- - [Commitlint](https://commitlint.js.org/)
48
- - [Vitest](https://vitest.dev/)
49
- - Git-hooks ([lint-staged](https://github.com/lint-staged/lint-staged) + [husky](https://typicode.github.io/husky/))
50
- - [GitLab](https://gitlab.com/)
38
+ ```json
39
+ // package.json
40
+ "scripts": {
41
+ // ...
42
+ "release": "release-it --config ./config/.release-it.ts"
43
+ }
44
+ ```
@@ -1 +1 @@
1
- "use strict";var n=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of p(e))!c.call(t,i)&&i!==o&&n(t,i,{get:()=>e[i],enumerable:!(r=a(e,i))||r.enumerable});return t};var m=t=>l(n({},"__esModule",{value:!0}),t);var u={};g(u,{releaseItConfig:()=>s});module.exports=m(u);var f={"@release-it/conventional-changelog":{preset:{name:"conventionalcommits",types:[{type:"feat",section:"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"fix",section:"\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"chore",section:"\u041F\u0440\u043E\u0447\u0435\u0435"},{type:"refactor",section:"\u0420\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433"},{type:"build",section:"\u0421\u0431\u043E\u0440\u043A\u0430"},{type:"docs",section:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F"},{type:"ci",section:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 CI/CD"},{type:"perf",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438"},{type:"test",section:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043C\u0438"},{type:"style",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043C\u043E\u0441\u0442\u0438 \u043A\u043E\u0434\u0430"}]},infile:"CHANGELOG.md",header:"# \u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",writerOpts:{groupBy:"type"},parserOpts:{mergePattern:/'Merge branch'/}}},s={git:{requireBranch:"master",requireUpstream:!0,requireCommits:!0,requireCleanWorkingDir:!1,addUntrackedFiles:!1,commitMessage:"chore(release): ${version}",tag:!0,tagName:"v${version}",push:!0},hooks:{"before:init":`git fetch --quiet && git merge-base --is-ancestor @{u} HEAD || { echo '\u274C \u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u044F \u043D\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:f};
1
+ "use strict";var n=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var o in e)n(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!c.call(t,i)&&i!==o&&n(t,i,{get:()=>e[i],enumerable:!(r=p(e,i))||r.enumerable});return t};var m=t=>l(n({},"__esModule",{value:!0}),t);var f={};g(f,{releaseItConfig:()=>s});module.exports=m(f);var u={"@release-it/conventional-changelog":{preset:{name:"conventionalcommits",types:[{type:"feat",section:"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"fix",section:"\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"chore",section:"\u041F\u0440\u043E\u0447\u0435\u0435"},{type:"refactor",section:"\u0420\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433"},{type:"build",section:"\u0421\u0431\u043E\u0440\u043A\u0430"},{type:"docs",section:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F"},{type:"ci",section:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 CI/CD"},{type:"perf",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438"},{type:"test",section:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043C\u0438"},{type:"style",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043C\u043E\u0441\u0442\u0438 \u043A\u043E\u0434\u0430"}]},infile:"CHANGELOG.md",header:"# \u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",writerOpts:{groupBy:"type"},parserOpts:{mergePattern:/'Merge branch'/}}},s={git:{requireBranch:"master",requireUpstream:!0,requireCommits:!0,requireCleanWorkingDir:!0,addUntrackedFiles:!1,commitMessage:"chore(release): ${version}",tag:!0,tagName:"v${version}",push:!0},hooks:{"before:init":`git fetch --quiet && git merge-base --is-ancestor @{u} HEAD || { echo '\u274C \u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u044F \u043D\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:u};
@@ -1 +1 @@
1
- var e={"@release-it/conventional-changelog":{preset:{name:"conventionalcommits",types:[{type:"feat",section:"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"fix",section:"\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"chore",section:"\u041F\u0440\u043E\u0447\u0435\u0435"},{type:"refactor",section:"\u0420\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433"},{type:"build",section:"\u0421\u0431\u043E\u0440\u043A\u0430"},{type:"docs",section:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F"},{type:"ci",section:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 CI/CD"},{type:"perf",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438"},{type:"test",section:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043C\u0438"},{type:"style",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043C\u043E\u0441\u0442\u0438 \u043A\u043E\u0434\u0430"}]},infile:"CHANGELOG.md",header:"# \u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",writerOpts:{groupBy:"type"},parserOpts:{mergePattern:/'Merge branch'/}}},t={git:{requireBranch:"master",requireUpstream:!0,requireCommits:!0,requireCleanWorkingDir:!1,addUntrackedFiles:!1,commitMessage:"chore(release): ${version}",tag:!0,tagName:"v${version}",push:!0},hooks:{"before:init":`git fetch --quiet && git merge-base --is-ancestor @{u} HEAD || { echo '\u274C \u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u044F \u043D\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:e};export{t as releaseItConfig};
1
+ var e={"@release-it/conventional-changelog":{preset:{name:"conventionalcommits",types:[{type:"feat",section:"\u0414\u043E\u0431\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"fix",section:"\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E"},{type:"chore",section:"\u041F\u0440\u043E\u0447\u0435\u0435"},{type:"refactor",section:"\u0420\u0435\u0444\u0430\u043A\u0442\u043E\u0440\u0438\u043D\u0433"},{type:"build",section:"\u0421\u0431\u043E\u0440\u043A\u0430"},{type:"docs",section:"\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0446\u0438\u044F"},{type:"ci",section:"\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0430 CI/CD"},{type:"perf",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u043F\u0440\u043E\u0438\u0437\u0432\u043E\u0434\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438"},{type:"test",section:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0442\u0435\u0441\u0442\u0430\u043C\u0438"},{type:"style",section:"\u0423\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0435 \u0447\u0438\u0442\u0430\u0435\u043C\u043E\u0441\u0442\u0438 \u043A\u043E\u0434\u0430"}]},infile:"CHANGELOG.md",header:"# \u0418\u0441\u0442\u043E\u0440\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",writerOpts:{groupBy:"type"},parserOpts:{mergePattern:/'Merge branch'/}}},t={git:{requireBranch:"master",requireUpstream:!0,requireCommits:!0,requireCleanWorkingDir:!0,addUntrackedFiles:!1,commitMessage:"chore(release): ${version}",tag:!0,tagName:"v${version}",push:!0},hooks:{"before:init":`git fetch --quiet && git merge-base --is-ancestor @{u} HEAD || { echo '\u274C \u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043B\u043E\u043A\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u0440\u0435\u043F\u043E\u0437\u0438\u0442\u043E\u0440\u0438\u044F \u043D\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E, \u0432\u044B\u043F\u043E\u043B\u043D\u0438\u0442\u0435 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:e};export{t as releaseItConfig};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ubic/release-it-config",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Standard release-it config for projects in ubic technologies",
5
5
  "repository": {
6
6
  "type": "git",
@@ -50,7 +50,8 @@
50
50
  "test:watch": "yarn vitest --watch=true",
51
51
  "prepare": "husky",
52
52
  "prepublishOnly": "yarn build",
53
- "postversion": "git push --follow-tags"
53
+ "postversion": "node scripts/push-pre-tags.js",
54
+ "release": "release-it --config ./config/.release-it.ts"
54
55
  },
55
56
  "devDependencies": {
56
57
  "@commitlint/cli": "^19.8.0",
@@ -59,7 +60,6 @@
59
60
  "@types/conventional-commits-parser": "^5.0.1",
60
61
  "@ubic/commitlint-config": "^1.0.4",
61
62
  "@ubic/eslint-config": "^7.0.0",
62
- "conventional-changelog-conventionalcommits": "^7",
63
63
  "dts-bundle-generator": "^9.5.1",
64
64
  "esbuild": "^0.25.1",
65
65
  "eslint": "^9.22.0",