@devpow112/semantic-release-config 1.0.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Devon Powell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,86 @@
1
+ # Semantic Release Configuration
2
+
3
+ [![License][License Badge]](LICENSE)
4
+ [![Version][Version Badge]][Version Package]
5
+ [![CI][CI Badge]][CI Workflow]
6
+ [![Release][Release Badge]][Release Workflow]
7
+ [![Vulnerabilities][Vulnerabilities Badge]][Vulnerabilities Report]
8
+ [![Node Version][Node Version Badge]](package.json#L35)
9
+
10
+ Shareable Semantic Release configuration.
11
+
12
+ ## Installation
13
+
14
+ ```sh
15
+ npm i -D @devpow112/semantic-release-config
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ The shareable config can be configured in the [Semantic Release Configuration]
21
+ file.
22
+
23
+ ```json
24
+ {
25
+ "extends": "@devpow112/semantic-release-config"
26
+ }
27
+ ```
28
+
29
+ ## Development
30
+
31
+ Development can be done on any machine that can install **Node.js**. Only the
32
+ latest LTS version is tested against.
33
+
34
+ ### Install Dependencies
35
+
36
+ Install dependencies via `npm`.
37
+
38
+ ```sh
39
+ npm i
40
+ ```
41
+
42
+ ### Linting
43
+
44
+ Execute linters via `npm`.
45
+
46
+ ```sh
47
+ # git, javascript and markdown
48
+ npm run lint
49
+
50
+ # git only
51
+ npm run lint:git
52
+
53
+ # javascript only
54
+ npm run lint:js
55
+
56
+ # markdown only
57
+ npm run lint:md
58
+ ```
59
+
60
+ ### Formatting
61
+
62
+ Execute formatters via `npm`.
63
+
64
+ ```sh
65
+ # javascript and markdown
66
+ npm run format
67
+
68
+ # javascript only
69
+ npm run format:js
70
+
71
+ # markdown only
72
+ npm run format:md
73
+ ```
74
+
75
+ <!-- links -->
76
+ [License Badge]: https://img.shields.io/github/license/devpow112/semantic-release-config?label=License
77
+ [Version Badge]: https://img.shields.io/npm/v/@devpow112/semantic-release-config?label=Version
78
+ [Version Package]: https://www.npmjs.com/@devpow112/semantic-release-config
79
+ [Node Version Badge]: https://img.shields.io/node/v/@devpow112/semantic-release-config
80
+ [CI Badge]: https://github.com/devpow112/semantic-release-config/actions/workflows/ci.yml/badge.svg?branch=main
81
+ [CI Workflow]: https://github.com/devpow112/semantic-release-config/actions/workflows/ci.yml?query=branch%3Amain
82
+ [Release Badge]: https://github.com/devpow112/semantic-release-config/actions/workflows/release.yml/badge.svg?branch=main
83
+ [Release Workflow]: https://github.com/devpow112/semantic-release-config/actions/workflows/release.yml?query=branch%3Amain
84
+ [Vulnerabilities Badge]: https://img.shields.io/snyk/vulnerabilities/github/devpow112/semantic-release-config?label=Vulnerabilities
85
+ [Vulnerabilities Report]: https://snyk.io/test/github/devpow112/semantic-release-config
86
+ [Semantic Release Configuration]: https://semantic-release.gitbook.io/semantic-release/usage/shareable-configurations
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@devpow112/semantic-release-config",
3
+ "version": "1.0.0",
4
+ "description": "Shareable semantic release configuration",
5
+ "main": "src/config.js",
6
+ "publishConfig": {
7
+ "access": "public"
8
+ },
9
+ "scripts": {
10
+ "lint": "run-s -s lint:git lint:js lint:md",
11
+ "lint:js": "eslint .",
12
+ "lint:md": "markdownlint .",
13
+ "lint:git": "commitlint --from origin/main --to HEAD",
14
+ "format": "run-s -s format:js format:md",
15
+ "format:js": "npm run -s lint:js -- --fix",
16
+ "format:md": "npm run -s lint:md -- --fix"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "https://github.com/devpow112/semantic-release-config.git"
21
+ },
22
+ "keywords": [
23
+ "semantic-release-config"
24
+ ],
25
+ "author": "Devon Powell <devon.f.powell@gmail.com>",
26
+ "license": "MIT",
27
+ "bugs": {
28
+ "url": "https://github.com/devpow112/semantic-release-config/issues"
29
+ },
30
+ "homepage": "https://github.com/devpow112/semantic-release-config#readme",
31
+ "files": [
32
+ "src/**/*.js"
33
+ ],
34
+ "engines": {
35
+ "node": ">=12.22.7",
36
+ "npm": ">=6.14.15"
37
+ },
38
+ "peerDependencies": {
39
+ "@semantic-release/git": "^10.0.1",
40
+ "conventional-changelog-conventionalcommits": "^4.6.3",
41
+ "semantic-release": "^19.0.2"
42
+ },
43
+ "devDependencies": {
44
+ "@commitlint/cli": "^16.1.0",
45
+ "@commitlint/config-conventional": "^16.0.0",
46
+ "@devpow112/eslint-config": "^1.1.0",
47
+ "@semantic-release/git": "^10.0.1",
48
+ "conventional-changelog-conventionalcommits": "^4.6.3",
49
+ "eslint": "^8.8.0",
50
+ "markdownlint-cli": "^0.31.1",
51
+ "npm-run-all": "^4.1.5",
52
+ "semantic-release": "^19.0.2"
53
+ }
54
+ }
package/src/config.js ADDED
@@ -0,0 +1,51 @@
1
+ module.exports = {
2
+ branches: ['main'],
3
+ plugins: [
4
+ [
5
+ '@semantic-release/commit-analyzer',
6
+ {
7
+ preset: 'conventionalcommits',
8
+ releaseRules: [
9
+ { type: 'chore', scope: 'deps', release: 'patch' },
10
+ { type: 'refactor', release: 'patch' }
11
+ ]
12
+ }
13
+ ],
14
+ [
15
+ '@semantic-release/github',
16
+ {
17
+ labels: ['auto'],
18
+ releasedLabels: ['released'],
19
+ assignees: ['devpow112'],
20
+ addReleases: 'top'
21
+ }
22
+ ],
23
+ '@semantic-release/npm',
24
+ [
25
+ '@semantic-release/release-notes-generator',
26
+ {
27
+ preset: 'conventionalcommits',
28
+ presetConfig: {
29
+ types: [
30
+ { type: 'feat', section: 'Features' },
31
+ { type: 'fix', section: 'Bug Fixes' },
32
+ { type: 'perf', section: 'Performance Improvements' },
33
+ { type: 'revert', section: 'Reverts' },
34
+ { type: 'docs', section: 'Documentation' },
35
+ { type: 'chore', section: 'Miscellaneous Chores' },
36
+ { type: 'refactor', section: 'Code Refactoring' },
37
+ { type: 'test', section: 'Tests' },
38
+ { type: 'build', section: 'Build System' }
39
+ ]
40
+ }
41
+ }
42
+ ],
43
+ [
44
+ '@semantic-release/git',
45
+ {
46
+ assets: ['package.json', 'package-lock.json'],
47
+ message: 'chore(release): ${nextRelease.version}'
48
+ }
49
+ ]
50
+ ]
51
+ };