@itcase/config 1.0.39 → 1.0.41
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/commitlint/index.js +5 -3
- package/package.json +11 -11
- package/postcss/index.js +10 -1
- package/postcss/require.cjs +0 -4
- package/postcss/require.js +0 -4
- package/postcss/requirePackage.cjs +0 -4
- package/semantic-release/index.js +57 -17
- package/semantic-release/indexLerna.js +10 -27
package/commitlint/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { releaseRules } from '../semantic-release/index.js'
|
|
2
|
+
|
|
3
|
+
const commitTypes = new Set(releaseRules.map((releaseRule) => releaseRule.type))
|
|
2
4
|
|
|
3
5
|
export default {
|
|
4
6
|
extends: ['@commitlint/config-conventional'],
|
|
@@ -8,7 +10,7 @@ export default {
|
|
|
8
10
|
rules: {
|
|
9
11
|
'header-match-type-pattern': (parsed) => {
|
|
10
12
|
const { type } = parsed
|
|
11
|
-
if (!commitTypes.
|
|
13
|
+
if (!commitTypes.has(type)) {
|
|
12
14
|
const errorMessage =
|
|
13
15
|
`type must be in ['⭐️ major','🐞 minor','✅ patch']\n` +
|
|
14
16
|
` 'fix: my commit message'`
|
|
@@ -23,6 +25,6 @@ export default {
|
|
|
23
25
|
'header-match-type-pattern': [2, 'always'],
|
|
24
26
|
'subject-empty': [0, 'always'],
|
|
25
27
|
'type-empty': [2, 'never'],
|
|
26
|
-
'type-enum': [2, 'always', commitTypes],
|
|
28
|
+
'type-enum': [2, 'always', Array.from(commitTypes)],
|
|
27
29
|
},
|
|
28
30
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/config",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.41",
|
|
4
4
|
"author": "ITCase",
|
|
5
5
|
"description": "Config",
|
|
6
6
|
"engines": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"@lehoczky/postcss-fluid": "^1.0.3",
|
|
34
34
|
"@svgr/webpack": "^8.1.0",
|
|
35
35
|
"autoprefixer": "^10.4.21",
|
|
36
|
-
"cssnano": "^7.0.
|
|
37
|
-
"cssnano-preset-default": "^7.0.
|
|
36
|
+
"cssnano": "^7.0.7",
|
|
37
|
+
"cssnano-preset-default": "^7.0.7",
|
|
38
38
|
"postcss-aspect-ratio-polyfill": "^2.0.0",
|
|
39
39
|
"postcss-clamp": "^4.1.0",
|
|
40
40
|
"postcss-cli": "^11.0.1",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"postcss-combine-duplicated-selectors": "^10.0.3",
|
|
43
43
|
"postcss-convert-unit": "^0.1.3",
|
|
44
44
|
"postcss-dark-theme-class": "^1.3.0",
|
|
45
|
-
"postcss-discard-duplicates": "^7.0.
|
|
45
|
+
"postcss-discard-duplicates": "^7.0.2",
|
|
46
46
|
"postcss-each": "^1.1.0",
|
|
47
47
|
"postcss-easings": "^4.0.0",
|
|
48
48
|
"postcss-extend-rule": "^4.0.0",
|
|
@@ -58,26 +58,26 @@
|
|
|
58
58
|
"postcss-nested-ancestors": "^3.0.0",
|
|
59
59
|
"postcss-normalize": "^13.0.1",
|
|
60
60
|
"postcss-prepend-imports": "^1.0.1",
|
|
61
|
-
"postcss-preset-env": "^10.1.
|
|
61
|
+
"postcss-preset-env": "^10.1.6",
|
|
62
62
|
"postcss-pxtorem": "^6.1.0",
|
|
63
63
|
"postcss-sort-media-queries": "^5.2.0",
|
|
64
64
|
"postcss-url": "^10.1.3",
|
|
65
65
|
"postcss-urlrewrite": "^0.3.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@commitlint/cli": "^19.8.
|
|
69
|
-
"@commitlint/config-conventional": "^19.8.
|
|
70
|
-
"@itcase/lint": "^1.1.
|
|
68
|
+
"@commitlint/cli": "^19.8.1",
|
|
69
|
+
"@commitlint/config-conventional": "^19.8.1",
|
|
70
|
+
"@itcase/lint": "^1.1.9",
|
|
71
71
|
"@semantic-release/changelog": "^6.0.3",
|
|
72
72
|
"@semantic-release/git": "^10.0.1",
|
|
73
73
|
"@semantic-release/release-notes-generator": "14.0.3",
|
|
74
74
|
"conventional-changelog-conventionalcommits": "^8.0.0",
|
|
75
|
-
"eslint": "^9.
|
|
75
|
+
"eslint": "^9.26.0",
|
|
76
76
|
"husky": "^9.1.7",
|
|
77
|
-
"lint-staged": "^
|
|
77
|
+
"lint-staged": "^16.0.0",
|
|
78
78
|
"prettier": "^3.5.3",
|
|
79
79
|
"semantic-release": "^24.2.3",
|
|
80
|
-
"stylelint": "^16.
|
|
80
|
+
"stylelint": "^16.19.1",
|
|
81
81
|
"typescript": "^5.8.3"
|
|
82
82
|
}
|
|
83
83
|
}
|
package/postcss/index.js
CHANGED
|
@@ -59,7 +59,16 @@ export default {
|
|
|
59
59
|
'postcss-urlrewrite',
|
|
60
60
|
{
|
|
61
61
|
properties: ['src'],
|
|
62
|
-
rules: [
|
|
62
|
+
rules: [
|
|
63
|
+
{
|
|
64
|
+
from: '@itcase/tokens-am/',
|
|
65
|
+
to: `${process.cwd()}/node_modules/@itcase/tokens-am/`,
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
from: '@itcase/tokens-baikal/',
|
|
69
|
+
to: `${process.cwd()}/node_modules/@itcase/tokens-baikal/`,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
63
72
|
},
|
|
64
73
|
],
|
|
65
74
|
[
|
package/postcss/require.cjs
CHANGED
|
@@ -35,10 +35,6 @@ module.exports = {
|
|
|
35
35
|
stage: 2,
|
|
36
36
|
}),
|
|
37
37
|
require('postcss-mixins'),
|
|
38
|
-
// require('postcss-urlrewrite')({
|
|
39
|
-
// properties: ['src'],
|
|
40
|
-
// rules: [{ from: '@itcase', to: './../../node_modules/@itcase/' }],
|
|
41
|
-
// }),
|
|
42
38
|
require('postcss-nested-ancestors'),
|
|
43
39
|
require('postcss-nested'),
|
|
44
40
|
require('postcss-hexrgba'),
|
package/postcss/require.js
CHANGED
|
@@ -36,10 +36,6 @@ module.exports = {
|
|
|
36
36
|
stage: 2,
|
|
37
37
|
}),
|
|
38
38
|
require('postcss-mixins'),
|
|
39
|
-
// require('postcss-urlrewrite')({
|
|
40
|
-
// properties: ['src'],
|
|
41
|
-
// rules: [{ from: '@itcase', to: './../../node_modules/@itcase/' }],
|
|
42
|
-
// }),
|
|
43
39
|
require('postcss-nested-ancestors'),
|
|
44
40
|
require('postcss-nested'),
|
|
45
41
|
require('postcss-hexrgba'),
|
|
@@ -43,10 +43,6 @@ module.exports = {
|
|
|
43
43
|
stage: 2,
|
|
44
44
|
}),
|
|
45
45
|
require('postcss-mixins'),
|
|
46
|
-
// require('postcss-urlrewrite')({
|
|
47
|
-
// properties: ['src'],
|
|
48
|
-
// rules: [{ from: '@itcase', to: './../../node_modules/@itcase/' }],
|
|
49
|
-
// }),
|
|
50
46
|
require('postcss-nested-ancestors'),
|
|
51
47
|
require('postcss-nested'),
|
|
52
48
|
require('postcss-hexrgba'),
|
|
@@ -1,30 +1,65 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable perfectionist/sort-objects */
|
|
2
|
+
|
|
3
|
+
// Keywords for important notes. This value is case insensitive.
|
|
4
|
+
const noteKeywords = ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
|
|
5
|
+
|
|
6
|
+
const releaseRules = [
|
|
7
|
+
// Hidden general semver releases
|
|
8
|
+
{ type: 'major', hidden: true, release: 'major' },
|
|
9
|
+
{ type: 'minor', hidden: true, release: 'minor' },
|
|
10
|
+
{ type: 'patch', hidden: true, release: 'patch' },
|
|
11
|
+
// Main changes
|
|
12
|
+
{ type: 'fix', release: 'patch' },
|
|
13
|
+
{ type: 'feat', release: 'patch' },
|
|
14
|
+
{
|
|
15
|
+
type: 'feat',
|
|
16
|
+
scope: 'minor',
|
|
17
|
+
release: 'minor',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
type: 'feat',
|
|
21
|
+
scope: 'major',
|
|
22
|
+
release: 'major',
|
|
23
|
+
},
|
|
24
|
+
{ type: 'styles', release: 'patch' },
|
|
25
|
+
// Special changes
|
|
26
|
+
{ type: 'chore', hidden: true, release: false },
|
|
27
|
+
{ type: 'docs', hidden: true, release: false },
|
|
28
|
+
{ type: 'docs', scope: 'readme', release: 'patch' },
|
|
29
|
+
{ type: 'refactor', release: 'patch' },
|
|
30
|
+
{ type: 'perf', release: 'patch' },
|
|
31
|
+
{ type: 'tests', release: false },
|
|
32
|
+
]
|
|
33
|
+
|
|
34
|
+
const semanticReleaseConfig = {
|
|
2
35
|
branches: ['master'],
|
|
36
|
+
preset: 'conventionalcommits',
|
|
3
37
|
plugins: [
|
|
4
38
|
[
|
|
5
39
|
'@semantic-release/commit-analyzer',
|
|
6
40
|
{
|
|
7
|
-
parserOpts: {
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
preset: 'conventionalcommits',
|
|
11
|
-
releaseRules: [
|
|
12
|
-
{ release: 'major', type: 'major' },
|
|
13
|
-
{ release: 'minor', type: 'minor' },
|
|
14
|
-
{ release: 'patch', type: 'patch' },
|
|
15
|
-
],
|
|
41
|
+
parserOpts: { noteKeywords: noteKeywords },
|
|
42
|
+
releaseRules: releaseRules,
|
|
16
43
|
},
|
|
17
44
|
],
|
|
18
45
|
[
|
|
19
46
|
'@semantic-release/release-notes-generator',
|
|
20
47
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
48
|
+
presetConfig: {
|
|
49
|
+
types: [
|
|
50
|
+
{ type: 'fix', section: 'Fixes' },
|
|
51
|
+
{ type: 'feat', section: 'Features' },
|
|
52
|
+
{ type: 'styles', section: 'CSS and styles' },
|
|
53
|
+
{ type: 'refactor', section: 'Refactoring' },
|
|
54
|
+
{
|
|
55
|
+
type: 'perf',
|
|
56
|
+
section: 'Performance Improvements',
|
|
57
|
+
},
|
|
58
|
+
{ type: 'tests', section: 'Tests' },
|
|
59
|
+
],
|
|
27
60
|
},
|
|
61
|
+
parserOpts: { noteKeywords: noteKeywords },
|
|
62
|
+
writerOpts: { commitsSort: ['subject', 'scope'] },
|
|
28
63
|
},
|
|
29
64
|
],
|
|
30
65
|
[
|
|
@@ -37,9 +72,14 @@ export default {
|
|
|
37
72
|
[
|
|
38
73
|
'@semantic-release/git',
|
|
39
74
|
{
|
|
40
|
-
|
|
75
|
+
message:
|
|
76
|
+
'release: publishing new version ${nextRelease.version} [skip ci]',
|
|
77
|
+
assets: ['package.json', 'package-lock.json', 'CHANGELOG.md'],
|
|
41
78
|
},
|
|
42
79
|
],
|
|
43
80
|
'@semantic-release/github',
|
|
44
81
|
],
|
|
45
82
|
}
|
|
83
|
+
|
|
84
|
+
export { releaseRules, noteKeywords }
|
|
85
|
+
export default semanticReleaseConfig
|
|
@@ -1,40 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import semanticReleaseConfig, { noteKeywords, releaseRules } from './index'
|
|
2
|
+
|
|
3
|
+
const lernaSemanticReleaseConfig = {
|
|
4
|
+
...semanticReleaseConfig,
|
|
3
5
|
plugins: [
|
|
4
6
|
[
|
|
5
7
|
'@semantic-release/commit-analyzer',
|
|
6
8
|
{
|
|
7
|
-
parserOpts: {
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
preset: 'conventionalcommits',
|
|
11
|
-
releaseRules: [
|
|
12
|
-
{
|
|
13
|
-
type: 'major',
|
|
14
|
-
release: 'major',
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
type: 'minor',
|
|
18
|
-
release: 'minor',
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
type: 'patch',
|
|
22
|
-
release: 'patch',
|
|
23
|
-
},
|
|
24
|
-
],
|
|
9
|
+
parserOpts: { noteKeywords: noteKeywords },
|
|
10
|
+
releaseRules: releaseRules,
|
|
25
11
|
},
|
|
26
12
|
],
|
|
27
13
|
'semantic-release-lerna',
|
|
28
14
|
[
|
|
29
15
|
'@semantic-release/release-notes-generator',
|
|
30
16
|
{
|
|
31
|
-
parserOpts: {
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
preset: 'conventionalcommits',
|
|
35
|
-
writerOpts: {
|
|
36
|
-
commitsSort: ['subject', 'scope'],
|
|
37
|
-
},
|
|
17
|
+
parserOpts: { noteKeywords: noteKeywords },
|
|
18
|
+
writerOpts: { commitsSort: ['subject', 'scope'] },
|
|
38
19
|
},
|
|
39
20
|
],
|
|
40
21
|
[
|
|
@@ -59,3 +40,5 @@ export default {
|
|
|
59
40
|
'@semantic-release/github',
|
|
60
41
|
],
|
|
61
42
|
}
|
|
43
|
+
|
|
44
|
+
export default lernaSemanticReleaseConfig
|