@itcase/config 1.7.32 → 1.7.33

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
@@ -29,9 +29,16 @@ npm install --save-dev @itcase/config
29
29
  - `lintStagedMonorepo` — то же, но typecheck через `npm run typecheck` по workspaces
30
30
  - обе конфигурации блокируют коммит, если в `package.json` есть локальные зависимости `file:` / `link:`
31
31
 
32
- - **PostCSS** — обработка CSS
33
- - `postcss/index.js` — стандартная конфигурация
34
- - `postcss/nextVite.js` — для Next.js/Vite проектов
32
+ - **PostCSS** — обработка CSS, импорт из `@itcase/config/postcss/index.js`
33
+ - `postcssConfig` — стандартная конфигурация
34
+ - `postcssNextVite` — Next.js/Vite
35
+ - `postcssFigmaWidget` — Figma Widget
36
+ - `postcssGulp` — Gulp
37
+ - `postcssHugo` — Hugo; файл `postcss/hugo.cjs` по-прежнему отдаёт тот же объект через `require`
38
+ - `postcssRequire` — `postcss/require.cjs`
39
+ - `postcssRequireJs` — `postcss/requireJs.cjs` (раньше `require.js`: в пакете `"type": "module"`, `.js` с `require()` не грузится)
40
+ - `postcssRequirePackage` — `postcss/requirePackage.cjs`
41
+ - эти три файла по-прежнему CJS: `require` отдаёт `{ plugins }`
35
42
 
36
43
  - **Semantic Release** — автоматическое управление версиями
37
44
  - `semantic-release/config.js` — конфигурация
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/config",
3
- "version": "1.7.32",
3
+ "version": "1.7.33",
4
4
  "author": "ITCase",
5
5
  "description": "ITCase Config",
6
6
  "engines": {
@@ -44,11 +44,11 @@
44
44
  "@commitlint/config-conventional": "^21.2.4",
45
45
  "@commitlint/cz-commitlint": "^21.2.4",
46
46
  "@lehoczky/postcss-fluid": "^1.0.3",
47
- "@lerna-lite/cli": "^5.6.4",
48
- "@lerna-lite/exec": "^5.6.4",
49
- "@lerna-lite/list": "^5.6.4",
50
- "@lerna-lite/run": "^5.6.4",
51
- "@lerna-lite/watch": "^5.6.4",
47
+ "@lerna-lite/cli": "^5.7.0",
48
+ "@lerna-lite/exec": "^5.7.0",
49
+ "@lerna-lite/list": "^5.7.0",
50
+ "@lerna-lite/run": "^5.7.0",
51
+ "@lerna-lite/watch": "^5.7.0",
52
52
  "@rollup/plugin-alias": "^6.0.1",
53
53
  "@rollup/plugin-babel": "^7.1.0",
54
54
  "@rollup/plugin-commonjs": "^29.0.3",
@@ -64,18 +64,17 @@
64
64
  "@svgr/plugin-jsx": "^8.1.0",
65
65
  "@svgr/plugin-svgo": "^8.1.0",
66
66
  "@svgr/webpack": "^8.1.0",
67
- "autoprefixer": "^10.6.1",
67
+ "autoprefixer": "^10.6.2",
68
68
  "chokidar-cli": "^3.0.0",
69
69
  "commitizen": "^4.3.2",
70
70
  "conventional-changelog-conventionalcommits": "9.3.1",
71
71
  "conventional-changelog-writer": "9.3.0",
72
72
  "cssnano": "^9.9.0",
73
73
  "cssnano-preset-default": "^9.8.0",
74
- "inquirer": "^14.2.4",
74
+ "inquirer": "^14.2.5",
75
75
  "log-update": "^8.0.0",
76
- "postcss": "^8.5.31",
76
+ "postcss": "^8.5.32",
77
77
  "postcss-aspect-ratio-polyfill": "^2.0.0",
78
- "postcss-clamp": "^4.1.0",
79
78
  "postcss-cli": "^12.0.0",
80
79
  "postcss-color-hsla-fallback": "^1.0.0",
81
80
  "postcss-combine-duplicated-selectors": "^11.0.0",
@@ -97,32 +96,29 @@
97
96
  "postcss-nested-ancestors": "^3.0.0",
98
97
  "postcss-normalize": "^13.0.1",
99
98
  "postcss-prepend-imports": "^1.0.1",
100
- "postcss-preset-env": "^11.6.1",
99
+ "postcss-preset-env": "^11.6.2",
101
100
  "postcss-pxtorem": "^6.1.0",
102
101
  "postcss-sort-media-queries": "^6.7.1",
103
- "postcss-unit": "^0.0.3",
104
- "postcss-unit-processor": "^1.4.3",
105
102
  "postcss-unitlist": "^1.0.4",
106
103
  "postcss-unroot": "^1.0.2",
107
104
  "postcss-url": "^10.1.4",
108
- "postcss-urlrewrite": "^0.3.0",
109
105
  "rollup-plugin-copy": "^3.5.0",
110
106
  "rollup-plugin-dts": "^6.5.1",
111
107
  "rollup-plugin-peer-deps-external": "^2.2.4",
112
108
  "rollup-preserve-directives": "^1.1.3",
113
109
  "semantic-release": "^25.0.9",
114
- "semantic-release-lerna": "^3.7.0"
110
+ "semantic-release-lerna": "^3.7.1"
115
111
  },
116
112
  "devDependencies": {
117
113
  "@itcase/agent-skills": "^1.0.13",
118
- "@itcase/lint": "^1.1.130",
114
+ "@itcase/lint": "^1.1.131",
119
115
  "eslint": "9.39.2",
120
116
  "husky": "^9.1.7",
121
- "inquirer": "^14.2.4",
117
+ "inquirer": "^14.2.5",
122
118
  "lint-staged": "^17.6.0",
123
119
  "prettier": "^3.9.10",
124
- "storybook": "^10.6.4",
125
- "stylelint": "^17.16.0",
120
+ "storybook": "^10.6.6",
121
+ "stylelint": "^18.0.0",
126
122
  "typescript": "^6.0.3"
127
123
  }
128
124
  }
package/postcss/index.js CHANGED
@@ -1,98 +1,19 @@
1
- const cssnano = [
2
- 'cssnano',
3
- {
4
- preset: 'cssnano-preset-default',
5
- },
6
- ]
1
+ import postcssHugo from './hugo.cjs'
2
+ import { postcssConfig } from './postcssConfig.js'
3
+ import { postcssFigmaWidget } from './postcssFigmaWidget.js'
4
+ import { postcssGulp } from './postcssGulp.js'
5
+ import { postcssNextVite } from './postcssNextVite.js'
6
+ import postcssRequire from './require.cjs'
7
+ import postcssRequireJs from './requireJs.cjs'
8
+ import postcssRequirePackage from './requirePackage.cjs'
7
9
 
8
- export default {
9
- plugins: [
10
- 'postcss-normalize',
11
- [
12
- 'postcss-prepend-imports',
13
- {
14
- path: 'src/styles/',
15
- files: ['tokens.css', 'import.css'],
16
- },
17
- ],
18
- 'postcss-import-ext-glob',
19
- [
20
- 'postcss-import',
21
- {
22
- addModulesDirectories: ['node_modules'],
23
- },
24
- ],
25
- 'postcss-each',
26
- [
27
- 'postcss-convert-unit',
28
- {
29
- convertConfig: [
30
- {
31
- declConvertRules: [
32
- {
33
- value: (value) => value * 8,
34
- },
35
- ],
36
- declMatcher: {
37
- sourceUnit: 'm',
38
- targetUnit: 'px',
39
- },
40
- },
41
- ],
42
- },
43
- ],
44
- 'postcss-flexbugs-fixes',
45
- [
46
- 'postcss-preset-env',
47
- {
48
- features: {
49
- 'custom-properties': {
50
- preserve: false,
51
- },
52
- 'nesting-rules': false,
53
- },
54
- stage: 2,
55
- },
56
- ],
57
- 'postcss-mixins',
58
- [
59
- 'postcss-url',
60
- {
61
- maxSize: 256,
62
- url: 'inline',
63
- filter: /\.(svg|png)$/,
64
- },
65
- ],
66
- 'postcss-nested-ancestors',
67
- 'postcss-nested',
68
- 'postcss-hexrgba',
69
- 'postcss-easings',
70
- [
71
- 'postcss-dark-theme-class',
72
- {
73
- darkSelector: '.dark-theme',
74
- lightSelector: '.light-theme',
75
- },
76
- ],
77
- 'postcss-combine-duplicated-selectors',
78
- 'postcss-discard-duplicates',
79
- [
80
- 'postcss-pxtorem',
81
- {
82
- minPixelValue: 0,
83
- propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
84
- rootValue: 16,
85
- },
86
- ],
87
- 'postcss-merge-at-rules',
88
- [
89
- 'postcss-sort-media-queries',
90
- {
91
- sort: 'mobile-first',
92
- },
93
- ],
94
- 'postcss-extend-rule',
95
- '@lehoczky/postcss-fluid',
96
- ...(process.env.NODE_ENV === 'development' ? [cssnano] : []),
97
- ],
10
+ export {
11
+ postcssConfig,
12
+ postcssFigmaWidget,
13
+ postcssGulp,
14
+ postcssHugo,
15
+ postcssNextVite,
16
+ postcssRequire,
17
+ postcssRequireJs,
18
+ postcssRequirePackage,
98
19
  }
@@ -0,0 +1,100 @@
1
+ const cssnano = [
2
+ 'cssnano',
3
+ {
4
+ preset: 'cssnano-preset-default',
5
+ },
6
+ ]
7
+
8
+ const postcssConfig = {
9
+ plugins: [
10
+ 'postcss-normalize',
11
+ [
12
+ 'postcss-prepend-imports',
13
+ {
14
+ path: 'src/styles/',
15
+ files: ['tokens.css', 'import.css'],
16
+ },
17
+ ],
18
+ 'postcss-import-ext-glob',
19
+ [
20
+ 'postcss-import',
21
+ {
22
+ addModulesDirectories: ['node_modules'],
23
+ },
24
+ ],
25
+ 'postcss-each',
26
+ [
27
+ 'postcss-convert-unit',
28
+ {
29
+ convertConfig: [
30
+ {
31
+ declConvertRules: [
32
+ {
33
+ value: (value) => value * 8,
34
+ },
35
+ ],
36
+ declMatcher: {
37
+ sourceUnit: 'm',
38
+ targetUnit: 'px',
39
+ },
40
+ },
41
+ ],
42
+ },
43
+ ],
44
+ 'postcss-flexbugs-fixes',
45
+ [
46
+ 'postcss-preset-env',
47
+ {
48
+ features: {
49
+ 'custom-properties': {
50
+ preserve: false,
51
+ },
52
+ 'nesting-rules': false,
53
+ },
54
+ stage: 2,
55
+ },
56
+ ],
57
+ 'postcss-mixins',
58
+ [
59
+ 'postcss-url',
60
+ {
61
+ maxSize: 256,
62
+ url: 'inline',
63
+ filter: /\.(svg|png)$/,
64
+ },
65
+ ],
66
+ 'postcss-nested-ancestors',
67
+ 'postcss-nested',
68
+ 'postcss-hexrgba',
69
+ 'postcss-easings',
70
+ [
71
+ 'postcss-dark-theme-class',
72
+ {
73
+ darkSelector: '.dark-theme',
74
+ lightSelector: '.light-theme',
75
+ },
76
+ ],
77
+ 'postcss-combine-duplicated-selectors',
78
+ 'postcss-discard-duplicates',
79
+ [
80
+ 'postcss-pxtorem',
81
+ {
82
+ minPixelValue: 0,
83
+ propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
84
+ rootValue: 16,
85
+ },
86
+ ],
87
+ 'postcss-merge-at-rules',
88
+ [
89
+ 'postcss-sort-media-queries',
90
+ {
91
+ sort: 'mobile-first',
92
+ },
93
+ ],
94
+ 'postcss-extend-rule',
95
+ '@lehoczky/postcss-fluid',
96
+ ...(process.env.NODE_ENV === 'development' ? [cssnano] : []),
97
+ ],
98
+ }
99
+
100
+ export { postcssConfig }
@@ -22,7 +22,7 @@ import postcssPxtorem from 'postcss-pxtorem'
22
22
  import postcssSortMediaQueries from 'postcss-sort-media-queries'
23
23
  import postcssUrl from 'postcss-url'
24
24
 
25
- export default {
25
+ const postcssFigmaWidget = {
26
26
  plugins: [
27
27
  postcssNormalize,
28
28
  postcssPrependImports({
@@ -87,3 +87,5 @@ export default {
87
87
  ],
88
88
  ...(process.env.NODE_ENV === 'production' && { plugins: { cssnano } }),
89
89
  }
90
+
91
+ export { postcssFigmaWidget }
@@ -22,7 +22,7 @@ import postcssUnitlist from 'postcss-unitlist'
22
22
  import postcssUnroot from 'postcss-unroot'
23
23
  import postcssUrl from 'postcss-url'
24
24
 
25
- export default {
25
+ const postcssGulp = {
26
26
  plugins: [
27
27
  postcssNormalize,
28
28
  postcssPrependImports({
@@ -92,3 +92,5 @@ export default {
92
92
  lehoczkyPostcssFluid,
93
93
  ],
94
94
  }
95
+
96
+ export { postcssGulp }
@@ -6,8 +6,8 @@ import { fileURLToPath } from 'node:url'
6
6
  // wrappers next to this file that export the plugin function.
7
7
  const directory = path.dirname(fileURLToPath(import.meta.url))
8
8
 
9
- /* eslint-disable import/no-default-export, perfectionist/sort-objects */
10
- export default {
9
+ /* eslint-disable perfectionist/sort-objects */
10
+ const postcssNextVite = {
11
11
  plugins: {
12
12
  'postcss-normalize': {},
13
13
  'postcss-prepend-imports': {
@@ -80,3 +80,6 @@ export default {
80
80
  : {}),
81
81
  },
82
82
  }
83
+ /* eslint-enable perfectionist/sort-objects */
84
+
85
+ export { postcssNextVite }
@@ -1,10 +1,6 @@
1
1
  import { createSemanticReleaseConfig } from './common.js'
2
2
  import { releaseNotesFromCommitsPlugin } from './releaseNotesFromCommits.js'
3
3
 
4
- // Тот же релиз, что у проекта: ветка docker/master, без публикации в npm.
5
- // Отдельного репозитория задач нет, поэтому заметки собираются только из коммитов.
6
- // Штатный release-notes-generator тянет writer 8 и падает на preset 10,
7
- // который commitlint поднимает в корень репозитория.
8
4
  const semanticReleaseBot = createSemanticReleaseConfig({
9
5
  additionalPlugins: [releaseNotesFromCommitsPlugin],
10
6
  branches: ['docker/master'],
@@ -3,8 +3,6 @@ import {
3
3
  releaseNotesFromIssuesPlugin,
4
4
  } from './common.js'
5
5
 
6
- // Сайт документации: ветка master, без публикации в npm.
7
- // Версия, CHANGELOG и GitHub Release. Вложений нет.
8
6
  const semanticReleaseDoc = createSemanticReleaseConfig({
9
7
  additionalPlugins: [releaseNotesFromIssuesPlugin],
10
8
  branches: ['master'],
File without changes