@gravity-ui/app-builder 0.6.8 → 0.6.10

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.6.10](https://github.com/gravity-ui/app-builder/compare/v0.6.9...v0.6.10) (2023-09-22)
4
+
5
+
6
+ ### Features
7
+
8
+ * **build:** support sentry webpack plugin ([#80](https://github.com/gravity-ui/app-builder/issues/80)) ([d7932d8](https://github.com/gravity-ui/app-builder/commit/d7932d8d7df389aa4c7a0fbd30a3fe9fba0d1b8c))
9
+
10
+ ## [0.6.9](https://github.com/gravity-ui/app-builder/compare/v0.6.8...v0.6.9) (2023-09-18)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * pass correct version to semver ([#77](https://github.com/gravity-ui/app-builder/issues/77)) ([d3f8ed8](https://github.com/gravity-ui/app-builder/commit/d3f8ed8d210995d9d7325f6fd16f0e7e57193105))
16
+
3
17
  ## [0.6.8](https://github.com/gravity-ui/app-builder/compare/v0.6.7...v0.6.8) (2023-09-18)
4
18
 
5
19
 
package/README.md CHANGED
@@ -223,6 +223,7 @@ With this `{rootDir}/src/ui/tsconfig.json`:
223
223
  - `endpoint` (`string`) - cdn host to upload files
224
224
  - `compress` (`boolean`) - upload also gzip and brotli compressed versions of files
225
225
  - `additionalPattern` (`string[]`) — patterns for uploading additional files. By default, only files generated by webpack are loaded.
226
+ - `sentryConfig` (`Options`) — `@sentry/webpack-plugin` [configuration options](https://www.npmjs.com/package/@sentry/webpack-plugin/v/2.7.1).
226
227
 
227
228
  ##### Optimization
228
229
 
@@ -8,6 +8,7 @@ import type { Options as CircularDependenciesOptions } from 'circular-dependency
8
8
  import type { Config as SvgrConfig } from '@svgr/core';
9
9
  import type { ForkTsCheckerWebpackPluginOptions } from 'fork-ts-checker-webpack-plugin/lib/plugin-options';
10
10
  import type { Options as StatoscopeOptions } from '@statoscope/webpack-plugin';
11
+ import type { SentryWebpackPluginOptions } from '@sentry/webpack-plugin';
11
12
  export interface Entities<T> {
12
13
  data: Record<string, T>;
13
14
  keys: string[];
@@ -169,6 +170,7 @@ export interface ClientConfig {
169
170
  cache?: boolean | FileCacheOptions | MemoryCacheOptions;
170
171
  /** Use [Lighting CSS](https://lightningcss.dev) to transform and minimize css instead of PostCSS and cssnano*/
171
172
  transformCssWithLightningCss?: boolean;
173
+ sentryConfig?: SentryWebpackPluginOptions;
172
174
  }
173
175
  interface CdnUploadConfig {
174
176
  bucket: string;
@@ -114,8 +114,8 @@ function createTransformPathsToLocalModules(ts) {
114
114
  }
115
115
  exports.createTransformPathsToLocalModules = createTransformPathsToLocalModules;
116
116
  function updateImportDeclaration(ts, node, context, resolvedPath) {
117
- if (semver.lt(ts.version, '5.0')) {
118
- // for versions before 5.0
117
+ if (semver.lt(ts.version, '5.0.0')) {
118
+ // for versions before 5.0.0
119
119
  return context.factory.updateImportDeclaration(node,
120
120
  // @ts-expect-error
121
121
  node.decorators, node.modifiers, node.importClause, context.factory.createStringLiteral(resolvedPath),
@@ -125,8 +125,8 @@ function updateImportDeclaration(ts, node, context, resolvedPath) {
125
125
  return context.factory.updateImportDeclaration(node, node.modifiers, node.importClause, context.factory.createStringLiteral(resolvedPath), node.assertClause);
126
126
  }
127
127
  function updateExportDeclaration(ts, node, context, resolvedPath) {
128
- if (semver.lt(ts.version, '5.0')) {
129
- // for versions before 5.0
128
+ if (semver.lt(ts.version, '5.0.0')) {
129
+ // for versions before 5.0.0
130
130
  return context.factory.updateExportDeclaration(node,
131
131
  // @ts-expect-error
132
132
  node.decorators, node.modifiers, node.isTypeOnly, node.exportClause, context.factory.createStringLiteral(resolvedPath),
@@ -136,8 +136,8 @@ function updateExportDeclaration(ts, node, context, resolvedPath) {
136
136
  return context.factory.updateExportDeclaration(node, node.modifiers, node.isTypeOnly, node.exportClause, context.factory.createStringLiteral(resolvedPath), node.assertClause);
137
137
  }
138
138
  function updateImportTypeNode(ts, node, context, resolvedPath) {
139
- if (semver.lt(ts.version, '5.0')) {
140
- // for versions before 5.0
139
+ if (semver.lt(ts.version, '5.0.0')) {
140
+ // for versions before 5.0.0
141
141
  return context.factory.updateImportTypeNode(node, context.factory.createLiteralTypeNode(context.factory.createStringLiteral(resolvedPath)),
142
142
  // @ts-expect-error
143
143
  node.qualifier, node.typeArguments, node.isTypeOf);
@@ -42,6 +42,7 @@ const react_refresh_webpack_plugin_1 = __importDefault(require("@pmmmwh/react-re
42
42
  const moment_timezone_data_webpack_plugin_1 = __importDefault(require("moment-timezone-data-webpack-plugin"));
43
43
  const webpack_plugin_1 = __importDefault(require("@statoscope/webpack-plugin"));
44
44
  const circular_dependency_plugin_1 = __importDefault(require("circular-dependency-plugin"));
45
+ const webpack_plugin_2 = require("@sentry/webpack-plugin");
45
46
  const paths_1 = __importDefault(require("../paths"));
46
47
  const tempData_1 = __importDefault(require("../tempData"));
47
48
  const babel_1 = require("../babel");
@@ -635,6 +636,9 @@ function configurePlugins(options) {
635
636
  chunkFilename: 'css/[name].[contenthash:8].chunk.css',
636
637
  ignoreOrder: true,
637
638
  }));
639
+ if (config.sentryConfig) {
640
+ plugins.push((0, webpack_plugin_2.sentryWebpackPlugin)({ ...config.sentryConfig }));
641
+ }
638
642
  if (config.analyzeBundle === 'true') {
639
643
  plugins.push(new webpack_bundle_analyzer_1.BundleAnalyzerPlugin({
640
644
  openAnalyzer: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/app-builder",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "description": "Develop and build your React client-server projects, powered by typescript and webpack",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -68,6 +68,7 @@
68
68
  "@babel/preset-typescript": "^7.22.0",
69
69
  "@babel/runtime": "^7.22.0",
70
70
  "@pmmmwh/react-refresh-webpack-plugin": "^0.5.11",
71
+ "@sentry/webpack-plugin": "^2.7.1",
71
72
  "@statoscope/webpack-plugin": "^5.27.0",
72
73
  "@svgr/core": "^8.1.0",
73
74
  "@svgr/plugin-jsx": "^8.1.0",