@mrshmllw/campfire 0.0.0 → 1.0.0-crumbs-feature-adding-some-default-configs.2

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.
@@ -1,30 +1,52 @@
1
1
  name: Bump and Publish
2
2
 
3
- on:
3
+ on:
4
4
  workflow_dispatch:
5
5
 
6
6
  permissions:
7
- contents: write
7
+ contents: write
8
8
 
9
9
  jobs:
10
10
  bump-and-publish:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
+ - name: Check branch đŸĒĩ
14
+ run: |
15
+ # Ensure the branch is either:
16
+ # - main
17
+ # OR
18
+ # - feature/your-branch-name
19
+ # - fix/your-branch-name
20
+ # - chore/your-branch-name
21
+ if [[ "$GITHUB_REF" != "refs/heads/main" && ! "$GITHUB_REF" =~ ^refs/heads/(feature|fix|chore)/.* ]]; then
22
+ echo "This job can only run on the 'main' branch or a '(feature|fix|chore)/*' branch."
23
+ exit 1
24
+ fi
25
+ shell: bash
26
+ - name: Generate Token 🔐
27
+ uses: actions/create-github-app-token@v1
28
+ id: app-token
29
+ with:
30
+ app-id: ${{ vars.MARSHMALLOW_CI_APP_ID }}
31
+ private-key: ${{ secrets.MARSHMALLOW_CI_APP_PRIVATE_KEY }}
13
32
  - name: Checkout đŸ›Žī¸
14
33
  uses: actions/checkout@v4
15
34
  with:
35
+ token: ${{ steps.app-token.outputs.token }}
16
36
  persist-credentials: false
17
-
18
37
  - name: Setup Node 👾
19
38
  uses: actions/setup-node@v4
20
39
  with:
21
- node-version: '20'
22
-
40
+ node-version-file: ".nvmrc"
23
41
  - name: Install Dependencies 🔧
24
42
  run: |
25
43
  npm ci
44
+ - name: Configure Git đŸĒĒ
45
+ run: |
46
+ git config user.name "marshmallow-ci"
47
+ git config user.email "ci@marshmallow.co"
26
48
  - name: Generate CHANGELOG.md & Bump & Release to NPM đŸĻĢ
27
49
  env:
28
- GITHUB_TOKEN: ${{ secrets.MARSHMALLOW_CI_PAT }}
50
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
29
51
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30
52
  run: npx semantic-release
@@ -1,30 +1,39 @@
1
1
  name: Preview Bump and Publish
2
2
 
3
- on:
3
+ on:
4
4
  workflow_dispatch:
5
5
 
6
6
  permissions:
7
- contents: write
7
+ contents: write
8
8
 
9
9
  jobs:
10
10
  preview-bump-and-publish:
11
11
  runs-on: ubuntu-latest
12
12
  steps:
13
+ - name: Generate Token 🔐
14
+ uses: actions/create-github-app-token@v1
15
+ id: app-token
16
+ with:
17
+ app-id: ${{ vars.MARSHMALLOW_CI_APP_ID }}
18
+ private-key: ${{ secrets.MARSHMALLOW_CI_APP_PRIVATE_KEY }}
13
19
  - name: Checkout đŸ›Žī¸
14
20
  uses: actions/checkout@v4
15
21
  with:
22
+ token: ${{ steps.app-token.outputs.token }}
16
23
  persist-credentials: false
17
-
18
24
  - name: Setup Node 👾
19
25
  uses: actions/setup-node@v4
20
26
  with:
21
- node-version: '20'
22
-
27
+ node-version-file: ".nvmrc"
23
28
  - name: Install Dependencies 🔧
24
29
  run: |
25
30
  npm ci
31
+ - name: Configure Git đŸĒĒ
32
+ run: |
33
+ git config user.name "marshmallow-ci"
34
+ git config user.email "ci@marshmallow.co"
26
35
  - name: Generate preview CHANGELOG.md
27
36
  env:
28
- GITHUB_TOKEN: ${{ secrets.MARSHMALLOW_CI_PAT }}
37
+ GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
29
38
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30
39
  run: npx semantic-release --dry-run
@@ -0,0 +1 @@
1
+ npx --no -- commitlint --edit $1
@@ -0,0 +1 @@
1
+ npm run pre-commit-lint
package/.nvmrc ADDED
@@ -0,0 +1 @@
1
+ 20.11.0
@@ -0,0 +1,5 @@
1
+ node_modules
2
+ dist
3
+ build
4
+ README.md
5
+ .github
@@ -0,0 +1,2 @@
1
+ import config from './libs/configs/commitlint.config'
2
+ export default config
@@ -0,0 +1,32 @@
1
+ import { RuleConfigSeverity } from '@commitlint/types';
2
+ export const config = {
3
+ parserPreset: 'conventional-changelog-conventionalcommits',
4
+ ignores: [
5
+ (commit) => commit.startsWith('BREAKING CHANGE:'),
6
+ (commit) => commit.startsWith('BREAKING CHANGES:'),
7
+ (commit) => commit.startsWith('BREAKING-CHANGE:'),
8
+ (commit) => commit.startsWith('BREAKING-CHANGES:'),
9
+ ],
10
+ rules: {
11
+ 'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'],
12
+ 'type-empty': [RuleConfigSeverity.Error, 'never'],
13
+ 'type-enum': [
14
+ RuleConfigSeverity.Error,
15
+ 'always',
16
+ [
17
+ 'feat',
18
+ 'fix',
19
+ 'docs',
20
+ 'bump',
21
+ 'dependabot',
22
+ 'refactor',
23
+ 'style',
24
+ 'perf',
25
+ 'test',
26
+ 'revert',
27
+ 'chore',
28
+ ],
29
+ ],
30
+ },
31
+ };
32
+ export default config;
@@ -0,0 +1,29 @@
1
+ import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
2
+ import tsParser from '@typescript-eslint/parser';
3
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
4
+ const config = [
5
+ eslintPluginPrettierRecommended,
6
+ {
7
+ ignores: ['node_modules', 'dist', 'build'],
8
+ },
9
+ {
10
+ files: ['**/*.+(ts|tsx)'],
11
+ languageOptions: {
12
+ parser: tsParser,
13
+ },
14
+ plugins: {
15
+ '@typescript-eslint': typescriptEslintPlugin,
16
+ },
17
+ rules: {
18
+ '@typescript-eslint/no-explicit-any': 'warn', // Warns on use of 'any'
19
+ '@typescript-eslint/explicit-function-return-type': 'off', // Disables return type enforcement
20
+ '@typescript-eslint/no-unused-vars': [
21
+ 'warn',
22
+ { argsIgnorePattern: '^_' },
23
+ ],
24
+ 'no-console': 'warn', // Warns on console.log and similar calls
25
+ strict: ['error', 'never'],
26
+ },
27
+ },
28
+ ];
29
+ export default config;
@@ -0,0 +1,5 @@
1
+ const config = {
2
+ '*.+(js|ts|tsx)': ['eslint'],
3
+ '**/*.+(js|json|ts|tsx)': ['prettier --write'],
4
+ };
5
+ export default config;
@@ -0,0 +1,8 @@
1
+ const config = {
2
+ bracketSpacing: true,
3
+ proseWrap: 'always',
4
+ semi: false,
5
+ singleQuote: true,
6
+ trailingComma: 'all',
7
+ };
8
+ export default config;
@@ -0,0 +1,119 @@
1
+ import { readFileSync } from 'fs';
2
+ import path from 'path';
3
+ const branch = process.env.GITHUB_REF_NAME;
4
+ /**
5
+ * Attempt to determine the repository URL.
6
+ * By loading it from the consumer project's package.json.
7
+ * If the URL starts with 'git+', remove that prefix.
8
+ */
9
+ function getRepositoryUrl() {
10
+ try {
11
+ // process.cwd() will point to the consumer repo when semantic-release runs
12
+ const packageJsonPath = path.join(process.cwd(), 'package.json');
13
+ const packageJson = readFileSync(packageJsonPath, 'utf8');
14
+ const pkg = JSON.parse(packageJson);
15
+ if (pkg.repository) {
16
+ let url = typeof pkg.repository === 'object' ? pkg.repository.url : pkg.repository;
17
+ // Remove "git+" prefix if it exists
18
+ if (typeof url === 'string' && url.startsWith('git+')) {
19
+ url = url.slice(4);
20
+ }
21
+ return url;
22
+ }
23
+ }
24
+ catch (err) {
25
+ console.warn('Unable to load repository URL from package.json:', err);
26
+ }
27
+ return undefined;
28
+ }
29
+ const repositoryUrl = getRepositoryUrl();
30
+ /**
31
+ * @type {import('semantic-release').GlobalConfig}
32
+ */
33
+ const config = {
34
+ branches: [
35
+ 'main',
36
+ {
37
+ name: '(feature|fix|chore)/*',
38
+ // The prerelease name uses a dynamic expression to replace '/' with '-'
39
+ prerelease: 'crumbs-${name.replace(/\\//g, "-")}',
40
+ },
41
+ ],
42
+ repositoryUrl,
43
+ plugins: [
44
+ [
45
+ '@semantic-release/commit-analyzer',
46
+ {
47
+ preset: 'angular',
48
+ releaseRules: [
49
+ { type: 'feat', release: 'minor' },
50
+ { type: 'fix', release: 'patch' },
51
+ { type: 'docs', release: 'patch' },
52
+ { type: 'bump', release: 'patch' },
53
+ { type: 'dependabot', release: 'patch' },
54
+ { type: 'style', release: 'patch' },
55
+ { type: 'refactor', release: 'patch' },
56
+ { type: 'perf', release: 'patch' },
57
+ { type: 'test', release: 'patch' },
58
+ { type: 'revert', release: 'patch' },
59
+ { type: 'chore', release: 'patch' },
60
+ ],
61
+ parserOpts: {
62
+ noteKeywords: [
63
+ 'BREAKING CHANGE',
64
+ 'BREAKING-CHANGE',
65
+ 'BREAKING CHANGES',
66
+ 'BREAKING-CHANGES',
67
+ ],
68
+ },
69
+ },
70
+ ],
71
+ [
72
+ '@semantic-release/release-notes-generator',
73
+ {
74
+ preset: 'conventionalcommits',
75
+ presetConfig: {
76
+ types: [
77
+ { type: 'feat', section: 'Features' },
78
+ { type: 'fix', section: 'Bug Fixes' },
79
+ { type: 'docs', section: 'Documentation' },
80
+ { type: 'bump', hidden: true },
81
+ { type: 'dependabot', hidden: true },
82
+ { type: 'style', section: 'Styles' },
83
+ { type: 'refactor', section: 'Refactors' },
84
+ { type: 'perf', section: 'Performance Improvements' },
85
+ { type: 'test', section: 'Tests' },
86
+ { type: 'revert', hidden: true },
87
+ { type: 'chore', hidden: true },
88
+ { type: '*', section: 'Others' },
89
+ ],
90
+ },
91
+ },
92
+ ],
93
+ [
94
+ '@semantic-release/github',
95
+ {
96
+ assets: ['dist'],
97
+ },
98
+ ],
99
+ [
100
+ '@semantic-release/npm',
101
+ {
102
+ npmPublish: true,
103
+ pkgRoot: '.',
104
+ },
105
+ ],
106
+ ],
107
+ };
108
+ // Only add the changelog and git plugins on release (not for prereleases)
109
+ const isPrereleaseBranch = config.branches.some((b) => typeof b === 'object' && branch !== 'main' && b.prerelease);
110
+ if (!isPrereleaseBranch) {
111
+ config.plugins.push('@semantic-release/changelog', [
112
+ '@semantic-release/git',
113
+ {
114
+ assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
115
+ message: 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
116
+ },
117
+ ]);
118
+ }
119
+ export default config;
@@ -0,0 +1,2 @@
1
+ import config from './libs/configs/eslint.config.js'
2
+ export default config
@@ -0,0 +1,34 @@
1
+ import { RuleConfigSeverity, UserConfig } from '@commitlint/types'
2
+
3
+ export const config: UserConfig = {
4
+ parserPreset: 'conventional-changelog-conventionalcommits',
5
+ ignores: [
6
+ (commit: string) => commit.startsWith('BREAKING CHANGE:'),
7
+ (commit: string) => commit.startsWith('BREAKING CHANGES:'),
8
+ (commit: string) => commit.startsWith('BREAKING-CHANGE:'),
9
+ (commit: string) => commit.startsWith('BREAKING-CHANGES:'),
10
+ ],
11
+ rules: {
12
+ 'type-case': [RuleConfigSeverity.Error, 'always', 'lower-case'],
13
+ 'type-empty': [RuleConfigSeverity.Error, 'never'],
14
+ 'type-enum': [
15
+ RuleConfigSeverity.Error,
16
+ 'always',
17
+ [
18
+ 'feat',
19
+ 'fix',
20
+ 'docs',
21
+ 'bump',
22
+ 'dependabot',
23
+ 'refactor',
24
+ 'style',
25
+ 'perf',
26
+ 'test',
27
+ 'revert',
28
+ 'chore',
29
+ ],
30
+ ],
31
+ },
32
+ }
33
+
34
+ export default config
@@ -0,0 +1,30 @@
1
+ import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
2
+ import tsParser from '@typescript-eslint/parser'
3
+ import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'
4
+
5
+ const config = [
6
+ eslintPluginPrettierRecommended,
7
+ {
8
+ ignores: ['node_modules', 'dist', 'build'],
9
+ },
10
+ {
11
+ files: ['**/*.+(ts|tsx)'],
12
+ languageOptions: {
13
+ parser: tsParser,
14
+ },
15
+ plugins: {
16
+ '@typescript-eslint': typescriptEslintPlugin,
17
+ },
18
+ rules: {
19
+ '@typescript-eslint/no-explicit-any': 'warn', // Warns on use of 'any'
20
+ '@typescript-eslint/explicit-function-return-type': 'off', // Disables return type enforcement
21
+ '@typescript-eslint/no-unused-vars': [
22
+ 'warn',
23
+ { argsIgnorePattern: '^_' },
24
+ ],
25
+ 'no-console': 'warn', // Warns on console.log and similar calls
26
+ strict: ['error', 'never'],
27
+ },
28
+ },
29
+ ]
30
+ export default config
@@ -0,0 +1,6 @@
1
+ const config = {
2
+ '*.+(js|ts|tsx)': ['eslint'],
3
+ '**/*.+(js|json|ts|tsx)': ['prettier --write'],
4
+ }
5
+
6
+ export default config
@@ -0,0 +1,9 @@
1
+ const config = {
2
+ bracketSpacing: true,
3
+ proseWrap: 'always',
4
+ semi: false,
5
+ singleQuote: true,
6
+ trailingComma: 'all',
7
+ }
8
+
9
+ export default config
@@ -0,0 +1,131 @@
1
+ import { readFileSync } from 'fs'
2
+ import path from 'path'
3
+
4
+ const branch = process.env.GITHUB_REF_NAME
5
+
6
+ /**
7
+ * Attempt to determine the repository URL.
8
+ * By loading it from the consumer project's package.json.
9
+ * If the URL starts with 'git+', remove that prefix.
10
+ */
11
+ function getRepositoryUrl() {
12
+ try {
13
+ // process.cwd() will point to the consumer repo when semantic-release runs
14
+ const packageJsonPath = path.join(process.cwd(), 'package.json')
15
+ const packageJson = readFileSync(packageJsonPath, 'utf8')
16
+ const pkg = JSON.parse(packageJson)
17
+
18
+ if (pkg.repository) {
19
+ let url =
20
+ typeof pkg.repository === 'object' ? pkg.repository.url : pkg.repository
21
+
22
+ // Remove "git+" prefix if it exists
23
+ if (typeof url === 'string' && url.startsWith('git+')) {
24
+ url = url.slice(4)
25
+ }
26
+ return url
27
+ }
28
+ } catch (err) {
29
+ console.warn('Unable to load repository URL from package.json:', err)
30
+ }
31
+ return undefined
32
+ }
33
+
34
+ const repositoryUrl = getRepositoryUrl()
35
+
36
+ /**
37
+ * @type {import('semantic-release').GlobalConfig}
38
+ */
39
+ const config = {
40
+ branches: [
41
+ 'main',
42
+ {
43
+ name: '(feature|fix|chore)/*',
44
+ // The prerelease name uses a dynamic expression to replace '/' with '-'
45
+ prerelease: 'crumbs-${name.replace(/\\//g, "-")}',
46
+ },
47
+ ],
48
+ repositoryUrl,
49
+ plugins: [
50
+ [
51
+ '@semantic-release/commit-analyzer',
52
+ {
53
+ preset: 'angular',
54
+ releaseRules: [
55
+ { type: 'feat', release: 'minor' },
56
+ { type: 'fix', release: 'patch' },
57
+ { type: 'docs', release: 'patch' },
58
+ { type: 'bump', release: 'patch' },
59
+ { type: 'dependabot', release: 'patch' },
60
+ { type: 'style', release: 'patch' },
61
+ { type: 'refactor', release: 'patch' },
62
+ { type: 'perf', release: 'patch' },
63
+ { type: 'test', release: 'patch' },
64
+ { type: 'revert', release: 'patch' },
65
+ { type: 'chore', release: 'patch' },
66
+ ],
67
+ parserOpts: {
68
+ noteKeywords: [
69
+ 'BREAKING CHANGE',
70
+ 'BREAKING-CHANGE',
71
+ 'BREAKING CHANGES',
72
+ 'BREAKING-CHANGES',
73
+ ],
74
+ },
75
+ },
76
+ ],
77
+ [
78
+ '@semantic-release/release-notes-generator',
79
+ {
80
+ preset: 'conventionalcommits',
81
+ presetConfig: {
82
+ types: [
83
+ { type: 'feat', section: 'Features' },
84
+ { type: 'fix', section: 'Bug Fixes' },
85
+ { type: 'docs', section: 'Documentation' },
86
+ { type: 'bump', hidden: true },
87
+ { type: 'dependabot', hidden: true },
88
+ { type: 'style', section: 'Styles' },
89
+ { type: 'refactor', section: 'Refactors' },
90
+ { type: 'perf', section: 'Performance Improvements' },
91
+ { type: 'test', section: 'Tests' },
92
+ { type: 'revert', hidden: true },
93
+ { type: 'chore', hidden: true },
94
+ { type: '*', section: 'Others' },
95
+ ],
96
+ },
97
+ },
98
+ ],
99
+ [
100
+ '@semantic-release/github',
101
+ {
102
+ assets: ['dist'],
103
+ },
104
+ ],
105
+ [
106
+ '@semantic-release/npm',
107
+ {
108
+ npmPublish: true,
109
+ pkgRoot: '.',
110
+ },
111
+ ],
112
+ ],
113
+ }
114
+
115
+ // Only add the changelog and git plugins on release (not for prereleases)
116
+ const isPrereleaseBranch = config.branches.some(
117
+ (b) => typeof b === 'object' && branch !== 'main' && b.prerelease,
118
+ )
119
+
120
+ if (!isPrereleaseBranch) {
121
+ config.plugins.push('@semantic-release/changelog', [
122
+ '@semantic-release/git',
123
+ {
124
+ assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
125
+ message:
126
+ 'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
127
+ },
128
+ ])
129
+ }
130
+
131
+ export default config
@@ -0,0 +1,2 @@
1
+ import config from './libs/configs/lint-staged.config.js'
2
+ export default config
package/package.json CHANGED
@@ -1,28 +1,44 @@
1
1
  {
2
2
  "name": "@mrshmllw/campfire",
3
- "version": "0.0.0",
3
+ "version": "1.0.0-crumbs-feature-adding-some-default-configs.2",
4
4
  "description": "Collection of toasty utils and configs used by Marshmallow Technology",
5
5
  "main": "index.js",
6
6
  "type": "module",
7
7
  "scripts": {
8
8
  "clean": "rimraf ./dist",
9
- "test": "echo \"Error: no test specified\" && exit 1",
9
+ "test": "echo \"Error: There are no tests yet\"",
10
10
  "check-types": "tsc --noEmit",
11
11
  "build": "npm run clean && tsc --p tsconfig.build.json",
12
- "prepublishOnly": "npm run build"
12
+ "prepublishOnly": "npm run build",
13
+ "prepare": "husky",
14
+ "pre-commit-lint": "npm run check-types && lint-staged",
15
+ "commitlint": "commitlint --edit"
13
16
  },
14
17
  "dependencies": {
15
- "typescript": "^5.6.3",
16
- "micromatch": "^4.0.8"
18
+ "typescript": "^5.7.3"
17
19
  },
18
20
  "devDependencies": {
19
- "semantic-release": "^24.2.0",
21
+ "@commitlint/cli": "^19.7.1",
22
+ "@commitlint/types": "^19.5.0",
20
23
  "@semantic-release/changelog": "^6.0.3",
21
24
  "@semantic-release/git": "^10.0.1",
22
25
  "@semantic-release/github": "^11.0.1",
23
26
  "@semantic-release/npm": "^12.0.1",
27
+ "@typescript-eslint/eslint-plugin": "^8.23.0",
28
+ "@typescript-eslint/parser": "^8.23.0",
24
29
  "conventional-changelog-conventionalcommits": "^8.0.0",
25
- "rimraf": "^6.0.1"
30
+ "eslint": "^9.19.0",
31
+ "eslint-config-prettier": "^9.1.0",
32
+ "eslint-plugin-prettier": "^5.2.3",
33
+ "husky": "^9.1.7",
34
+ "lint-staged": "^15.4.3",
35
+ "prettier": "^3.4.2",
36
+ "rimraf": "^6.0.1",
37
+ "semantic-release": "^24.2.1"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/marshmallow-insurance/campfire.git"
26
42
  },
27
43
  "author": "",
28
44
  "license": "ISC"
@@ -0,0 +1,2 @@
1
+ import config from './libs/configs/prettier.config.js'
2
+ export default config
package/release.config.js CHANGED
@@ -1,116 +1,2 @@
1
- import micromatch from "micromatch";
2
-
3
- const branch = process.env.GITHUB_REF_NAME;
4
-
5
- /**
6
- * @type {import('semantic-release').GlobalConfig}
7
- */
8
- const config = {
9
- branches: [
10
- "main",
11
- {
12
- name: "(feature|fix|chore)/*",
13
- prerelease: 'sticks-${name.replace(/\\//g, "-")}',
14
- },
15
- ],
16
- tagFormat: "dev.${version}",
17
- repositoryUrl: "https://github.com/marshmallow-insurance/campfire.git",
18
- plugins: [
19
- [
20
- "@semantic-release/commit-analyzer",
21
- {
22
- preset: "angular",
23
- releaseRules: [
24
- { type: "feat", release: "minor" },
25
- { type: "fix", release: "patch" },
26
- { type: "docs", release: "patch" },
27
- { type: "bump", release: "patch" },
28
- { type: "dependabot", release: "patch" },
29
- { type: "style", release: "patch" },
30
- { type: "refactor", release: "patch" },
31
- { type: "perf", release: "patch" },
32
- { type: "test", release: "patch" },
33
- { type: "revert", release: "patch" },
34
- { type: "chore", release: "patch" },
35
- ],
36
- parserOpts: {
37
- noteKeywords: [
38
- "BREAKING CHANGE",
39
- "BREAKING-CHANGE",
40
- "BREAKING CHANGES",
41
- "BREAKING-CHANGES",
42
- ],
43
- },
44
- },
45
- ],
46
- [
47
- "@semantic-release/release-notes-generator",
48
- {
49
- preset: "conventionalcommits",
50
- presetConfig: {
51
- types: [
52
- { type: "feat", section: "Features" },
53
- { type: "fix", section: "Bug Fixes" },
54
- { type: "docs", section: "Documentation" },
55
- { type: "bump", hidden: true },
56
- { type: "dependabot", hidden: true },
57
- { type: "style", section: "Styles" },
58
- { type: "refactor", section: "Refactors" },
59
- { type: "perf", section: "Performance Improvements" },
60
- { type: "test", section: "Tests" },
61
- { type: "revert", hidden: true },
62
- { type: "chore", hidden: true },
63
- { type: "*", section: "Others" },
64
- ],
65
- },
66
- },
67
- ],
68
- [
69
- "@semantic-release/github",
70
- {
71
- assets: ["dist"],
72
- },
73
- ],
74
- [
75
- "@semantic-release/npm",
76
- {
77
- npmPublish: true,
78
- pkgRoot: ".",
79
- },
80
- ],
81
- ],
82
- };
83
-
84
- const isAcceptedBranch = micromatch.isMatch(
85
- branch,
86
- config.branches.map((b) => (typeof b === "object" ? b.name : b))
87
- );
88
-
89
- if (!isAcceptedBranch) {
90
- console.log(
91
- `Branch ${branch} is not accepted for release. Skipping release.`
92
- );
93
- console.log(
94
- `Accepted branches: ${config.branches.join(
95
- ", "
96
- )}. [Micromatch](https://github.com/micromatch/micromatch?tab=readme-ov-file#matching-features) is used for matching.`
97
- );
98
- process.exit(0);
99
- }
100
-
101
- const isPrereleaseBranch = config.branches.some(
102
- (b) => typeof b === "object" && isAcceptedBranch && b.prerelease
103
- );
104
-
105
- if (!isPrereleaseBranch) {
106
- config.plugins.push("@semantic-release/changelog", [
107
- "@semantic-release/git",
108
- {
109
- assets: ["package.json", "package-lock.json", "CHANGELOG.md"],
110
- message:
111
- "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
112
- },
113
- ]);
114
- }
115
-
116
- export default config;
1
+ import config from './libs/configs/release.config.js'
2
+ export default config
@@ -1,6 +1,13 @@
1
1
  {
2
2
  "extends": "./tsconfig.json",
3
3
  "compilerOptions": {
4
- "rootDir": "libs",
4
+ "rootDir": "libs"
5
5
  },
6
+ "exclude": [
7
+ "release.config.js",
8
+ "commitlint.config.ts",
9
+ "eslint.config.js",
10
+ "prettier.config.js",
11
+ "lint-staged.config.js"
12
+ ]
6
13
  }
package/tsconfig.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "compilerOptions": {
3
3
  "outDir": "./dist",
4
- "target": "ESNext",
5
- "module": "ESNext",
4
+ "module": "esnext",
5
+ "target": "esnext",
6
+ "moduleResolution": "Bundler",
7
+ "allowJs": true,
6
8
  "esModuleInterop": true,
7
9
  "forceConsistentCasingInFileNames": true,
8
10
  "strict": true,
9
11
  "skipLibCheck": true,
10
- "baseUrl": "libs",
12
+ "baseUrl": "libs"
11
13
  },
12
- "include": [
13
- "libs/**/*",
14
- "release.config.js"
15
- ],
14
+ "include": ["libs/**/*"],
16
15
  "exclude": ["node_modules", "dist"]
17
16
  }
@@ -1 +0,0 @@
1
- "use strict";
File without changes