@servicetitan/docs-uikit 26.0.2 → 26.2.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.
@@ -0,0 +1,52 @@
1
+ ---
2
+ title: BREAKING CHANGES
3
+ ---
4
+
5
+ ## v26.0.0
6
+
7
+ ### [@servicetitan/startup](./startup)
8
+
9
+ - Upgraded **webpack-dev-server** from v3 to v5, which introduces many breaking changes to the configuration settings.
10
+ For a complete list see [v4 migration guide](https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md) and [v5 migration guide](https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md). Some common issues are:
11
+ - **contentBase** and **watchContentBase** were removed; use **static**
12
+ - **disableHostCheck** was removed; use `allowedHosts: 'all'`
13
+ - **hotOnly** was removed; use `hot: 'only'`
14
+ - **http2** and **https** were removed; use **server**
15
+ - **injectClient** and **injectHot** were removed in favor of manual setup entries
16
+ - **inline** was removed without replacement
17
+ - **proxy** only accepts an array
18
+ - **publicPath**, **stats** and **writeToDisk** were moved to **devMiddleware**
19
+
20
+
21
+ ## v25.0.0
22
+
23
+ ### [@servicetitan/ajax-handlers](./ajax-handlers)
24
+
25
+ - Changed [**withMicroservice**](./ajax-handlers#parameters) arguments to a single options object.
26
+
27
+ ## v24.0.0
28
+
29
+ ### [@servicetitan/startup](./startup)
30
+
31
+ - Upgraded **Typescript** from v4 to v5, which adds correctness improvements that will reveal previously undetected ambiguities. In particular,
32
+ - Type checks for enums are stricter because all **enum** values get their own type
33
+ - **string** and **boolean** values aren't implicitly converted to numbers. Use the `+` operator to explicitly convert values to numbers in mathematical expressions. (e.g., `return +str > 42;`)
34
+
35
+ See [this blogpost](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/) for the complete list of changes.
36
+
37
+
38
+ ## v23.0.0
39
+
40
+ ### [@servicetitan/eslint-config](./eslint-config)
41
+
42
+ - Upgraded **@typescript-eslint/eslint-plugin** from version v5.x to v6. Because every new major version includes improvements and changes to existing rules, expect to see new lint errors in your project.
43
+
44
+ ### [@servicetitan/react-ioc](./react-ioc/)
45
+
46
+ - Changed second argument of **provide** method to an object with **loadingFallback** and **errorFallback** properties.
47
+ - Renamed the **fallback** property of the **Provider** component to **loadingFallback** and added **errorFallback** property.
48
+ - Removed ability to use **useValue** with **instances**.
49
+
50
+ ### [@servicetitan/startup](./startup)
51
+
52
+ - Upgraded **Jest** from version v27 to v29. The largest breaking change is that v29 changed the default snapshot format.<br/>To update old snapshots, run `npm run test -- --updateSnapshot`. See [Upgrading from v27 to v28](https://jest-archive-august-2023.netlify.app/docs/28.x/upgrading-to-jest28) and [Upgrading from v28 to v29](https://jestjs.io/docs/upgrading-to-jest29) for detailed lists of all breaking changes.
@@ -2,16 +2,7 @@
2
2
  title: AJAX Handlers
3
3
  ---
4
4
 
5
- import Admonition from '@theme/Admonition';
6
- import { VersionHistory, Changes } from '@site/src/components/version-history';
7
-
8
- <VersionHistory>
9
- <Changes forVersion="v25.0.0">
10
- <Admonition type="caution" title="Breaking changes">
11
- Changed <code>withMicroservice</code> to accept a single options argument.
12
- </Admonition>
13
- </Changes>
14
- </VersionHistory>
5
+ #### [CHANGELOG (@servicetitan/ajax-handlers)](https://github.com/servicetitan/uikit/blob/master/packages/ajax-handlers/CHANGELOG.md)
15
6
 
16
7
  ## withMicroservice
17
8
 
@@ -2,6 +2,8 @@
2
2
  title: Component Usage
3
3
  ---
4
4
 
5
+ #### [CHANGELOG (@servicetitan/component-usage)](https://github.com/servicetitan/uikit/blob/master/packages/component-usage/CHANGELOG.md)
6
+
5
7
  `@servicetitan/component-usage` will calculate and publish metrics on the app's component usage. The packages which we report on are currently hard-coded to [this list](https://github.com/servicetitan/uikit/blob/master/packages/component-usage/src/index.ts#L40-L64)
6
8
 
7
9
  ## Usage
@@ -2,6 +2,8 @@
2
2
  title: Error Boundary
3
3
  ---
4
4
 
5
+ #### [CHANGELOG (@servicetitan/error-boundary)](https://github.com/servicetitan/uikit/blob/master/packages/error-boundary/CHANGELOG.md)
6
+
5
7
  `@servicetitan/error-boundary` is an implementation of React error boundary mechanism. More info about error boundaries can be found in React [docs](https://reactjs.org/docs/error-boundaries.html).
6
8
 
7
9
  ## Usage
@@ -2,21 +2,18 @@
2
2
  title: ESLint & Stylelint configurations
3
3
  ---
4
4
 
5
- import Admonition from '@theme/Admonition';
6
- import { VersionHistory, Changes } from '@site/src/components/version-history';
5
+ <h4>
6
+ <a href="https://github.com/servicetitan/uikit/blob/master/packages/eslint-config/CHANGELOG.md">
7
+ CHANGELOG (@servicetitan/eslint-config)
8
+ </a>
9
+ <br />
10
+ <a href="https://github.com/servicetitan/uikit/blob/master/packages/stylelint-config/CHANGELOG.md">
11
+ CHANGELOG (@servicetitan/stylelint-config)
12
+ </a>
13
+ </h4>
7
14
 
8
15
  `@servicetitan/eslint-config` and `@servicetitan/stylelint-config` packages contain core lint rule sets which should be used in ServiceTitan web projects.
9
16
 
10
- <VersionHistory>
11
- <Changes forVersion="23.0.0">
12
- <Admonition type="caution">
13
- Upgrades <code>@typescript-eslint/eslint-plugin</code> from version v5.x to v6. Because
14
- every new major version of <code>typescript-eslint</code> includes improvements and
15
- changes to existing rules, expect to see new lint errors in your project.
16
- </Admonition>
17
- </Changes>
18
- </VersionHistory>
19
-
20
17
  ## Usage
21
18
 
22
19
  ### ESLint
@@ -2,6 +2,16 @@
2
2
  title: Folder Schema
3
3
  ---
4
4
 
5
+ <h4>
6
+ <a href="https://github.com/servicetitan/uikit/blob/master/packages/eslint-plugin-folder-schema/CHANGELOG.md">
7
+ CHANGELOG (@servicetitan/eslint-plugin-folder-schema)
8
+ </a>
9
+ <br />
10
+ <a href="https://github.com/servicetitan/uikit/blob/master/packages/folder-lint/CHANGELOG.md">
11
+ CHANGELOG (@servicetitan/folder-lint)
12
+ </a>
13
+ </h4>
14
+
5
15
  Folder schema is a flexible tool to configure a strict hierarchy of files in your project with verification by `eslint`. It consists of `@servicetitan/eslint-plugin-folder-schema` and `@servicetitan/folder-lint` packages.
6
16
 
7
17
  ## @servicetitan/eslint-plugin-folder-schema
@@ -2,6 +2,8 @@
2
2
  title: React-Knockout Bridge
3
3
  ---
4
4
 
5
+ #### [CHANGELOG (@servicetitan/ko-bridge)](https://github.com/servicetitan/uikit/blob/master/packages/ko-bridge/CHANGELOG.md)
6
+
5
7
  `@servicetitan/ko-bridge` is a collection of components and utils to connect `Knockout` and `React` codebase.
6
8
 
7
9
  ## When to use?
@@ -2,6 +2,8 @@
2
2
  title: Lazy Module
3
3
  ---
4
4
 
5
+ #### [CHANGELOG (@servicetitan/lazy-module)](https://github.com/servicetitan/uikit/blob/master/packages/lazy-module/CHANGELOG.md)
6
+
5
7
  In the terminology of our desktop frontend "module" is an independent business area of the application with ownership by some squad, for example, we have accounting, memberships, reporting, dispatch and other very important modules that desktop SPA consists of. Clearly, when ST users are opening desktop app they don't need all those modules loaded right away because typically they use a subset of app functionality to perform their job duties.
6
8
 
7
9
  `@servicetitan/lazy-module` is a wrapper around React Suspense mechanism to enable module-level code splitting for better web page loading performance.
@@ -2,6 +2,8 @@
2
2
  title: Log Service
3
3
  ---
4
4
 
5
+ #### [CHANGELOG (@servicetitan/log-service)](https://github.com/servicetitan/uikit/blob/master/packages/log-service/CHANGELOG.md)
6
+
5
7
  `@servicetitan/log-service` is used in the Monolith to send events to Kibana logs via the backend log service.
6
8
 
7
9
  ## Usage
@@ -2,29 +2,9 @@
2
2
  title: React IoC
3
3
  ---
4
4
 
5
- `@servicetitan/react-ioc` is an implementation of [InversifyJS](https://github.com/inversify/InversifyJS) for react applications, it uses Context API of React 16 to manage containers.
5
+ #### [CHANGELOG (@servicetitan/react-ioc)](https://github.com/servicetitan/uikit/blob/master/packages/react-ioc/CHANGELOG.md)
6
6
 
7
- import Admonition from '@theme/Admonition';
8
- import { VersionHistory, Changes } from '@site/src/components/version-history';
9
-
10
- <VersionHistory>
11
- <Changes forVersion="v23.0.0">
12
- <Admonition type="caution" title="Breaking changes">
13
- <p>
14
- Changed second argument of <code>provide</code> method to an object with
15
- <code>loadingFallback</code> and <code>errorFallback</code> properties.
16
- </p>
17
- <p>
18
- Renamed <code>fallback</code> property of the <code>Provider</code> component to{' '}
19
- <code>loadingFallback</code> and added <code>errorFallback</code> property.
20
- </p>
21
- <p>
22
- Removed ability to use <code>useValue</code> with <code>instances</code>.
23
- </p>
24
- </Admonition>
25
- See <a href="https://github.com/servicetitan/uikit/releases/tag/v23.0.0">Release Notes</a>
26
- </Changes>
27
- </VersionHistory>
7
+ `@servicetitan/react-ioc` is an implementation of [InversifyJS](https://github.com/inversify/InversifyJS) for react applications, it uses Context API of React 16 to manage containers.
28
8
 
29
9
  ## Features
30
10
 
package/docs/startup.mdx CHANGED
@@ -2,129 +2,10 @@
2
2
  title: Startup
3
3
  ---
4
4
 
5
- import Admonition from '@theme/Admonition';
6
- import { VersionHistory, Changes } from '@site/src/components/version-history';
5
+ #### [CHANGELOG (@servicetitan/startup)](https://github.com/servicetitan/uikit/blob/master/packages/startup/CHANGELOG.md)
7
6
 
8
7
  [@servicetitan/startup](https://github.com/servicetitan/uikit/tree/master/packages/startup) is a command-line interface (CLI) to create multi-package Lerna projects with the support of TypeScript Project References and React. It offers a modern build setup with no configuration.
9
8
 
10
- <VersionHistory>
11
- <Changes forVersion="26.0.0">
12
- <Admonition type="caution">
13
- Upgraded <code>webpack-dev-server</code> from v3 to v5.
14
- Version 5 introduces many breaking changes to the <code>webpack-dev-server</code> configuration.
15
- For a complete list see the <a href="https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md">v4</a> and <a href="https://github.com/webpack/webpack-dev-server/blob/master/migration-v5.md">v5</a> migration guides.
16
- Some common issues are:
17
- <ul>
18
- <li><strong>contentBase</strong> and <strong>watchContentBase</strong> were removed; use <strong>static</strong></li>
19
- <li><strong>disableHostCheck</strong> was removed; use <code>allowedHosts: 'all'</code></li>
20
- <li><strong>hotOnly</strong> was removed; use <code>hot: 'only'</code></li>
21
- <li><strong>http2</strong> and <strong>https</strong> were removed; use <strong>server</strong></li>
22
- <li><strong>injectClient</strong> and <strong>injectHot</strong> were removed in favor of manual setup entries</li>
23
- <li><strong>inline</strong> was removed without replacement</li>
24
- <li><strong>proxy</strong> only accepts an array</li>
25
- <li><strong>publicPath</strong>, <strong>stats</strong> and <strong>writeToDisk</strong> were moved to <strong>devMiddleware</strong></li>
26
- </ul>
27
- </Admonition>
28
- </Changes>
29
- <Changes forVersion="24.1.0">
30
- Changed <code>init</code> command to generate React 18 project by default
31
- and added <code>--react17</code> switch to generate React 17 project.
32
- </Changes>
33
- <Changes forVersion="24.0.0">
34
- <Admonition type="caution">
35
- <p>
36
- Upgraded <code>Typescript</code> from v4 to v5.
37
- Version 5 adds correctness improvements that will reveal
38
- previously undetected ambiguities. In particular,
39
- </p>
40
- <ul>
41
- <li>Type checks for enums are stricter because all enum values get their own type</li>
42
- <li>String and boolean values aren't implicitly converted to numbers.
43
- Use the <code>+</code> operator to explicitly convert values to numbers in mathematical expressions.
44
- (e.g., <code>return +str &gt; 42;</code>)</li>
45
- </ul>
46
- <p>See <a href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/">this blogpost</a> for the complete list of changes.</p>
47
- </Admonition>
48
- </Changes>
49
- <Changes forVersion="23.0.0">
50
- <Admonition type="caution">
51
- Upgraded <code>Jest</code> from version v27.x to v29.
52
- The largest breaking change is that v29 changed the default snapshot format.
53
- To update old snapshots, run <code>npm run test -- --updateSnapshot</code>.
54
- <br/>
55
- See <a href="https://jest-archive-august-2023.netlify.app/docs/28.x/upgrading-to-jest28">Upgrading from v27 to v28</a> and <a href="https://jestjs.io/docs/upgrading-to-jest29">Upgrading from v28 to v29</a> for a list changes.
56
- </Admonition>
57
- Added <code>--code-coverage</code> option to <code>build</code> command
58
- </Changes>
59
- <Changes forVersion="22.20.0">
60
- Added <code>--experimental-bundlers</code> option to <code>build</code> command
61
- </Changes>
62
- <Changes forVersion="22.19.0">
63
- Added <code>--registry</code> option to <code>mfe-publish</code> command
64
- </Changes>
65
- <Changes forVersion="22.18.0">
66
- Fixed issue where <code>startup init</code> failed to create new project
67
- </Changes>
68
- <Changes forVersion="22.17.0">
69
- Fixed issue where <code>startup</code> exits with success code when command fails
70
- </Changes>
71
- <Changes forVersion="v22.16.0">
72
- <Admonition type="warning" title="Deprecated">
73
- This version contains a critical bug that was introduced in v22.15.0 and fixed in v22.17.0. Update to v22.17.0 or later as soon as possible.
74
- </Admonition>
75
- Added @servicetitan/testing-library to the <code>startup init</code> template
76
- </Changes>
77
- <Changes forVersion="v22.15.0">
78
- <Admonition type="warning" title="Deprecated">
79
- This version contains a critical bug that was introduced in v22.15.0 and fixed in v22.17.0. Update to v22.17.0 or later as soon as possible.
80
- </Admonition>
81
- Runs all commands with 8GB of memory by default.
82
- </Changes>
83
- <Changes forVersion="v22.11.0">
84
- Added <code>install</code> command that replaces legacy bootstrap.js
85
- and changed <code>init</code> template to use it.
86
- </Changes>
87
- <Changes forVersion="v22.9.0">
88
- Changed <code>build</code> command to automatically register Kendo UI licence
89
- and added <code>kendo-ui-license</code> command to manually register Kendo UI license.
90
- </Changes>
91
- <Changes forVersion="v22.7.0">
92
- <p>MFEs now support providing custom webpack configuration too! Create <code>webpack.dev.config.js</code> and/or <code>webpack.prod.config.js</code> for development and production modes respectively.
93
- Put these config files at the level of your app folder (usually, <code>packages/application</code>) instead of the root directory of your repo.</p>
94
- <Admonition type="caution" title="Caution">
95
- You cannot use the <code>createWebpackConfig</code> function in an MFE custom webpack config file at the time of writing. You'll get an error.
96
- </Admonition>
97
- </Changes>
98
- <Changes forVersion="v22.3.0">
99
- The <code>--stat</code> argument of the <code>build</code> command now works for MFEs too.
100
- </Changes>
101
- <Changes forVersion="v22.2.1">
102
- <p>
103
- <code>mfe-publish</code> command is added with 2 arguments to clean up (unpublish)
104
- published MFE packages and 7 more arguments to publish MFEs.
105
- </p>
106
- <Admonition type="note" title="Note">
107
- The <code>noTag</code> argument is not used at the moment of writing.
108
- </Admonition>
109
- <span>
110
- Two more auxiliary commands (shortcuts) are also added: <code>mfe-package-clean</code>{' '}
111
- and <code>mfe-package-publish</code>.
112
- </span>
113
- </Changes>
114
- <Changes forVersion="v22.0.4">
115
- <code>stat</code> argument is added for the <code>build</code> command. It enables
116
- webpack-bundle-analyzer and generates a bundle report. Examples of usage:{' '}
117
- <code>startup build --stat</code>
118
- </Changes>
119
- <Changes forVersion="v21.3.1">
120
- Both <code>start</code> and <code>build</code> commands accept <code>esbuild</code> argument
121
- to enable the esbuild loader. Starting this version it works both for development and
122
- production. Examples of usage: <code>startup start --esbuild</code>,{' '}
123
- <code>startup build --esbuild</code>
124
- </Changes>
125
-
126
- </VersionHistory>
127
-
128
9
  ## Why use this package?
129
10
 
130
11
  #### Less to learn
@@ -285,12 +166,12 @@ This project supports [CSS Modules](https://github.com/css-modules/css-modules)
285
166
 
286
167
  ## SVG Transformation
287
168
 
288
- <Admonition type="note">
289
- Type definitions are provided for the various ways of importing SVGs via the base tsconfig's{' '}
290
- <code>"files"</code> property within <code>startup</code>. If you override the{' '}
291
- <code>"files"</code> property within your tsconfig, you may lose access to these type
292
- definitions, and will need to add them manually.
293
- </Admonition>
169
+ :::caution
170
+ Type definitions are provided for the various ways of importing SVGs via the base tsconfig's
171
+ `"files"` property within `startup`. If you override the `"files"` property
172
+ within your tsconfig, you may lose access to these type definitions, and will need to add them
173
+ manually.
174
+ :::
294
175
 
295
176
  By default, SVGs are loaded as assets. Depending on the file size, the asset is converted to a base64 URI string, or emitted as separate file.
296
177
 
@@ -422,6 +303,32 @@ Set `web-component` to `true` to create the support files and `light` and `full`
422
303
 
423
304
  See [MFE configuration](/docs/frontend/micro-frontends/#mfe-configuration) for detailed instructions on configuring MFE applications.
424
305
 
306
+ ##### Minification
307
+
308
+ By default `startup` configures webpack to minify production bundles conservatively,
309
+ so that projects gain the benefits of reduced bundle sizes while retaining the highest
310
+ fidelity for source map debugging.
311
+
312
+ Set `minify.js` to `false` to prevent webpack from minifying a package.
313
+
314
+ To override the default [Terser](https://github.com/terser/terser) plugin configuration,
315
+ set `minify.js` to an object containing [`terserOptions`](https://webpack.js.org/plugins/terser-webpack-plugin/#terseroptions).
316
+ E.g.,
317
+
318
+ ```json title="package.json"
319
+ {
320
+ "cli": {
321
+ "webpack": {
322
+ "minify": {
323
+ "js": {
324
+ // terser-webpack-plugin options
325
+ }
326
+ }
327
+ }
328
+ }
329
+ }
330
+ ```
331
+
425
332
  ##### Application Port
426
333
 
427
334
  Use `port` to set the port that `webpack-dev-server` uses for the application. E.g.,
@@ -2,31 +2,7 @@
2
2
  title: Web Components
3
3
  ---
4
4
 
5
- import Admonition from '@theme/Admonition';
6
- import { VersionHistory, Changes } from '@site/src/components/version-history';
7
-
8
- <VersionHistory>
9
- <Changes forVersion="v22.21.1">
10
- Fixed a bug where the `Loader` component would error if an MFE's metadata.json contains a
11
- dependency of `web-components` with a version that is a semver range.
12
- </Changes>
13
- <Changes forVersion="v22.21.0">
14
- <Admonition type="warning" title="Deprecated">
15
- This version contains a critical bug that was introduced in v22.21.0 and fixed in
16
- v22.21.1. Update to v22.21.1 or later as soon as possible.
17
- </Admonition>
18
- Provided a more guaranteed check for an MFE's ability to re-render when passed MFE data changes.
19
- Added context for MFEMetadata, which includes the shadowDom and portalShadowDom.
20
- </Changes>
21
- <Changes forVersion="v22.16.0">Fixed Loader memory leaks.</Changes>
22
- <Changes forVersion="v22.12.0">
23
- Support updating props passed to MFE via Loader. Added context for accessing MFEData.
24
- </Changes>
25
- <Changes forVersion="v22.7.0">
26
- Fixed disposing MFE when parent element has moved in DOM.
27
- </Changes>
28
- <Changes forVersion="v22.1.0">Added EventBus support for sending payload with events.</Changes>
29
- </VersionHistory>
5
+ #### [CHANGELOG (@servicetitan/web-components)](https://github.com/servicetitan/uikit/blob/master/packages/web-components/CHANGELOG.md)
30
6
 
31
7
  `@servicetitan/web-components` is used to build, register, and load Microfrontends (MFEs) into host applications.
32
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/docs-uikit",
3
- "version": "26.0.2",
3
+ "version": "26.2.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -16,5 +16,5 @@
16
16
  "cli": {
17
17
  "webpack": false
18
18
  },
19
- "gitHead": "64dcb81cade9e43a01e074c86e98584486b1e317"
19
+ "gitHead": "db962a72024497a2c475d3bbf9aab5f9c7aae223"
20
20
  }