arui-scripts 20.6.0 → 20.6.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.
@@ -5,20 +5,21 @@ ts-jest[versions] (WARN) Version 29.7.0 of jest installed has not been tested wi
5
5
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
6
6
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
7
7
  ts-jest[versions] (WARN) Version 5.6.3 of typescript installed has not been tested with ts-jest. If you're experiencing issues, consider using a supported version (>=4.3.0 <5.0.0-0). Please do not report issues in ts-jest if you are using unsupported versions.
8
- PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (29.372 s)
8
+ PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (27.797 s)
9
+ PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
9
10
  PASS src/configs/util/__tests__/apply-overrides.tests.ts
10
11
  PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
11
12
  PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
13
+ PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (28.43 s)
12
14
  PASS src/configs/util/__tests__/compress-with-dcb.test.ts
13
- PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (30.134 s)
14
15
  PASS src/configs/util/__tests__/get-polyfills.tests.ts
15
16
  PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
16
- PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
17
17
  PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
18
- PASS src/configs/util/__tests__/find-plugin.tests.ts (32.384 s)
18
+ PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
19
+ PASS src/configs/util/__tests__/find-plugin.tests.ts (30.525 s)
19
20
 
20
- Test Suites: 11 passed, 11 total
21
- Tests: 25 passed, 25 total
21
+ Test Suites: 12 passed, 12 total
22
+ Tests: 30 passed, 30 total
22
23
  Snapshots: 0 total
23
- Time: 33.462 s
24
+ Time: 31.46 s
24
25
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # [15.3.0](https://github.com/core-ds/arui-scripts/compare/v15.2.0...v15.3.0) (2023-06-30)
2
2
 
3
+ ## 20.6.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#388](https://github.com/core-ds/arui-scripts/pull/388) [`92c0100`](https://github.com/core-ds/arui-scripts/commit/92c01002e08e110eb642b244c3956c67e913c527) Thanks [@heymdall-legal](https://github.com/heymdall-legal)! - Исправлена работа с watchIgnorePattern - он мог срабатывать для файлов, которые в названии содержат имена билд-директорий
8
+
9
+ ## 20.6.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [#385](https://github.com/core-ds/arui-scripts/pull/385) [`f2cc71b`](https://github.com/core-ds/arui-scripts/commit/f2cc71b89520e6a18295543de2bde655f7004f06) Thanks [@heymdall-legal](https://github.com/heymdall-legal)! - Добавлена возможность указывать отдельную конфигурацию shared для wmf при использовании отдельной wmf сборки
14
+
3
15
  ## 20.6.0
4
16
 
5
17
  ### Minor Changes
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.runServerWatchCompiler = runServerWatchCompiler;
4
4
  const core_1 = require("@rspack/core");
5
5
  const app_configs_1 = require("../../configs/app-configs");
6
+ const create_watch_ignore_regex_1 = require("../../configs/util/create-watch-ignore-regex");
6
7
  const print_compiler_output_1 = require("../start/print-compiler-output");
7
8
  function runServerWatchCompiler(config) {
8
9
  const serverCompiler = (0, core_1.rspack)(config);
@@ -11,6 +12,6 @@ function runServerWatchCompiler(config) {
11
12
  serverCompiler.hooks.done.tap('server', (stats) => (0, print_compiler_output_1.printCompilerOutput)('Server', stats));
12
13
  serverCompiler.watch({
13
14
  aggregateTimeout: 50, // Делаем это значение меньше чем у клиента, чтобы сервер пересобирался быстрее
14
- ignored: new RegExp(app_configs_1.configs.watchIgnorePath.join('|')),
15
+ ignored: (0, create_watch_ignore_regex_1.createWatchIgnoreRegex)(app_configs_1.configs.watchIgnorePath),
15
16
  }, () => { });
16
17
  }
@@ -90,6 +90,7 @@ export type AppConfigs = {
90
90
  export type ModuleConfigBase = {
91
91
  cssPrefix?: false | string;
92
92
  useSeparateBuild?: boolean;
93
+ separateBuildShared?: Shared;
93
94
  };
94
95
  type CompatModuleConfigBase = {
95
96
  cssPrefix?: false | string;
@@ -40,7 +40,7 @@ function haveExposedDefaultModules() {
40
40
  }
41
41
  exports.MODULES_ENTRY_NAME = 'remoteEntry.js';
42
42
  function patchMainWebpackConfigForModules(webpackConf, mode) {
43
- var _a;
43
+ var _a, _b;
44
44
  /* eslint-disable no-param-reassign */
45
45
  const isConsumer = mode === 'consumer' || mode === 'both';
46
46
  const isProvider = mode === 'provider' || mode === 'both';
@@ -74,7 +74,8 @@ function patchMainWebpackConfigForModules(webpackConf, mode) {
74
74
  webpackConf.plugins.push(new rspack.container.ModuleFederationPlugin({
75
75
  name: app_configs_1.configs.modules.name || app_configs_1.configs.normalizedName,
76
76
  filename: isProvider && app_configs_1.configs.modules.exposes ? exports.MODULES_ENTRY_NAME : undefined,
77
- shared: app_configs_1.configs.modules.shared,
77
+ shared: (mode === 'provider' && ((_b = app_configs_1.configs.modules.options) === null || _b === void 0 ? void 0 : _b.separateBuildShared)) ||
78
+ app_configs_1.configs.modules.shared,
78
79
  exposes: isProvider ? app_configs_1.configs.modules.exposes : {},
79
80
  shareScope: app_configs_1.configs.modules.shareScope,
80
81
  }), new turn_off_split_remote_entry_1.TurnOffSplitRemoteEntry(app_configs_1.configs.modules.name || app_configs_1.configs.normalizedName));
@@ -0,0 +1 @@
1
+ export declare function createWatchIgnoreRegex(paths: string[]): RegExp;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createWatchIgnoreRegex = createWatchIgnoreRegex;
4
+ function createWatchIgnoreRegex(paths) {
5
+ if (paths.length === 0) {
6
+ return /(?!)/; // никогда не будет матчится
7
+ }
8
+ const patterns = paths.map((p) => {
9
+ const escaped = escapeRegExp(p);
10
+ return `(^|[\\\\/])${escaped}([\\\\/]|$)`;
11
+ });
12
+ return new RegExp(patterns.join('|'));
13
+ }
14
+ function escapeRegExp(str) {
15
+ return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
16
+ }
@@ -46,6 +46,7 @@ const html_template_1 = require("../templates/html.template");
46
46
  const minimizers_1 = require("./config-extras/minimizers");
47
47
  const check_node_version_1 = require("./util/check-node-version");
48
48
  const compression_plugins_for_dictionaries_1 = require("./util/compression-plugins-for-dictionaries");
49
+ const create_watch_ignore_regex_1 = require("./util/create-watch-ignore-regex");
49
50
  const get_entry_1 = require("./util/get-entry");
50
51
  const app_configs_1 = require("./app-configs");
51
52
  const babel_client_1 = require("./babel-client");
@@ -358,7 +359,7 @@ const createSingleClientWebpackConfig = (mode, entry, configName) => (Object.ass
358
359
  .filter(Boolean),
359
360
  // Без этого комиляция трирегилась на изменение в node_modules и приводила к утечке памяти
360
361
  watchOptions: {
361
- ignored: new RegExp(app_configs_1.configs.watchIgnorePath.join('|')),
362
+ ignored: (0, create_watch_ignore_regex_1.createWatchIgnoreRegex)(app_configs_1.configs.watchIgnorePath),
362
363
  aggregateTimeout: 100,
363
364
  },
364
365
  // Выключаем performance hints, т.к. размеры бандлов контролируются не в рамках arui-scripts
@@ -13,6 +13,7 @@ const run_script_webpack_plugin_1 = require("run-script-webpack-plugin");
13
13
  const webpack_node_externals_1 = __importDefault(require("webpack-node-externals"));
14
14
  const reload_server_plugin_1 = require("../plugins/reload-server-plugin");
15
15
  const watch_missing_node_modules_plugin_1 = require("../plugins/watch-missing-node-modules-plugin");
16
+ const create_watch_ignore_regex_1 = require("./util/create-watch-ignore-regex");
16
17
  const get_entry_1 = require("./util/get-entry");
17
18
  const app_configs_1 = require("./app-configs");
18
19
  const babel_dependencies_1 = require("./babel-dependencies");
@@ -176,7 +177,7 @@ const createServerConfig = (mode) => ({
176
177
  ].filter(Boolean),
177
178
  // Без этого комиляция трирегилась на изменение в node_modules и приводила к утечке памяти
178
179
  watchOptions: {
179
- ignored: new RegExp(app_configs_1.configs.watchIgnorePath.join('|')),
180
+ ignored: (0, create_watch_ignore_regex_1.createWatchIgnoreRegex)(app_configs_1.configs.watchIgnorePath),
180
181
  aggregateTimeout: 100,
181
182
  },
182
183
  performance: {