arui-scripts 23.9.1 → 23.9.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.
- package/.turbo/turbo-test.log +11 -9
- package/CHANGELOG.md +8 -0
- package/build/configs/config-extras/minimizers/imagemin/imagemin.d.ts +14 -0
- package/build/configs/config-extras/minimizers/imagemin/imagemin.js +21 -2
- package/build/configs/rspack.client.js +3 -2
- package/package.json +1 -1
- package/tsconfig-local.tsbuildinfo +1 -1
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,26 +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 (
|
|
4
|
+
PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (18.254 s)
|
|
5
5
|
PASS src/bin/__tests__/create-cli.tests.ts
|
|
6
6
|
PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts
|
|
7
7
|
PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
|
|
8
8
|
PASS src/configs/util/__tests__/apply-overrides.tests.ts
|
|
9
9
|
PASS src/commands/util/__tests__/artifacts-deprecations.tests.ts
|
|
10
|
+
PASS src/plugins/__tests__/attribute-module-css.tests.ts (28.778 s)
|
|
10
11
|
PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
|
|
11
|
-
PASS src/
|
|
12
|
+
PASS src/configs/__tests__/webpack-client-modules.tests.ts (8.298 s)
|
|
12
13
|
PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
|
|
13
|
-
PASS src/configs/
|
|
14
|
+
PASS src/configs/__tests__/rspack-client-assets.tests.ts (18.268 s)
|
|
14
15
|
PASS src/configs/util/__tests__/get-polyfills.tests.ts
|
|
16
|
+
PASS src/configs/util/__tests__/find-plugin.tests.ts (38.766 s)
|
|
15
17
|
PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
|
|
16
|
-
PASS src/
|
|
18
|
+
PASS src/configs/util/__tests__/compress-with-dcb.test.ts
|
|
17
19
|
PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
|
|
18
20
|
PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
|
|
19
|
-
PASS src/
|
|
20
|
-
|
|
21
|
+
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.
|
|
21
23
|
|
|
22
|
-
Test Suites:
|
|
23
|
-
Tests:
|
|
24
|
+
Test Suites: 18 passed, 18 total
|
|
25
|
+
Tests: 49 passed, 49 total
|
|
24
26
|
Snapshots: 0 total
|
|
25
|
-
Time:
|
|
27
|
+
Time: 40.88 s
|
|
26
28
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# arui-scripts
|
|
2
2
|
|
|
3
|
+
## 23.9.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#602](https://github.com/core-ds/arui-scripts/pull/602) [`0c7063af`](https://github.com/core-ds/arui-scripts/commit/0c7063af3b3c735a562962a4d56884399511f430) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - Минификация картинок не работала: правило стояло после общего svg правила в `oneOf` и использовало несуществующий тип модуля `assets`. Правило перенесено вперед, поправлен тип, у svgo отключен `removeViewBox`
|
|
8
|
+
|
|
9
|
+
- [#602](https://github.com/core-ds/arui-scripts/pull/602) [`d67562cb`](https://github.com/core-ds/arui-scripts/commit/d67562cb95db673cee84bf1b7e0df3a85a4ec503) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - для словарей сжатия не добавляется `CopyRspackPlugin`, если список словарей пуст
|
|
10
|
+
|
|
3
11
|
## 23.9.1
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -2,6 +2,11 @@ import ImageMinimizerPlugin from 'image-minimizer-webpack-plugin';
|
|
|
2
2
|
export declare function getImageMinLoader(): false | {
|
|
3
3
|
test: RegExp;
|
|
4
4
|
type: string;
|
|
5
|
+
parser: {
|
|
6
|
+
dataUrlCondition: {
|
|
7
|
+
maxSize: number | undefined;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
5
10
|
use: {
|
|
6
11
|
loader: string;
|
|
7
12
|
options: {
|
|
@@ -17,6 +22,15 @@ export declare function getImageMinLoader(): false | {
|
|
|
17
22
|
colorTypeReduction: boolean | undefined;
|
|
18
23
|
paletteReduction: boolean | undefined;
|
|
19
24
|
interlaced: boolean | undefined;
|
|
25
|
+
})[] | (string | {
|
|
26
|
+
plugins: {
|
|
27
|
+
name: string;
|
|
28
|
+
params: {
|
|
29
|
+
overrides: {
|
|
30
|
+
removeViewBox: boolean;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
}[];
|
|
20
34
|
})[] | (string | {
|
|
21
35
|
optimizationLevel: number | undefined;
|
|
22
36
|
interlaced: boolean;
|
|
@@ -21,7 +21,13 @@ function getImageMinLoader() {
|
|
|
21
21
|
].filter(Boolean);
|
|
22
22
|
return {
|
|
23
23
|
test: new RegExp(`\\.(${loaderExtensions.join('|')})$`),
|
|
24
|
-
type: '
|
|
24
|
+
type: 'asset',
|
|
25
|
+
// правило стоит раньше общих asset правил, поэтому порог инлайна должен быть тем же
|
|
26
|
+
parser: {
|
|
27
|
+
dataUrlCondition: {
|
|
28
|
+
maxSize: app_configs_1.configs.dataUrlMaxSize,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
25
31
|
use: [
|
|
26
32
|
{
|
|
27
33
|
loader: image_minimizer_webpack_plugin_1.default.loader,
|
|
@@ -47,7 +53,20 @@ function getImageMinLoader() {
|
|
|
47
53
|
interlaced: png === null || png === void 0 ? void 0 : png.interlaced,
|
|
48
54
|
},
|
|
49
55
|
],
|
|
50
|
-
(svg === null || svg === void 0 ? void 0 : svg.enabled) && [
|
|
56
|
+
(svg === null || svg === void 0 ? void 0 : svg.enabled) && [
|
|
57
|
+
'svgo',
|
|
58
|
+
{
|
|
59
|
+
plugins: [
|
|
60
|
+
{
|
|
61
|
+
name: 'preset-default',
|
|
62
|
+
params: {
|
|
63
|
+
// preset-default в svgo вырезает viewBox, без него svg перестают масштабироваться
|
|
64
|
+
overrides: { removeViewBox: false },
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
],
|
|
51
70
|
(gif === null || gif === void 0 ? void 0 : gif.enabled) && [
|
|
52
71
|
'gifsicle',
|
|
53
72
|
{
|
|
@@ -249,6 +249,8 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
249
249
|
},
|
|
250
250
|
],
|
|
251
251
|
},
|
|
252
|
+
// В oneOf срабатывает первое подходящее правило, поэтому минификация картинок должна стоять раньше svg правила
|
|
253
|
+
mode === 'prod' && (0, minimizers_1.getImageMinLoader)(),
|
|
252
254
|
{
|
|
253
255
|
test: /\.svg/,
|
|
254
256
|
type: 'asset',
|
|
@@ -258,7 +260,6 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
258
260
|
},
|
|
259
261
|
},
|
|
260
262
|
},
|
|
261
|
-
mode === 'prod' && (0, minimizers_1.getImageMinLoader)(),
|
|
262
263
|
{
|
|
263
264
|
exclude: [/\.(js|jsx|mjs|cjs|ts|tsx)$/, /\.(html|ejs)$/, /\.json$/],
|
|
264
265
|
type: 'asset',
|
|
@@ -328,7 +329,7 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
|
|
|
328
329
|
filename: '../index.html',
|
|
329
330
|
}),
|
|
330
331
|
mode === 'dev' && app_configs_1.configs.clientOnly && new client_env_config_1.ClientConfigPlugin(),
|
|
331
|
-
app_configs_1.configs.compressionPredefinedDictionaryPath &&
|
|
332
|
+
app_configs_1.configs.compressionPredefinedDictionaryPath.length > 0 &&
|
|
332
333
|
new core_1.CopyRspackPlugin({
|
|
333
334
|
patterns: app_configs_1.configs.compressionPredefinedDictionaryPath,
|
|
334
335
|
}),
|