arui-scripts 22.1.1 → 22.3.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,22 +1,22 @@
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/configs/app-configs/__tests__/update-with-presets.tests.ts (25.631 s)
4
+ PASS src/configs/app-configs/__tests__/update-with-presets.tests.ts (24.047 s)
5
+ PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (24.402 s)
5
6
  PASS src/configs/util/__tests__/create-watch-ignore-regex.tests.ts
6
- PASS src/configs/util/__tests__/apply-overrides.tests.ts
7
7
  PASS src/configs/app-configs/__tests__/update-with-env.tests.ts
8
- PASS src/plugins/postcss-global-variables/utils/__tests__/add-global-variable.tests.ts (26.664 s)
8
+ PASS src/configs/util/__tests__/apply-overrides.tests.ts
9
9
  PASS src/configs/app-configs/__tests__/update-with-package.tests.ts
10
10
  PASS src/configs/util/__tests__/get-polyfills.tests.ts
11
- PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.ts
12
11
  PASS src/configs/util/__tests__/compress-with-dcb.test.ts
12
+ PASS src/plugins/postcss-global-variables/utils/__tests__/parse-variables.tests.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/util/__tests__/find-plugin.tests.ts (35.293 s)
15
+ PASS src/configs/util/__tests__/find-plugin.tests.ts (34.198 s)
16
16
  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
17
 
18
18
  Test Suites: 12 passed, 12 total
19
19
  Tests: 30 passed, 30 total
20
20
  Snapshots: 0 total
21
- Time: 36.262 s
21
+ Time: 35.991 s
22
22
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # arui-scripts
2
2
 
3
+ ## 22.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#498](https://github.com/core-ds/arui-scripts/pull/498) [`807e9a8`](https://github.com/core-ds/arui-scripts/commit/807e9a85d8753611c7cfeb7c38fdede28a970901) Thanks [@qrik116](https://github.com/qrik116)! - Добавлена настройка `nodeExternals` для настройки **webpack-node-externals** в конфигурации сервера
8
+
9
+ ## 22.2.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [#493](https://github.com/core-ds/arui-scripts/pull/493) [`800b5db`](https://github.com/core-ds/arui-scripts/commit/800b5db0b5e2387aed2092ef54bbf01b58f11c50) Thanks [@dmitrbrvsk](https://github.com/dmitrbrvsk)! - добавлен рееэкспорт patchMainWebpackConfigForModules для публичного api, для исправления ошибки ERR_PACKAGE_PATH_NOT_EXPORTED в проектах. если нужна функция patchMainWebpackConfigForModules, то используйте `import { patchMainWebpackConfigForModules } from 'arui-scripts'`
14
+
3
15
  ## 22.1.1
4
16
 
5
17
  ### Patch Changes
@@ -88,6 +88,9 @@ function getDefaultAppConfig() {
88
88
  disableModulesSupport: false,
89
89
  compatModules: null,
90
90
  modules: null,
91
+ nodeExternals: {
92
+ modulesFromFile: true,
93
+ },
91
94
  };
92
95
  }
93
96
  function getPackageJson() {
@@ -1,6 +1,7 @@
1
1
  import { type DevTool, type Shared } from '@rspack/core';
2
2
  import { type Configuration as DevServerConfiguration } from '@rspack/dev-server';
3
3
  import { type PluginOptions as ReactCompilerOptions } from 'babel-plugin-react-compiler';
4
+ import type webpackNodeExternals from 'webpack-node-externals';
4
5
  /**
5
6
  * Конфигурация arui-scripts, которая может быть переопределена приложением
6
7
  */
@@ -86,6 +87,7 @@ export type AppConfigs = {
86
87
  options?: ModuleConfigBase;
87
88
  shareScope?: string;
88
89
  } | null;
90
+ nodeExternals?: Omit<webpackNodeExternals.Options, 'allowlist'>;
89
91
  };
90
92
  export type ModuleConfigBase = {
91
93
  cssPrefix?: false | string;
@@ -59,12 +59,7 @@ const createServerConfig = (mode) => ({
59
59
  cache: mode === 'dev',
60
60
  externalsPresets: { node: true },
61
61
  externals: [
62
- (0, webpack_node_externals_1.default)({
63
- allowlist: server_externals_exemptions_1.serverExternalsExemptions,
64
- // we cannot determine node_modules location before arui-scripts installation, so just load
65
- // dependencies list from package.json
66
- modulesFromFile: true,
67
- }),
62
+ (0, webpack_node_externals_1.default)(Object.assign(Object.assign({}, app_configs_1.configs.nodeExternals), { allowlist: server_externals_exemptions_1.serverExternalsExemptions })),
68
63
  ],
69
64
  optimization: {
70
65
  minimize: false,
package/build/index.d.ts CHANGED
@@ -3,3 +3,4 @@ export type { AppConfigs, PackageSettings } from './configs/app-configs/types';
3
3
  export { prepareFilesForDocker } from './commands/util/docker-build';
4
4
  export { getBuildParamsFromArgs } from './commands/util/docker-build';
5
5
  export { getDockerBuildCommand } from './commands/util/docker-build';
6
+ export { patchMainWebpackConfigForModules } from './configs/modules';
package/build/index.js CHANGED
@@ -1,9 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDockerBuildCommand = exports.getBuildParamsFromArgs = exports.prepareFilesForDocker = void 0;
3
+ exports.patchMainWebpackConfigForModules = exports.getDockerBuildCommand = exports.getBuildParamsFromArgs = exports.prepareFilesForDocker = void 0;
4
4
  var docker_build_1 = require("./commands/util/docker-build");
5
5
  Object.defineProperty(exports, "prepareFilesForDocker", { enumerable: true, get: function () { return docker_build_1.prepareFilesForDocker; } });
6
6
  var docker_build_2 = require("./commands/util/docker-build");
7
7
  Object.defineProperty(exports, "getBuildParamsFromArgs", { enumerable: true, get: function () { return docker_build_2.getBuildParamsFromArgs; } });
8
8
  var docker_build_3 = require("./commands/util/docker-build");
9
9
  Object.defineProperty(exports, "getDockerBuildCommand", { enumerable: true, get: function () { return docker_build_3.getDockerBuildCommand; } });
10
+ var modules_1 = require("./configs/modules");
11
+ Object.defineProperty(exports, "patchMainWebpackConfigForModules", { enumerable: true, get: function () { return modules_1.patchMainWebpackConfigForModules; } });
package/docs/settings.md CHANGED
@@ -279,6 +279,11 @@ const packageSettings = {
279
279
  Выключает проверку типов вебпаком во время разработки. По умолчанию `true`.
280
280
  Вместо этого будет запускаться отдельный процесс `tsc`, который будет выдавать сообщения об ошибках в типах только в консоль.
281
281
 
282
+ #### nodeExternals
283
+ Настройки для `webpack-node-externals`, см. [документацию](https://www.npmjs.com/package/webpack-node-externals). По умолчанию `{ modulesFromFile: true }`.
284
+
285
+ `allowlist` настраивается через систему [оверайдов](overrides.md), свойство `serverExternalsExemptions`
286
+
282
287
  ### Обработка изображений
283
288
  #### dataUrlMaxSize
284
289
  Ресурсы, не превышающие данный размер (в байтах), будут включены в исходники `inline`, иначе вынесены в отдельный файл. По умолчанию `1536`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arui-scripts",
3
- "version": "22.1.1",
3
+ "version": "22.3.0",
4
4
  "main": "./build/index.js",
5
5
  "typings": "./build/index.d.ts",
6
6
  "exports": {