arui-scripts 23.9.2 → 24.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.
@@ -1,28 +1,28 @@
1
1
  ts-jest[versions] (WARN) Version 6.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <6.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
2
2
  ts-jest[versions] (WARN) Version 6.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <6.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
3
3
  ts-jest[versions] (WARN) Version 6.0.2 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <6.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
4
- PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (18.254 s)
4
+ PASS src/commands/util/__tests__/run-compilers.tests.ts (12.508 s)
5
+ PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts
5
6
  PASS src/bin/__tests__/create-cli.tests.ts
6
7
  PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts
7
8
  PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
8
9
  PASS src/configs/util/__tests__/apply-overrides.tests.ts
9
10
  PASS src/commands/util/__tests__/artifacts-deprecations.tests.ts
10
- PASS src/plugins/__tests__/attribute-module-css.tests.ts (28.778 s)
11
+ PASS src/plugins/__tests__/attribute-module-css.tests.ts (24.394 s)
11
12
  PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
12
- PASS src/configs/__tests__/webpack-client-modules.tests.ts (8.298 s)
13
+ PASS src/configs/util/__tests__/find-plugin.tests.ts (26.276 s)
14
+ PASS src/configs/__tests__/rspack-client-assets.tests.ts (11.764 s)
15
+ PASS src/configs/__tests__/webpack-client-modules.tests.ts
13
16
  PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
14
- PASS src/configs/__tests__/rspack-client-assets.tests.ts (18.268 s)
15
- PASS src/configs/util/__tests__/get-polyfills.tests.ts
16
- PASS src/configs/util/__tests__/find-plugin.tests.ts (38.766 s)
17
17
  PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
18
+ PASS src/configs/util/__tests__/get-polyfills.tests.ts
18
19
  PASS src/configs/util/__tests__/compress-with-dcb.test.ts
19
20
  PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
20
21
  PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
21
22
  PASS src/commands/util/__tests__/client-assets-sizes.tests.ts
22
- A worker process has failed to exit gracefully and has been force exited. This is likely caused by tests leaking due to improper teardown. Try running with --detectOpenHandles to find leaks. Active timers can also cause this, ensure that .unref() was called on them.
23
23
 
24
- Test Suites: 18 passed, 18 total
25
- Tests: 49 passed, 49 total
24
+ Test Suites: 19 passed, 19 total
25
+ Tests: 54 passed, 54 total
26
26
  Snapshots: 0 total
27
- Time: 40.88 s
27
+ Time: 27.373 s
28
28
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # arui-scripts
2
2
 
3
+ ## 24.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#609](https://github.com/core-ds/arui-scripts/pull/609) [`fdc0e343`](https://github.com/core-ds/arui-scripts/commit/fdc0e3433d79884165072aa0f68c94345b574f71) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - Vitest обновлен с v4 до v5
8
+
9
+ ## Почему мажорный релиз
10
+
11
+ Vitest 5 требует Node.js `^22.12.0 || ^24.0.0 || >=26.0.0`.
12
+ Полный список изменений: [Migrating to Vitest 5](https://vitest.dev/guide/migration/#vitest-5)
13
+
14
+ ## 23.9.3
15
+
16
+ ### Patch Changes
17
+
18
+ - [#605](https://github.com/core-ds/arui-scripts/pull/605) [`94ce42aa`](https://github.com/core-ds/arui-scripts/commit/94ce42aa67e8fa3e8c4f1f883c5aac179de9413e) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - Сборка больше не завершается успешно, если компилятор упал. Раньше при падении по сигналу (например, из-за нехватки памяти) `arui-scripts build` выходил с кодом 0 и CI/CD считал такую сборку успешной, хотя ассеты собраны не полностью.
19
+
3
20
  ## 23.9.2
4
21
 
5
22
  ### Patch Changes
package/README.md CHANGED
@@ -27,7 +27,7 @@ CLI `arui-scripts` поддерживает глобальные флаги `--h
27
27
 
28
28
  Зависимость | Версия
29
29
  -- | --
30
- `nodejs` | `20.0.0+, 22.0.0+, 24.0.0+`
30
+ `nodejs` | `22.12.0+, 24.0.0+, 26.0.0+`
31
31
  `react` | `16.13.0+`
32
32
  `react-dom` | `16.13.0+`
33
33
 
@@ -12,26 +12,27 @@ function runCompilers(pathToCompilers) {
12
12
  fs_extra_1.default.removeSync(app_configs_1.configs.serverOutputPath);
13
13
  }
14
14
  const compilers = pathToCompilers.map((pathToCompiler) => {
15
- if (Array.isArray(pathToCompiler)) {
16
- const compiler = (0, child_process_1.spawn)('node', pathToCompiler, {
17
- stdio: 'inherit',
18
- cwd: app_configs_1.configs.cwd,
19
- });
20
- compiler.on('error', onProcessExit);
21
- compiler.on('close', onProcessExit);
22
- return compiler;
23
- }
24
- const compiler = (0, child_process_1.spawn)('node', [pathToCompiler], {
15
+ const compiler = (0, child_process_1.spawn)('node', Array.isArray(pathToCompiler) ? pathToCompiler : [pathToCompiler], {
25
16
  stdio: 'inherit',
17
+ cwd: app_configs_1.configs.cwd,
26
18
  });
27
- compiler.on('error', onProcessExit);
28
- compiler.on('close', onProcessExit);
19
+ compiler.on('error', onProcessError);
20
+ compiler.on('close', onProcessClose);
29
21
  return compiler;
30
22
  });
31
- function onProcessExit(code) {
23
+ function stopCompilers(exitCode) {
24
+ compilers.forEach((compiler) => compiler.kill());
25
+ process.exit(exitCode);
26
+ }
27
+ // в error приходит объект ошибки, а не код для выхода
28
+ function onProcessError(error) {
29
+ console.error(error.message);
30
+ stopCompilers(1);
31
+ }
32
+ function onProcessClose(code) {
32
33
  if (code !== 0) {
33
- compilers.forEach((compiler) => compiler.kill());
34
- process.exit(code);
34
+ // code === null означает, что процесс убит сигналом
35
+ stopCompilers(code !== null && code !== void 0 ? code : 1);
35
36
  }
36
37
  }
37
38
  }
package/docs/commands.md CHANGED
@@ -76,6 +76,9 @@ arui-scripts test
76
76
 
77
77
  Команда `arui-scripts test:vitest` запускает unit тесты через [Vitest](https://vitest.dev/).
78
78
 
79
+ Vitest требует Node.js 22.12 или новее. Ему также нужен `vite` (peer-зависимость), `arui-scripts` устанавливает его сам.
80
+ Если `vitest` подключен в проект напрямую и используется yarn, добавьте `vite` в `devDependencies` проекта (yarn не устанавливает peer-зависимости автоматически).
81
+
79
82
  Если в корне проекта есть `vitest.config.ts` (или `.js`, `.mjs`, `.cjs`), то используется он.
80
83
  Иначе применяется конфигурация arui-scripts.
81
84
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-scripts",
3
- "version": "23.9.2",
3
+ "version": "24.0.0",
4
4
  "main": "./build/index.js",
5
5
  "typings": "./build/index.d.ts",
6
6
  "exports": {
@@ -123,8 +123,9 @@
123
123
  "ts-jest": "29.1.0",
124
124
  "ts-loader": "9.4.4",
125
125
  "ts-node": "10.9.2",
126
+ "vite": "^8.3.1",
126
127
  "vite-tsconfig-paths": "^6.1.1",
127
- "vitest": "^4.1.11",
128
+ "vitest": "^5.0.2",
128
129
  "webpack-bundle-analyzer": "4.10.2",
129
130
  "webpack-deduplication-plugin": "^0.0.8",
130
131
  "webpack-node-externals": "3.0.0"
@@ -136,7 +137,7 @@
136
137
  "@types/fs-extra": "^9.0.13",
137
138
  "@types/jest": "^29.5.14",
138
139
  "@types/lodash.merge": "^4.6.7",
139
- "@types/node": "^20.19.0",
140
+ "@types/node": "^22.12.0",
140
141
  "@types/postcss-media-query-parser": "0.2.4",
141
142
  "@types/semver": "^7.5.0",
142
143
  "@types/serialize-javascript": "^5.0.4",
@@ -149,7 +150,7 @@
149
150
  "typescript": "6.0.2"
150
151
  },
151
152
  "engines": {
152
- "node": "^20.19.0 || >=22.12.0"
153
+ "node": "^22.12.0 || ^24.0.0 || >=26.0.0"
153
154
  },
154
155
  "scripts": {
155
156
  "build": "sh bin/build.sh",