@servicetitan/docs-uikit 30.3.0 → 31.0.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.
@@ -2,71 +2,77 @@
2
2
  title: BREAKING CHANGES
3
3
  ---
4
4
 
5
+ ## v31.0.0
6
+
7
+ ### [@servicetitan/startup](./startup)
8
+
9
+ - Migrated to SWC for TypeScript compilation. See [Upgrading to @servicetitan/startup v31.x](/docs/frontend/upgrading-to-startup-v31) for guidance.
10
+
5
11
  ## v30.0.0
6
12
 
7
13
  ### [@servicetitan/startup](./startup)
8
14
 
9
- - Upgraded ESLint to v9.x and dropped support for legacy "eslintrc" configuration. See [Upgrading to ESLint v9.x](/docs/frontend/upgrading-to-eslint-v9) for guidance.
15
+ - Upgraded ESLint to v9.x and dropped support for legacy "eslintrc" configuration. See [Upgrading to ESLint v9.x](/docs/frontend/upgrading-to-eslint-v9) for guidance.
10
16
 
11
17
  ### [@servicetitan/eslint-config](./eslint-config)
12
18
 
13
- - Dropped support for legacy "eslintrc" configuration
19
+ - Dropped support for legacy "eslintrc" configuration
14
20
 
15
21
  ## v29.0.0
16
22
 
17
23
  ### [@servicetitan/startup](./startup)
18
24
 
19
- - Dropped support for Node 18.
20
- Update Github workflows and Docker containers to use Node v20 or later, and bump the `engines.node` property in package.json files to >=20 or >=22.
25
+ - Dropped support for Node 18.
26
+ Update Github workflows and Docker containers to use Node v20 or later, and bump the `engines.node` property in package.json files to >=20 or >=22.
21
27
 
22
- - Added safeguards to mfe-publish to avoid accidentally deleting production bundles
23
- - Changed `--clean` to never remove old versions that have a tag
24
- - Changed the default behavior of `--clean` to only remove old versions from the current branch. Use `--branch` to remove old versions from a different branch and use `--all` to remove old versions from all branches.
28
+ - Added safeguards to mfe-publish to avoid accidentally deleting production bundles
29
+ - Changed `--clean` to never remove old versions that have a tag
30
+ - Changed the default behavior of `--clean` to only remove old versions from the current branch. Use `--branch` to remove old versions from a different branch and use `--all` to remove old versions from all branches.
25
31
 
26
32
  ## v28.0.0
27
33
 
28
34
  ### [@servicetitan/startup](./startup)
29
35
 
30
- - Changed the default [moduleResolution](https://www.typescriptlang.org/tsconfig/#moduleResolution) from `node` to `bundler` to support importing from `@servicetitan/anvil2/token`. CommonJS packages that require the previous value must override `moduleResolution` in the package's `tsconfig.json`.
36
+ - Changed the default [moduleResolution](https://www.typescriptlang.org/tsconfig/#moduleResolution) from `node` to `bundler` to support importing from `@servicetitan/anvil2/token`. CommonJS packages that require the previous value must override `moduleResolution` in the package's `tsconfig.json`.
31
37
 
32
38
  ## v27.0.0
33
39
 
34
40
  ### [@servicetitan/startup](./startup)
35
41
 
36
- - Upgraded **prettier** from v2 to v3.
37
- Beside the usual formatting changes, the default value for [**trailingComma**](https://prettier.io/docs/en/options.html#trailing-commas) changed from "es5" to "all".
38
- To fix the issues, add `"trailingComma": "es5"` to the [prettier configuration](https://prettier.io/docs/en/configuration) then run `npx startup lint --fix` to fix new lint errors.
39
- To prevent specific files from being reformatted, add them to [**.prettierignore**](https://prettier.io/docs/en/ignore.html).
42
+ - Upgraded **prettier** from v2 to v3.
43
+ Beside the usual formatting changes, the default value for [**trailingComma**](https://prettier.io/docs/en/options.html#trailing-commas) changed from "es5" to "all".
44
+ To fix the issues, add `"trailingComma": "es5"` to the [prettier configuration](https://prettier.io/docs/en/configuration) then run `npx startup lint --fix` to fix new lint errors.
45
+ To prevent specific files from being reformatted, add them to [**.prettierignore**](https://prettier.io/docs/en/ignore.html).
40
46
 
41
47
  ## v26.0.0
42
48
 
43
49
  ### [@servicetitan/startup](./startup)
44
50
 
45
- - Upgraded **webpack-dev-server** from v3 to v5, which introduces many breaking changes to the configuration settings.
46
- 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:
47
- - **contentBase** and **watchContentBase** were removed; use **static**
48
- - **disableHostCheck** was removed; use `allowedHosts: 'all'`
49
- - **hotOnly** was removed; use `hot: 'only'`
50
- - **http2** and **https** were removed; use **server**
51
- - **injectClient** and **injectHot** were removed in favor of manual setup entries
52
- - **inline** was removed without replacement
53
- - **proxy** only accepts an array
54
- - **publicPath**, **stats** and **writeToDisk** were moved to **devMiddleware**
51
+ - Upgraded **webpack-dev-server** from v3 to v5, which introduces many breaking changes to the configuration settings.
52
+ 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:
53
+ - **contentBase** and **watchContentBase** were removed; use **static**
54
+ - **disableHostCheck** was removed; use `allowedHosts: 'all'`
55
+ - **hotOnly** was removed; use `hot: 'only'`
56
+ - **http2** and **https** were removed; use **server**
57
+ - **injectClient** and **injectHot** were removed in favor of manual setup entries
58
+ - **inline** was removed without replacement
59
+ - **proxy** only accepts an array
60
+ - **publicPath**, **stats** and **writeToDisk** were moved to **devMiddleware**
55
61
 
56
62
  ## v25.0.0
57
63
 
58
64
  ### [@servicetitan/ajax-handlers](./ajax-handlers)
59
65
 
60
- - Changed [**withMicroservice**](./ajax-handlers#parameters) arguments to a single options object.
66
+ - Changed [**withMicroservice**](./ajax-handlers#parameters) arguments to a single options object.
61
67
 
62
68
  ## v24.0.0
63
69
 
64
70
  ### [@servicetitan/startup](./startup)
65
71
 
66
- - Upgraded **Typescript** from v4 to v5, which adds correctness improvements that will reveal previously undetected ambiguities. In particular,
72
+ - Upgraded **Typescript** from v4 to v5, which adds correctness improvements that will reveal previously undetected ambiguities. In particular,
67
73
 
68
- - Type checks for enums are stricter because all **enum** values get their own type
69
- - **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;`)
74
+ - Type checks for enums are stricter because all **enum** values get their own type
75
+ - **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;`)
70
76
 
71
77
  See [this blogpost](https://devblogs.microsoft.com/typescript/announcing-typescript-5-0/) for the complete list of changes.
72
78
 
@@ -74,15 +80,15 @@ title: BREAKING CHANGES
74
80
 
75
81
  ### [@servicetitan/eslint-config](./eslint-config)
76
82
 
77
- - 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.
83
+ - 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.
78
84
 
79
85
  ### [@servicetitan/react-ioc](./react-ioc/)
80
86
 
81
- - Changed second argument of **provide** method to an object with **loadingFallback** and **errorFallback** properties.
82
- - Renamed the **fallback** property of the **Provider** component to **loadingFallback** and added **errorFallback** property.
83
- - Removed ability to use **useValue** with **instances**.
87
+ - Changed second argument of **provide** method to an object with **loadingFallback** and **errorFallback** properties.
88
+ - Renamed the **fallback** property of the **Provider** component to **loadingFallback** and added **errorFallback** property.
89
+ - Removed ability to use **useValue** with **instances**.
84
90
 
85
91
  ### [@servicetitan/startup](./startup)
86
92
 
87
- - Upgraded **Jest** from version v27 to v29. The largest breaking change is that v29 changed the default snapshot format.<br/>
88
- 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.
93
+ - Upgraded **Jest** from version v27 to v29. The largest breaking change is that v29 changed the default snapshot format.<br/>
94
+ 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.
@@ -0,0 +1,28 @@
1
+ ---
2
+ title: build
3
+ ---
4
+
5
+ Build packages for production to the `dist/bundle` folders. It bundles them in production mode and optimizes the build for the best performance. The builds are minified and the filenames include the hashes. Apps are ready to be deployed.
6
+
7
+ #### Arguments
8
+
9
+ - `--scope <glob>` - Include only packages with names matching the given glob.
10
+ - `--ignore <glob>` - Exclude packages with names matching the given glob.
11
+ - `--cdn-path <url>` - Specify the base path for all the assets within the application.
12
+ - `--stat` - Generate bundle report with [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer). Starting `v22.3.0` works for [MFEs](/docs/frontend/micro-frontends) too.
13
+ - `--code-coverage` - Add [instrumentation](https://github.com/JS-DevTools/coverage-istanbul-loader) to bundled code in order to collect code coverage
14
+ - `--use-tsc` - Use TSC for TypeScript compilation
15
+
16
+ ## Build Steps
17
+
18
+ The `build` command executes these steps:
19
+
20
+ 1. Activate Kendo UI license.
21
+ 1. Compile Typescript.
22
+ 1. Generate TypeScript definitions from CSS, LESS, and SASS modules, and copy assets and style files to the output folder.
23
+ 1. Run type check via [TypeScript project references](https://www.typescriptlang.org/docs/handbook/project-references.html).
24
+ 1. Bundle application and MFE packages.
25
+
26
+ :::note
27
+ `startup` doesn't support dependencies between the Webpack bundles.
28
+ :::
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: clean
3
+ ---
4
+
5
+ Resets project workspace to a fresh state by clearing build caches and removing untracked files.
6
+
7
+ It runs tools like `nx reset` and `jest --clearCache` to clear project and test
8
+ caches, and then uses `git clean -fdX` to delete all untracked files and
9
+ directories (such as build outputs and temporary files).
10
+
11
+ ```sh
12
+ npx --yes @servicetitan/startup clean
13
+ ```
@@ -0,0 +1,18 @@
1
+ ---
2
+ title: convert-eslint-config
3
+ ---
4
+
5
+ Convert an ESLint v8 configuration to v9 format.
6
+
7
+ ```sh
8
+ npx startup convert-eslint-config
9
+ ```
10
+
11
+ Use this command when upgrading from ESLint v8 to v9, to convert a v8 `.eslintrc.json` to the equivalent `eslint.config.mjs`. See [Upgrading to ESLint v9.x](/docs/frontend/upgrading-to-eslint-v9) for guidance on upgrading to ESLint v9.
12
+
13
+ The command takes no arguments. Simply run it from a directory with `.eslintrc.json` and it creates `eslint.config.mjs` in the same location.
14
+
15
+ :::caution
16
+ Comments are not copied from the source `.eslintrc.json` to the output file.
17
+ If the source file contains important comments, copy them manually to the output file.
18
+ :::
@@ -0,0 +1,9 @@
1
+ ---
2
+ title: init
3
+ ---
4
+
5
+ Generates initial project structure. This command should be run via `npx` in an empty folder.
6
+
7
+ ```sh
8
+ npx -y @servicetitan/startup@latest init
9
+ ```
@@ -0,0 +1,13 @@
1
+ ---
2
+ title: install
3
+ ---
4
+
5
+ Installs project dependencies.
6
+
7
+ Use this command instead of plain `npm install` to guarantee that all packages are installed correctly and any necessary post-install steps are performed.
8
+
9
+ ```sh
10
+ npx --yes @servicetitan/startup install
11
+ ```
12
+
13
+ See [package.json in the example project](https://github.com/search?q=repo%3Aservicetitan%2Ffrontend-example+path%3A**%2Fpackage.json+%22startup+install%22&type=code) for how to use `install` in an npm script.
@@ -0,0 +1,20 @@
1
+ ---
2
+ title: kendo-ui-license
3
+ ---
4
+
5
+ Activates KendoReact components by installing the license key. The license key is only installed if the project depends on `@progress/kendo` components. Otherwise, this command has no effect.
6
+
7
+ **Note:** The [build](#build) command automatically detects when a project uses KendoRect components and runs this command.
8
+
9
+ Use it to install the license key separately from a build, or to override the default license key.
10
+
11
+ ```sh
12
+ npx startup kendo-ui-license
13
+ ```
14
+
15
+ To install a different license, set the KENDO_UI_LICENSE environment variable to the key to use.
16
+
17
+ ```sh
18
+ export KENDO_UI_LICENSE=<license-key>
19
+ npx startup kendo-ui-license
20
+ ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ title: lint
3
+ ---
4
+
5
+ Runs ESLint and Stylelint for all codebase projects.
6
+
7
+ To run ESLint and Stylelint on certain packages or subsystems it is possible to pass paths to specific directories as positional parameters.
8
+
9
+ ```sh
10
+ npx startup lint -- packages/desktop/app/modules/inventory/
11
+ ```
12
+
13
+ You can use multiple paths and your shell expressions which expand to directories.
14
+
15
+ ```sh
16
+ npx startup lint -- packages/desktop/app/modules/lead/ packages/desktop/app/modules/inventory/
17
+ npx startup lint -- packages/desktop/app/modules/{lead,inventory}/
18
+ ```
19
+
20
+ #### Options
21
+
22
+ - `--scope <glob>` - Include only packages with names matching the given glob.
23
+ - `--ignore <glob>` - Exclude packages with names matching the given glob.
24
+ - `--fix` - Fix linting issues.
@@ -0,0 +1,45 @@
1
+ ---
2
+ title: mfe-publish
3
+ ---
4
+
5
+ This is an umbrella command for both publishing and unpublishing (cleaning up) MFEs. This command allows publishing MFEs in a way that there is no risk of colliding package versions (a common issue with back-merging). See the `--build` option for more details.
6
+
7
+ #### Publishing options
8
+
9
+ | Option | Description |
10
+ | :------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
+ | `--build <glob>` | Optional build version that normally should not be specified. Defaults to `<branch_name>.<commit_hash>`. For example, if git commit `bdac90f5` is published from branch `next`, the build version is`next.bdac90f5`, and the full version is `0.0.0-next.bdac90f5`. This ensures each release has a unique version with no collisions. |
12
+ | `--dry` | Invoke [npm publish --dry-run](https://docs.npmjs.com/cli/v7/commands/npm-publish#dry-run) instead of actually publishing anything. |
13
+ | `--branch <string>` | Optional branch name. The current branch name is used if no value is specified. The branch name is used in constructing the build version in case `--build` is not specified. |
14
+ | `--force` | Forces publishing the package when no configuration was found for the specified branch (`--branch` or current branch). |
15
+ | `--tag <string>` | The [tag](https://docs.npmjs.com/cli/v7/commands/npm-publish#tag) to assign to the published version. Defaults to the tag associated with the branch from the custom [branch config](#branch-configs) or, if there is no custom branch config, from the [default branch config](https://github.com/servicetitan/uikit/blob/master/packages/startup/src/utils/get-branch-configs.ts#L3). For example, by default a package published from the `master` branch is tagged `prod`. Becasue NPM v11 requires pre-release versions to have a tag, if there is no custom or default tag for the branch, the package is tagged "latest". |
16
+
17
+ #### Unpublishing options
18
+
19
+ | Option | Descripiton |
20
+ | :----------------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `--clean` | Instructs `mfe-publish` to remove old versions instead of publishing. |
22
+ | `--count <number>` | The number of package versions to keep (e.g., if twelve versions are published, `--count 10` removes the two oldest). The default value is 5. |
23
+ | `--branch <name>` | Remove old versions associated with the specified branch. Defaults to the current branch (i.e., `git branch --show-current`) |
24
+ | `--all` | Remove old versions associated with all [recognized branches](#branch-configs). This overrides `--branch`. |
25
+ | `--dry` | Log what the command would do without actually unpublishing anything. |
26
+
27
+ #### Branch configs
28
+
29
+ By default `mfe-publish` only publishes from a few [recognized branches](https://github.com/servicetitan/uikit/blob/master/packages/startup/src/utils/get-branch-configs.ts#L3) and you must use `--force` to publish from others.
30
+
31
+ To customize the recognized branches for an MFE set `cli.web-component.branches` in the MFE's package.json to an object that maps branch names to the associated tag. For example,
32
+
33
+ ```json
34
+ "cli": {
35
+ "web-component": {
36
+ "branches": {
37
+ "qa": { "publishTag": "qa" },
38
+ "staging": { "publishTag": "staging" },
39
+ "master": { "publishTag": "prod" }
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ - `publishTag: string` - Tag used when publishing package.