arui-scripts 20.6.1 → 20.7.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.
@@ -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 (28.27 s)
8
+ PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (28.343 s)
9
+ PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
10
+ PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (28.508 s)
9
11
  PASS src/configs/util/__tests__/apply-overrides.tests.ts
10
- PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (28.796 s)
11
12
  PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
12
13
  PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
13
- PASS src/configs/util/__tests__/compress-with-dcb.test.ts
14
14
  PASS src/configs/util/__tests__/get-polyfills.tests.ts
15
+ PASS src/configs/util/__tests__/compress-with-dcb.test.ts
15
16
  PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
16
- PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
17
17
  PASS src/configs/app-configs/__tests__/validate-settings-keys.tests.ts
18
- PASS src/configs/util/__tests__/find-plugin.tests.ts (30.559 s)
18
+ PASS src/plugins/postcss-global-variables/utils/__tests__/get-media-query-name.tests.ts
19
+ PASS src/configs/util/__tests__/find-plugin.tests.ts (31.113 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: 31.499 s
24
+ Time: 32.013 s
24
25
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
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.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#401](https://github.com/core-ds/arui-scripts/pull/401) [`cc921b9`](https://github.com/core-ds/arui-scripts/commit/cc921b9fc5ae2690035c9794dd6e787339f01370) Thanks [@jkikksa](https://github.com/jkikksa)! - обновлена версия rspack с 1.4.11 до 1.7.3
8
+
9
+ ### Patch Changes
10
+
11
+ - [#391](https://github.com/core-ds/arui-scripts/pull/391) [`65e3f40`](https://github.com/core-ds/arui-scripts/commit/65e3f40bfff2c1fa2a92f7d2de023928f75a8f8a) Thanks [@heymdall-legal](https://github.com/heymdall-legal)! - Исправлена проблема с подключением svg файлов на сервере
12
+
13
+ ## 20.6.2
14
+
15
+ ### Patch Changes
16
+
17
+ - [#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 - он мог срабатывать для файлов, которые в названии содержат имена билд-директорий
18
+
3
19
  ## 20.6.1
4
20
 
5
21
  ### Patch 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
  }
@@ -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
+ }
@@ -51,7 +51,7 @@ type PluginsListClient = {
51
51
  CompressionPlugin: {
52
52
  options: ConstructorParameters<typeof CompressionPlugin>[number];
53
53
  };
54
- NormalModuleReplacementPlugin: NormalModuleReplacementPlugin;
54
+ NormalModuleReplacementPlugin: typeof NormalModuleReplacementPlugin;
55
55
  };
56
56
  type PluginsListServer = {
57
57
  BannerPlugin: {
@@ -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");
@@ -130,6 +131,9 @@ const createServerConfig = (mode) => ({
130
131
  maxSize: app_configs_1.configs.dataUrlMaxSize,
131
132
  },
132
133
  },
134
+ generator: {
135
+ publicPath: '',
136
+ },
133
137
  },
134
138
  {
135
139
  exclude: [/\.(js|jsx|mjs|ts|tsx)$/, /\.(html|ejs)$/, /\.json$/, /\.svg$/],
@@ -176,7 +180,7 @@ const createServerConfig = (mode) => ({
176
180
  ].filter(Boolean),
177
181
  // Без этого комиляция трирегилась на изменение в node_modules и приводила к утечке памяти
178
182
  watchOptions: {
179
- ignored: new RegExp(app_configs_1.configs.watchIgnorePath.join('|')),
183
+ ignored: (0, create_watch_ignore_regex_1.createWatchIgnoreRegex)(app_configs_1.configs.watchIgnorePath),
180
184
  aggregateTimeout: 100,
181
185
  },
182
186
  performance: {