Skip to content

Commit ca2bac2

Browse files
authored
chore(release): 9.0.1 (#937)
1 parent b035581 commit ca2bac2

File tree

3 files changed

+36
-61
lines changed

3 files changed

+36
-61
lines changed

.github/workflows/release-and-publish.yml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,31 +54,3 @@ jobs:
5454
release_name: ${{ github.ref }}
5555
draft: false
5656
prerelease: ${{ needs.setup_variables.outputs.isLatest != 'true' }}
57-
58-
publish_to_npm:
59-
needs: [setup_variables, create_release]
60-
runs-on: ubuntu-latest
61-
62-
steps:
63-
# https://github.com/marketplace/actions/checkout
64-
- uses: actions/checkout@v2
65-
# https://github.com/marketplace/actions/setup-node-js-environment
66-
- uses: actions/setup-node@v1
67-
with:
68-
node-version: 12
69-
registry-url: https://registry.npmjs.org/
70-
- name: Check lock file
71-
# runs yarn install using yarn.lock and verifies
72-
# if dependencies are matching with package.json or not
73-
run: yarn
74-
# This will tell npm to publish your scoped package with public access
75-
- name: Publish with latest tag
76-
if: ${{ needs.setup_variables.outputs.isLatest == 'true' }}
77-
run: npm publish --access public
78-
env:
79-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
80-
- name: Publish with next tag
81-
if: ${{ needs.setup_variables.outputs.isLatest != 'true' }}
82-
run: npm publish --access public --tag next
83-
env:
84-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

CHANGELOG.md

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## [9.0.1](https://github.com/thymikee/jest-preset-angular/compare/v9.0.0...v9.0.1) (2021-05-28)
2+
3+
4+
### Bug Fixes
5+
6+
* add missing export `build` in `package.json` ([#936](https://github.com/thymikee/jest-preset-angular/issues/936)) ([b035581](https://github.com/thymikee/jest-preset-angular/commit/b0355814b490758dcdf8a5708524c63d94618014)), closes [#935](https://github.com/thymikee/jest-preset-angular/issues/935)
7+
8+
9+
110
# [9.0.0](https://github.com/thymikee/jest-preset-angular/compare/v8.4.0...v9.0.0) (2021-05-27)
211

312

@@ -27,14 +36,13 @@
2736

2837
## BREAKING CHANGES
2938

30-
* Drop support for Angular < **8.0**, see https://angular.io/guide/releases#support-policy-and-schedule.
39+
* Drop support for Angular < **8.0**, see https://angular.io/guide/releases#support-policy-and-schedule.
3140
* Drop support for Node.js version **10** since it becomes EOL on **2021-04-30**. Required Node version now is **>=12.13.0**.
3241
* Require **Jest 27**.
33-
* When generating a new project from Angular CLI, by default the `tsconfig.json` doesn't contain any path mappings
34-
hence removing `moduleNameMapper` from preset will make sure that the preset works in pair with `tsconfig.json`.
35-
Ones who are relying on the value of `moduleNameMapper` from the preset should create their own `moduleNameMapper`
36-
config manually or via `ts-jest` util https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping
37-
* By default, if `skipLibCheck` is not defined in tsconfig, `jest-preset-angular` will set it to `true`. If one wants to have it as `false`, one can set explicitly in tsconfig.
42+
* Users who are using `import 'jest-preset-angular'` should change to `import 'jest-preset-angular/setup-jest'`
43+
* **transformers:** The AST transformers `InlineFilesTransformer` and `StripStylesTransformer` are **REMOVED** and
44+
default `jest-preset-angular` uses AST transformers from `@angular/compiler-cli` and `@ngtools/webpack`.
45+
One should remove the old transformers from the jest config.
3846
* **compiler:** `jest-preset-angular` now switches to default to use its own transformer which wraps around `ts-jest` to transform codes.
3947

4048
Users who are currently doing in jest config
@@ -58,41 +66,36 @@ module.exports = {
5866
},
5967
}
6068
```
61-
* Users who are using `import 'jest-preset-angular'` should change to `import 'jest-preset-angular/setup-jest'`
62-
* **transformers:** The AST transformers `InlineFilesTransformer` and `StripStylesTransformer` are **REMOVED** and
63-
default `jest-preset-angular` uses AST transformers from `@angular/compiler-cli` and `@ngtools/webpack`.
64-
One should remove the old transformers from the jest config.
65-
* **serializers:** One is using all `jest-preset-angular` snapshot serializers should change jest config to have:
69+
* **serializers:**: snapshot serializer paths have been changed:
70+
- `'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js'` is changed to `'jest-preset-angular/build/serializers/no-ng-attributes`.
71+
- `'jest-preset-angular/build/AngularSnapshotSerializer.js'` is changed to `'jest-preset-angular/build/serializers/ng-snapshot`.
72+
- `'jest-preset-angular/build/HTMLCommentSerializer.js'` is changed to `'jest-preset-angular/build/serializers/html-comment`.
73+
* When generating a new project from Angular CLI, by default the `tsconfig.json` doesn't contain any path mappings
74+
hence removing `moduleNameMapper` from preset will make sure that the preset works in pair with `tsconfig.json`.
75+
Ones who are relying on the value of `moduleNameMapper` from the preset should create their own `moduleNameMapper`
76+
config manually or via `ts-jest` util https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping
77+
* By default, if `skipLibCheck` is not defined in tsconfig, `jest-preset-angular` will set it to `true`. If one wants to have it as `false`, one can set explicitly in tsconfig.
78+
* **compiler:** `jest-preset-angular` now switches to default to use its own transformer which wraps around `ts-jest` to transform codes.
79+
80+
Users who are currently doing in jest config
6681
```
6782
// jest.config.js
68-
const jestPresetAngularSerializers = require('jest-preset-angular/build/serializers')
69-
7083
module.exports = {
71-
// [...]
72-
snapshotSerializers: jestPresetAngularSerializers,
84+
// [...]
85+
transform: {
86+
'^.+\\.(ts|js|html)$': 'ts-jest',
87+
},
7388
}
7489
```
7590

76-
One is using one of `jest-preset-angular` snapshot serializers should change jest config to have:
91+
should change to
7792
```
7893
// jest.config.js
7994
module.exports = {
80-
// [...]
81-
snapshotSerializers: [
82-
'jest-preset-angular/build/serializers/html-comment'
83-
]
84-
}
85-
```
86-
or
87-
```
88-
// package.json
89-
{
90-
// [...]
91-
"jest": {
92-
snapshotSerializers: [
93-
"jest-preset-angular/build/serializers/html-comment"
94-
]
95-
}
95+
// [...]
96+
transform: {
97+
'^.+\\.(ts|js|html)$': 'jest-preset-angular',
98+
},
9699
}
97100
```
98101

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jest-preset-angular",
3-
"version": "9.0.0",
3+
"version": "9.0.1",
44
"description": "Jest preset configuration for Angular projects",
55
"license": "MIT",
66
"main": "build/index.js",

0 commit comments

Comments
 (0)