arui-scripts 23.0.0 → 23.0.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 +8 -7
- package/CHANGELOG.md +12 -0
- package/build/commands/bundle-analyze/index.js +14 -0
- package/build/configs/modules.d.ts +1 -0
- package/build/configs/modules.js +15 -3
- package/build/configs/webpack.client.js +1 -1
- package/package.json +2 -2
- package/tsconfig-local.tsbuildinfo +1 -1
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
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 (23.
|
|
5
|
-
PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (23.475 s)
|
|
4
|
+
PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (23.47 s)
|
|
6
5
|
PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
|
|
7
6
|
PASS src/configs/util/__tests__/apply-overrides.tests.ts
|
|
7
|
+
PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (24.053 s)
|
|
8
8
|
PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
|
|
9
9
|
PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
|
|
10
|
+
PASS src/configs/util/__tests__/compress-with-dcb.test.ts
|
|
10
11
|
PASS src/configs/util/__tests__/get-polyfills.tests.ts
|
|
11
12
|
PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
|
|
12
|
-
PASS src/configs/util/__tests__/compress-with-dcb.test.ts
|
|
13
13
|
PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
|
|
14
14
|
PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
|
|
15
|
-
PASS src/configs/
|
|
15
|
+
PASS src/configs/__tests__/webpack-client-modules.tests.ts (16.896 s)
|
|
16
|
+
PASS src/configs/util/__tests__/find-plugin.tests.ts (41.681 s)
|
|
16
17
|
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.
|
|
17
18
|
|
|
18
|
-
Test Suites:
|
|
19
|
-
Tests:
|
|
19
|
+
Test Suites: 13 passed, 13 total
|
|
20
|
+
Tests: 31 passed, 31 total
|
|
20
21
|
Snapshots: 0 total
|
|
21
|
-
Time:
|
|
22
|
+
Time: 43.483 s
|
|
22
23
|
Ran all test suites.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# arui-scripts
|
|
2
2
|
|
|
3
|
+
## 23.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#512](https://github.com/core-ds/arui-scripts/pull/512) [`e2b0ee1`](https://github.com/core-ds/arui-scripts/commit/e2b0ee1d3376e359a7e466de7a5d3c37ed672684) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - Исправлен запуск команды `bundle-analyze`. Теперь явно включаются необходимые поля stats для `webpack-bundle-analyzer`, которые больше не попадают в `stats.toJson()` по умолчанию
|
|
8
|
+
|
|
9
|
+
## 23.0.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#513](https://github.com/core-ds/arui-scripts/pull/513) [`fb3dcef`](https://github.com/core-ds/arui-scripts/commit/fb3dcef62e38e71da665175d2aef42fa00b95040) Thanks [@evK608](https://github.com/evK608)! - Исправление конфликта runtime-чанков между основной сборкой и отдельной WMF-сборкой при использовании modules.options.useSeparateBuild
|
|
14
|
+
|
|
3
15
|
## 23.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -15,6 +15,17 @@ const webpack_bundle_analyzer_1 = require("webpack-bundle-analyzer");
|
|
|
15
15
|
const app_configs_1 = require("../../configs/app-configs");
|
|
16
16
|
const webpack_client_prod_1 = require("../../configs/webpack.client.prod");
|
|
17
17
|
const make_tmp_dir_1 = require("../util/make-tmp-dir");
|
|
18
|
+
// В rspack по умолчанию больше не включаются эти поля, но для webpack-bundle-analyzer они нужны
|
|
19
|
+
// https://rspack.rs/guide/migration/rspack_1.x#changed-default-parameters-of-statstojson
|
|
20
|
+
const bundleAnalyzerStatsOptions = {
|
|
21
|
+
assets: true,
|
|
22
|
+
chunks: true,
|
|
23
|
+
chunkGroups: true,
|
|
24
|
+
chunkModules: true,
|
|
25
|
+
entryPoints: true,
|
|
26
|
+
entrypoints: true,
|
|
27
|
+
modules: true,
|
|
28
|
+
};
|
|
18
29
|
(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
19
30
|
console.log('Starting bundle analysis...');
|
|
20
31
|
const clientWebpackConfigs = Array.isArray(webpack_client_prod_1.webpackClientConfig)
|
|
@@ -23,11 +34,13 @@ const make_tmp_dir_1 = require("../util/make-tmp-dir");
|
|
|
23
34
|
/* eslint-disable no-param-reassign */
|
|
24
35
|
const promises = clientWebpackConfigs.map((webpackConfig, i) => __awaiter(void 0, void 0, void 0, function* () {
|
|
25
36
|
const tmpDir = yield (0, make_tmp_dir_1.makeTmpDir)(i.toString());
|
|
37
|
+
const webpackStatsOptions = Object.assign(Object.assign({}, (typeof webpackConfig.stats === 'object' ? webpackConfig.stats : {})), bundleAnalyzerStatsOptions);
|
|
26
38
|
webpackConfig.plugins = [
|
|
27
39
|
...(webpackConfig.plugins || []),
|
|
28
40
|
new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
|
|
29
41
|
generateStatsFile: true,
|
|
30
42
|
statsFilename: app_configs_1.configs.statsOutputPath,
|
|
43
|
+
statsOptions: bundleAnalyzerStatsOptions,
|
|
31
44
|
analyzerPort: 'auto',
|
|
32
45
|
analyzerMode: 'server',
|
|
33
46
|
openAnalyzer: true,
|
|
@@ -35,6 +48,7 @@ const make_tmp_dir_1 = require("../util/make-tmp-dir");
|
|
|
35
48
|
}), // webpack-bundle-analyzer has incorrect types
|
|
36
49
|
new rspack_plugin_1.RsdoctorRspackPlugin({}),
|
|
37
50
|
];
|
|
51
|
+
webpackConfig.stats = webpackStatsOptions;
|
|
38
52
|
webpackConfig.output = Object.assign(Object.assign({}, webpackConfig.output), { path: tmpDir });
|
|
39
53
|
}));
|
|
40
54
|
yield Promise.all(promises);
|
|
@@ -2,6 +2,7 @@ import * as rspack from '@rspack/core';
|
|
|
2
2
|
import { type CompatModuleConfig } from './app-configs/types';
|
|
3
3
|
export declare function haveExposedDefaultModules(): Record<string, string> | undefined;
|
|
4
4
|
export declare const MODULES_ENTRY_NAME = "remoteEntry.js";
|
|
5
|
+
export declare const MODULES_SEPARATE_BUILD_NAME = "wmf";
|
|
5
6
|
export declare function patchMainWebpackConfigForModules(webpackConf: rspack.Configuration, mode: 'consumer' | 'provider' | 'both'): rspack.RspackOptions;
|
|
6
7
|
export declare function getCssPrefixForModule(module: CompatModuleConfig): string | undefined;
|
|
7
8
|
export declare function getExposeLoadersFormCompatModules(): {
|
package/build/configs/modules.js
CHANGED
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.MODULES_ENTRY_NAME = void 0;
|
|
36
|
+
exports.MODULES_SEPARATE_BUILD_NAME = exports.MODULES_ENTRY_NAME = void 0;
|
|
37
37
|
exports.haveExposedDefaultModules = haveExposedDefaultModules;
|
|
38
38
|
exports.patchMainWebpackConfigForModules = patchMainWebpackConfigForModules;
|
|
39
39
|
exports.getCssPrefixForModule = getCssPrefixForModule;
|
|
@@ -49,6 +49,14 @@ function haveExposedDefaultModules() {
|
|
|
49
49
|
return (_a = app_configs_1.configs.modules) === null || _a === void 0 ? void 0 : _a.exposes;
|
|
50
50
|
}
|
|
51
51
|
exports.MODULES_ENTRY_NAME = 'remoteEntry.js';
|
|
52
|
+
exports.MODULES_SEPARATE_BUILD_NAME = 'wmf';
|
|
53
|
+
function getModuleFederationContainerName() {
|
|
54
|
+
var _a;
|
|
55
|
+
return ((_a = app_configs_1.configs.modules) === null || _a === void 0 ? void 0 : _a.name) || app_configs_1.configs.normalizedName;
|
|
56
|
+
}
|
|
57
|
+
function getSeparateBuildRuntimeName() {
|
|
58
|
+
return `${getModuleFederationContainerName().replace(/\W/g, '_')}_${exports.MODULES_SEPARATE_BUILD_NAME}`;
|
|
59
|
+
}
|
|
52
60
|
function patchMainWebpackConfigForModules(webpackConf, mode) {
|
|
53
61
|
var _a, _b;
|
|
54
62
|
/* eslint-disable no-param-reassign */
|
|
@@ -81,14 +89,18 @@ function patchMainWebpackConfigForModules(webpackConf, mode) {
|
|
|
81
89
|
webpackConf.output.publicPath = haveExposedDefaultModules()
|
|
82
90
|
? 'auto' // Для того чтобы модули могли подключаться из разных мест, нам необходимо использовать auto. Для корректной работы в IE надо подключaть https://github.com/amiller-gh/currentScript-polyfill
|
|
83
91
|
: app_configs_1.configs.publicPath;
|
|
92
|
+
if (mode === 'provider') {
|
|
93
|
+
const uniqueName = getSeparateBuildRuntimeName();
|
|
94
|
+
webpackConf.output = Object.assign(Object.assign({}, webpackConf.output), { uniqueName, chunkLoadingGlobal: `rspackChunk${uniqueName}` });
|
|
95
|
+
}
|
|
84
96
|
webpackConf.plugins.push(new rspack.container.ModuleFederationPlugin({
|
|
85
|
-
name:
|
|
97
|
+
name: getModuleFederationContainerName(),
|
|
86
98
|
filename: isProvider && app_configs_1.configs.modules.exposes ? exports.MODULES_ENTRY_NAME : undefined,
|
|
87
99
|
shared: (mode === 'provider' && ((_b = app_configs_1.configs.modules.options) === null || _b === void 0 ? void 0 : _b.separateBuildShared)) ||
|
|
88
100
|
app_configs_1.configs.modules.shared,
|
|
89
101
|
exposes: isProvider ? app_configs_1.configs.modules.exposes : {},
|
|
90
102
|
shareScope: app_configs_1.configs.modules.shareScope,
|
|
91
|
-
}), new turn_off_split_remote_entry_1.TurnOffSplitRemoteEntry(
|
|
103
|
+
}), new turn_off_split_remote_entry_1.TurnOffSplitRemoteEntry(getModuleFederationContainerName()));
|
|
92
104
|
return webpackConf;
|
|
93
105
|
/* eslint-enable no-param-reassign */
|
|
94
106
|
}
|
|
@@ -382,7 +382,7 @@ const createClientWebpackConfig = (mode) => {
|
|
|
382
382
|
const baseWebpackConfig = [(0, exports.createSingleClientWebpackConfig)(mode, app_configs_1.configs.clientEntry)];
|
|
383
383
|
if ((_b = (_a = app_configs_1.configs.modules) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.useSeparateBuild) {
|
|
384
384
|
baseWebpackConfig[0] = (0, modules_1.patchMainWebpackConfigForModules)(baseWebpackConfig[0], 'consumer');
|
|
385
|
-
baseWebpackConfig.push((0, modules_1.patchMainWebpackConfigForModules)((0, exports.createSingleClientWebpackConfig)(mode, {},
|
|
385
|
+
baseWebpackConfig.push((0, modules_1.patchMainWebpackConfigForModules)((0, exports.createSingleClientWebpackConfig)(mode, {}, modules_1.MODULES_SEPARATE_BUILD_NAME), 'provider'));
|
|
386
386
|
}
|
|
387
387
|
else {
|
|
388
388
|
baseWebpackConfig[0] = (0, modules_1.patchMainWebpackConfigForModules)(baseWebpackConfig[0], 'both');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arui-scripts",
|
|
3
|
-
"version": "23.0.
|
|
3
|
+
"version": "23.0.2",
|
|
4
4
|
"main": "./build/index.js",
|
|
5
5
|
"typings": "./build/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"style-loader": "3.3.3",
|
|
117
117
|
"swc-loader": "^0.2.6",
|
|
118
118
|
"swc-plugin-coverage-instrument": "0.0.32",
|
|
119
|
-
"tar": "7.5.
|
|
119
|
+
"tar": "7.5.16",
|
|
120
120
|
"terser-webpack-plugin": "5.3.14",
|
|
121
121
|
"ts-checker-rspack-plugin": "^1.3.0",
|
|
122
122
|
"ts-jest": "29.1.0",
|