@ubic/release-it-config 0.1.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/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Ubic release-it config
2
+
3
+ Стандартная конфигурация для [release-it](https://github.com/release-it/release-it).
4
+
5
+ ## Требования
6
+
7
+ - Node.js 20.\* [https://nodejs.org](https://nodejs.org/en/)
8
+ - Yarn 4.\* [https://yarnpkg.com](https://yarnpkg.com/)
9
+
10
+ ## Скрипты
11
+
12
+ ```sh
13
+ # запускает режим разработки
14
+ yarn dev
15
+
16
+ # собирает пакет для публикации
17
+ yarn build
18
+
19
+ # проверяет код на ошибки
20
+ yarn lint
21
+
22
+ # собирает пакет и запускает его в режиме production
23
+ yarn start
24
+ ```
25
+
26
+ ## Разработка
27
+
28
+ Используемый язык - typescript. В проекте используется esbuild для сборки. Разработка ведется внутри директории `/src`.
29
+
30
+ > **Важно!** В итоговый бандл попадают только модули из файла `/src/index.ts`.
31
+
32
+ ## Сборка и публикация
33
+
34
+ В registry попадет только содержимое `/dist` + `package.json`, `README.md` и т.д.
35
+ Пакет собирается в оба формата (CommonJS, ES Modules), и типы в отдельном d.ts файле.
36
+
37
+ При сборке git-тега, он автоматически запушится в репозиторий. Публикация пакета происходит автоматически для каждого тега на уровне CI/CD в 2 registries ([NPM](https://www.npmjs.com/org/ubic), [Nexus](https://nexus.ubic.tech/#browse/browse:npm-hosted-front)).
38
+
39
+ Для публикации **обязательно добавить в gitlab ENV**: `NEXUS_TOKEN`, `NPM_TOKEN`. В них должны содержаться access-токены для обоих registries. Получить их можно в профиле: [NPM](https://www.npmjs.com/) -> Profile -> Access Tokens, [Nexus](https://nexus.ubic.tech/#user/nugetapitoken). Если есть проблемы с токенами, обратись к мейнтейнеру репозитория.
40
+
41
+ ## Используемые технологии и инструменты
42
+
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/)
@@ -0,0 +1 @@
1
+ "use strict";var r=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var c=Object.prototype.hasOwnProperty;var g=(t,e)=>{for(var o in e)r(t,o,{get:e[o],enumerable:!0})},l=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of a(e))!c.call(t,i)&&i!==o&&r(t,i,{get:()=>e[i],enumerable:!(n=p(e,i))||n.enumerable});return t};var m=t=>l(r({},"__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 rev-parse HEAD) = $(git rev-parse @{u}) ] || { 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, \u043F\u043E\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0440\u0438 \u043F\u043E\u043C\u043E\u0449\u0438 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:f};
@@ -0,0 +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 rev-parse HEAD) = $(git rev-parse @{u}) ] || { 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, \u043F\u043E\u0434\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0430\u043A\u0442\u0443\u0430\u043B\u044C\u043D\u043E\u0435 \u0441\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435 \u043F\u0440\u0438 \u043F\u043E\u043C\u043E\u0449\u0438 "git pull".'; exit 1; }`},npm:{publish:!1},plugins:e};export{t as releaseItConfig};
@@ -0,0 +1,33 @@
1
+ // Generated by dts-bundle-generator v9.5.1
2
+
3
+ import { Options as WriterOptions } from 'conventional-changelog-writer';
4
+ import { ParserOptions } from 'conventional-commits-parser';
5
+ import { Config as ReleaseItConfig } from 'release-it';
6
+
7
+ export declare const releaseItConfig: ReleaseItConfig;
8
+ export interface ConventionalCommitsPluginOptions {
9
+ preset?: {
10
+ name: string;
11
+ types: {
12
+ type: string;
13
+ section: string;
14
+ }[];
15
+ };
16
+ infile?: string;
17
+ header?: string;
18
+ writerOpts?: Partial<WriterOptions>;
19
+ parserOpts?: Partial<ParserOptions>;
20
+ gitRawCommitsOpts?: Partial<{
21
+ path: string | string[];
22
+ from: string;
23
+ to: string;
24
+ format: string;
25
+ ignore: RegExp;
26
+ since: Date | string;
27
+ reverse: boolean;
28
+ merges: boolean;
29
+ }>;
30
+ }
31
+ export type PluginConfig = Record<"@release-it/conventional-changelog", ConventionalCommitsPluginOptions>;
32
+
33
+ export {};
package/package.json ADDED
@@ -0,0 +1,80 @@
1
+ {
2
+ "name": "@ubic/release-it-config",
3
+ "version": "0.1.1",
4
+ "description": "Standard release-it config for projects in ubic technologies",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://gitlab.ubic.tech/common/front/release-it-config"
8
+ },
9
+ "homepage": "https://gitlab.ubic.tech/common/front/release-it-config#readme",
10
+ "bugs": "https://gitlab.ubic.tech/common/front/release-it-config/-/issues",
11
+ "author": "Oleg Kireev <okireev@ubic.tech>",
12
+ "keywords": [
13
+ "ubic",
14
+ "release-it",
15
+ "config"
16
+ ],
17
+ "license": "MIT",
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "engines": {
22
+ "node": ">=20 <21",
23
+ "npm": "PLEASE USE YARN",
24
+ "pnpm": "PLEASE USE YARN"
25
+ },
26
+ "packageManager": "yarn@4.7.0",
27
+ "type": "module",
28
+ "main": "./dist/cjs/index.js",
29
+ "module": "./dist/esm/index.js",
30
+ "types": "./dist/types/index.d.ts",
31
+ "exports": {
32
+ "types": "./dist/types/index.d.ts",
33
+ "import": "./dist/esm/index.mjs",
34
+ "require": "./dist/cjs/index.cjs",
35
+ "default": "./dist/esm/index.mjs"
36
+ },
37
+ "files": [
38
+ "dist"
39
+ ],
40
+ "scripts": {
41
+ "dev": "nodemon --ext ts --exec tsx src/index.ts",
42
+ "prebuild": "yarn lint",
43
+ "prepack": "yarn build",
44
+ "build": "node scripts/build.js",
45
+ "start": "yarn build && node dist/esm/index.js",
46
+ "lint": "yarn lint:types && yarn lint:js",
47
+ "lint:js": "yarn eslint --config ./config/eslint.config.ts --cache src",
48
+ "lint:types": "yarn tsc --noEmit --skipLibCheck",
49
+ "test": "yarn vitest --watch=false",
50
+ "test:watch": "yarn vitest --watch=true",
51
+ "prepare": "husky",
52
+ "postinstall": "husky",
53
+ "prepublishOnly": "yarn build",
54
+ "postversion": "git push --follow-tags"
55
+ },
56
+ "devDependencies": {
57
+ "@commitlint/cli": "^19.8.0",
58
+ "@release-it/conventional-changelog": "^10.0.0",
59
+ "@types/conventional-changelog-writer": "^4.0.10",
60
+ "@types/conventional-commits-parser": "^5.0.1",
61
+ "@ubic/commitlint-config": "^1.0.4",
62
+ "@ubic/eslint-config": "^7.0.0",
63
+ "conventional-changelog-conventionalcommits": "^7",
64
+ "dts-bundle-generator": "^9.5.1",
65
+ "esbuild": "^0.25.1",
66
+ "eslint": "^9.22.0",
67
+ "husky": "^9.1.7",
68
+ "lint-staged": "^15.5.0",
69
+ "nodemon": "^3.1.9",
70
+ "prettier": "^3.5.3",
71
+ "release-it": "^18.1.2",
72
+ "tsx": "^4.19.3",
73
+ "typescript": "^5.8.2",
74
+ "vitest": "^3.0.9"
75
+ },
76
+ "peerDependencies": {
77
+ "@release-it/conventional-changelog": ">=10.0.0",
78
+ "release-it": ">=18.0.0"
79
+ }
80
+ }