Version Packages
This commit is contained in:
@@ -1,5 +1,58 @@
|
||||
# @backstage/cli
|
||||
|
||||
## 0.7.0
|
||||
|
||||
### Minor Changes
|
||||
|
||||
- 9cd3c533c: Switch from `ts-jest` to `@sucrase/jest-plugin`, improving performance and aligning transpilation with bundling.
|
||||
|
||||
In order to switch back to `ts-jest`, install `ts-jest@^26.4.3` as a dependency in the root of your repo and add the following in the root `package.json`:
|
||||
|
||||
```json
|
||||
"jest": {
|
||||
"globals": {
|
||||
"ts-jest": {
|
||||
"isolatedModules": true
|
||||
}
|
||||
},
|
||||
"transform": {
|
||||
"\\.esm\\.js$": "@backstage/cli/config/jestEsmTransform.js",
|
||||
"\\.(js|jsx|ts|tsx)$": "ts-jest",
|
||||
"\\.(bmp|gif|jpg|jpeg|png|frag|xml|svg)$": "@backstage/cli/config/jestFileTransform.js",
|
||||
"\\.(yaml)$": "yaml-jest"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Note that this will override the default jest transforms included with the `@backstage/cli`.
|
||||
|
||||
It is possible that some test code needs a small migration as a result of this change, which stems from a difference in how `sucrase` and `ts-jest` transform module re-exports.
|
||||
|
||||
Consider the following code:
|
||||
|
||||
```ts
|
||||
import * as utils from './utils';
|
||||
|
||||
jest.spyOn(utils, 'myUtility').mockReturnValue(3);
|
||||
```
|
||||
|
||||
If the `./utils` import for example refers to an index file that in turn re-exports from `./utils/myUtility`, you would have to change the code to the following to work around the fact that the exported object from `./utils` ends up not having configurable properties, thus breaking `jest.spyOn`.
|
||||
|
||||
```ts
|
||||
import * as utils from './utils/myUtility';
|
||||
|
||||
jest.spyOn(utils, 'myUtility').mockReturnValue(3);
|
||||
```
|
||||
|
||||
### Patch Changes
|
||||
|
||||
- 7f7443308: Updated dependencies
|
||||
- 21e8ebef5: Fix error message formatting in the packaging process.
|
||||
|
||||
error.errors can be undefined which will lead to a TypeError, swallowing the actual error message in the process.
|
||||
|
||||
For instance, if you break your tsconfig.json with invalid syntax, backstage-cli will not be able to build anything and it will be very hard to find out why because the underlying error message is hidden behind a TypeError.
|
||||
|
||||
## 0.6.14
|
||||
|
||||
### Patch Changes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@backstage/cli",
|
||||
"description": "CLI for developing Backstage plugins and apps",
|
||||
"version": "0.6.14",
|
||||
"version": "0.7.0",
|
||||
"private": false,
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
@@ -118,7 +118,7 @@
|
||||
"yn": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@backstage/backend-common": "^0.8.1",
|
||||
"@backstage/backend-common": "^0.8.2",
|
||||
"@backstage/config": "^0.1.5",
|
||||
"@backstage/core": "^0.7.12",
|
||||
"@backstage/dev-utils": "^0.1.17",
|
||||
|
||||
Reference in New Issue
Block a user