@gravity-ui/app-builder 0.12.1 → 0.13.1

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,3 +1,3 @@
1
1
  import WebpackDevServer from 'webpack-dev-server';
2
2
  import type { NormalizedServiceConfig } from '../../common/models';
3
- export declare function watchClientCompilation(config: NormalizedServiceConfig, onManifestReady: () => void): Promise<WebpackDevServer>;
3
+ export declare function watchClientCompilation(config: NormalizedServiceConfig, onManifestReady: () => void): Promise<WebpackDevServer<import("express").Application, import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>>>;
@@ -186,7 +186,7 @@ async function normalizeClientConfig(client, mode) {
186
186
  forkTsChecker: client.disableForkTsChecker ? false : client.forkTsChecker,
187
187
  reactRefresh: client.disableReactRefresh
188
188
  ? false
189
- : client.reactRefresh ?? ((options) => options),
189
+ : (client.reactRefresh ?? ((options) => options)),
190
190
  newJsxTransform: client.newJsxTransform ?? true,
191
191
  publicPathPrefix: client.publicPathPrefix || '',
192
192
  modules: client.modules && remapPaths(client.modules),
@@ -127,8 +127,8 @@ function configureDevTool({ isEnvProduction, config }) {
127
127
  function configureWatchOptions({ config }) {
128
128
  const watchOptions = {
129
129
  ...config.watchOptions,
130
- followSymlinks: config.watchOptions?.followSymlinks ??
131
- (!config.symlinks && config.watchOptions?.watchPackages)
130
+ followSymlinks: (config.watchOptions?.followSymlinks ??
131
+ (!config.symlinks && config.watchOptions?.watchPackages))
132
132
  ? true
133
133
  : undefined,
134
134
  };
@@ -308,22 +308,23 @@ function createWorkerRule(options) {
308
308
  };
309
309
  }
310
310
  function createSassStylesRule(options) {
311
- const loaders = getCssLoaders(options);
312
- loaders.push({
313
- loader: require.resolve('resolve-url-loader'),
314
- options: {
315
- sourceMap: !options.config.disableSourceMapGeneration,
311
+ const loaders = getCssLoaders(options, [
312
+ {
313
+ loader: require.resolve('resolve-url-loader'),
314
+ options: {
315
+ sourceMap: !options.config.disableSourceMapGeneration,
316
+ },
316
317
  },
317
- });
318
- loaders.push({
319
- loader: require.resolve('sass-loader'),
320
- options: {
321
- sourceMap: true, // must be always true for work with resolve-url-loader
322
- sassOptions: {
323
- includePaths: [paths_1.default.appClient],
318
+ {
319
+ loader: require.resolve('sass-loader'),
320
+ options: {
321
+ sourceMap: true, // must be always true for work with resolve-url-loader
322
+ sassOptions: {
323
+ loadPaths: [paths_1.default.appClient],
324
+ },
324
325
  },
325
326
  },
326
- });
327
+ ]);
327
328
  return {
328
329
  test: /\.scss$/,
329
330
  sideEffects: options.isEnvProduction ? true : undefined,
@@ -338,22 +339,32 @@ function createStylesRule(options) {
338
339
  use: loaders,
339
340
  };
340
341
  }
341
- function getCssLoaders({ isEnvDevelopment, isEnvProduction, config }) {
342
+ function getCssLoaders({ isEnvDevelopment, isEnvProduction, config }, additionalRules) {
342
343
  const loaders = [];
343
- if (isEnvProduction) {
344
- loaders.push(mini_css_extract_plugin_1.default.loader);
345
- }
346
- if (isEnvDevelopment) {
344
+ if (!config.transformCssWithLightningCss) {
347
345
  loaders.push({
348
- loader: require.resolve('style-loader'),
346
+ loader: require.resolve('postcss-loader'),
347
+ options: {
348
+ sourceMap: !config.disableSourceMapGeneration,
349
+ postcssOptions: {
350
+ config: false,
351
+ plugins: [
352
+ [require.resolve('postcss-preset-env'), { enableClientSidePolyfills: false }],
353
+ ],
354
+ },
355
+ },
349
356
  });
350
357
  }
351
- loaders.push({
358
+ if (Array.isArray(additionalRules) && additionalRules.length > 0) {
359
+ loaders.push(...additionalRules);
360
+ }
361
+ const importLoaders = loaders.length;
362
+ loaders.unshift({
352
363
  loader: require.resolve('css-loader'),
353
364
  options: {
354
365
  esModule: false,
355
366
  sourceMap: !config.disableSourceMapGeneration,
356
- importLoaders: 2,
367
+ importLoaders,
357
368
  modules: {
358
369
  auto: true,
359
370
  localIdentName: '[name]__[local]--[hash:base64:5]',
@@ -361,18 +372,12 @@ function getCssLoaders({ isEnvDevelopment, isEnvProduction, config }) {
361
372
  },
362
373
  },
363
374
  });
364
- if (!config.transformCssWithLightningCss) {
365
- loaders.push({
366
- loader: require.resolve('postcss-loader'),
367
- options: {
368
- sourceMap: !config.disableSourceMapGeneration,
369
- postcssOptions: {
370
- config: false,
371
- plugins: [
372
- [require.resolve('postcss-preset-env'), { enableClientSidePolyfills: false }],
373
- ],
374
- },
375
- },
375
+ if (isEnvProduction) {
376
+ loaders.unshift(mini_css_extract_plugin_1.default.loader);
377
+ }
378
+ if (isEnvDevelopment) {
379
+ loaders.unshift({
380
+ loader: require.resolve('style-loader'),
376
381
  });
377
382
  }
378
383
  return loaders;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.12.1",
3
+ "version": "0.13.1",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -58,28 +58,28 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@aws-sdk/client-s3": "^3.353.0",
61
- "@babel/core": "^7.24.0",
62
- "@babel/helper-plugin-utils": "^7.24.0",
63
- "@babel/plugin-transform-class-properties": "^7.24.0",
64
- "@babel/plugin-transform-dynamic-import": "^7.24.0",
65
- "@babel/plugin-transform-modules-commonjs": "^7.24.0",
66
- "@babel/plugin-transform-private-methods": "^7.24.0",
67
- "@babel/plugin-transform-runtime": "^7.24.0",
68
- "@babel/preset-env": "^7.24.0",
69
- "@babel/preset-react": "^7.24.0",
70
- "@babel/preset-typescript": "^7.24.0",
71
- "@babel/runtime": "^7.24.0",
61
+ "@babel/core": "^7.25.0",
62
+ "@babel/helper-plugin-utils": "^7.25.0",
63
+ "@babel/plugin-transform-class-properties": "^7.25.0",
64
+ "@babel/plugin-transform-dynamic-import": "^7.25.0",
65
+ "@babel/plugin-transform-modules-commonjs": "^7.25.0",
66
+ "@babel/plugin-transform-private-methods": "^7.25.0",
67
+ "@babel/plugin-transform-runtime": "^7.25.0",
68
+ "@babel/preset-env": "^7.25.0",
69
+ "@babel/preset-react": "^7.25.0",
70
+ "@babel/preset-typescript": "^7.25.0",
71
+ "@babel/runtime": "^7.25.0",
72
72
  "@okikio/sharedworker": "^1.0.7",
73
73
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.15",
74
74
  "@statoscope/webpack-plugin": "^5.28.2",
75
75
  "@svgr/core": "^8.1.0",
76
76
  "@svgr/plugin-jsx": "^8.1.0",
77
77
  "@svgr/webpack": "^8.1.0",
78
- "babel-loader": "^9.1.3",
78
+ "babel-loader": "^9.2.1",
79
79
  "babel-plugin-import": "^1.13.8",
80
80
  "babel-plugin-inline-react-svg": "^2.0.2",
81
81
  "babel-plugin-transform-react-remove-prop-types": "^0.4.24",
82
- "browserslist": "^4.23.0",
82
+ "browserslist": "^4.24.0",
83
83
  "chalk": "^4.1.2",
84
84
  "circular-dependency-plugin": "^5.2.2",
85
85
  "clean-webpack-plugin": "^4.0.0",
@@ -91,20 +91,20 @@
91
91
  "dotenv": "^16.4.5",
92
92
  "execa": "^8.0.1",
93
93
  "fast-glob": "^3.3.2",
94
- "file-type": "^19.0.0",
94
+ "file-type": "^19.5.0",
95
95
  "find-cache-dir": "^5.0.0",
96
96
  "fork-ts-checker-webpack-plugin": "^9.0.2",
97
97
  "fs-extra": "^11.2.0",
98
98
  "get-port": "^7.1.0",
99
99
  "lodash": "^4.17.21",
100
100
  "mime-types": "^2.1.35",
101
- "mini-css-extract-plugin": "^2.9.0",
101
+ "mini-css-extract-plugin": "^2.9.1",
102
102
  "moment-timezone-data-webpack-plugin": "^1.5.1",
103
103
  "nodemon": "^3.1.0",
104
104
  "p-map": "^7.0.2",
105
105
  "p-queue": "^8.0.1",
106
106
  "pino-pretty": "^11.2.0",
107
- "postcss": "^8.4.38",
107
+ "postcss": "^8.4.47",
108
108
  "postcss-loader": "^8.1.1",
109
109
  "postcss-preset-env": "^9.1.3",
110
110
  "react": "^18.3.1",
@@ -112,9 +112,9 @@
112
112
  "react-refresh": "^0.14.2",
113
113
  "resolve-url-loader": "^5.0.0",
114
114
  "rimraf": "^5.0.7",
115
- "sass": "^1.77.5",
116
- "sass-loader": "^14.2.1",
117
- "semver": "^7.6.2",
115
+ "sass": "^1.79.0",
116
+ "sass-loader": "^16.0.0",
117
+ "semver": "^7.6.3",
118
118
  "signal-exit": "^4.1.0",
119
119
  "source-map-loader": "^5.0.0",
120
120
  "strip-ansi": "^6.0.1",
@@ -123,18 +123,18 @@
123
123
  "terser-webpack-plugin": "5.3.10",
124
124
  "ts-node": "10.9.2",
125
125
  "tslib": "^2.6.2",
126
- "typescript": "~5.5.2",
127
- "webpack": "^5.92.0",
126
+ "typescript": "~5.6.0",
127
+ "webpack": "^5.95.0",
128
128
  "webpack-assets-manifest": "^5.2.1",
129
129
  "webpack-bundle-analyzer": "^4.10.2",
130
- "webpack-dev-server": "^5.0.4",
130
+ "webpack-dev-server": "^5.1.0",
131
131
  "webpack-manifest-plugin": "^5.0.0",
132
132
  "worker-loader": "^3.0.8",
133
133
  "yargs": "^17.7.2"
134
134
  },
135
135
  "devDependencies": {
136
- "@commitlint/cli": "^19.3.0",
137
- "@commitlint/config-conventional": "^19.2.2",
136
+ "@commitlint/cli": "^19.5.0",
137
+ "@commitlint/config-conventional": "^19.5.0",
138
138
  "@gravity-ui/eslint-config": "^3.2.0",
139
139
  "@gravity-ui/prettier-config": "^1.1.0",
140
140
  "@gravity-ui/tsconfig": "^1.0.0",
@@ -144,7 +144,7 @@
144
144
  "@types/common-tags": "^1.8.4",
145
145
  "@types/fs-extra": "^11.0.4",
146
146
  "@types/jest": "^29.5.2",
147
- "@types/lodash": "^4.17.6",
147
+ "@types/lodash": "^4.17.10",
148
148
  "@types/mime-types": "^2.1.4",
149
149
  "@types/node": "^18",
150
150
  "@types/nodemon": "^1.19.6",
@@ -155,13 +155,13 @@
155
155
  "@types/yargs": "17.0.11",
156
156
  "babel-plugin-tester": "^11.0.4",
157
157
  "eslint": "^8.57.0",
158
- "husky": "^9.0.11",
158
+ "husky": "^9.1.6",
159
159
  "jest": "^29.5.0",
160
- "lightningcss": "^1.21.5",
160
+ "lightningcss": "^1.27.0",
161
161
  "monaco-editor-webpack-plugin": "^6.0.0",
162
162
  "nano-staged": "^0.8.0",
163
163
  "npm-run-all": "^4.1.5",
164
- "prettier": "3.3.2",
164
+ "prettier": "3.3.3",
165
165
  "ts-jest": "^29.1.2"
166
166
  },
167
167
  "peerDependencies": {