You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*remove warning message when installing `jest-preset-angular` for end users ([#911](https://github.com/thymikee/jest-preset-angular/issues/911)) ([7b7f5ba](https://github.com/thymikee/jest-preset-angular/commit/7b7f5bab63c295a01bc3bbd63ef8d58a847a1b17))
6
+
*support all node versions >= **12.13.0**([#923](https://github.com/thymikee/jest-preset-angular/issues/923)) ([96782a6](https://github.com/thymikee/jest-preset-angular/commit/96782a652821864576aa1cb96e57a39187172dd4)), closes [#920](https://github.com/thymikee/jest-preset-angular/issues/920)
***transformers:** revert [#903](https://github.com/thymikee/jest-preset-angular/issues/903) as some file extensions are not processed with their original content ([aebc186](https://github.com/thymikee/jest-preset-angular/commit/aebc186b7a8d7682a76aaa281f3c77ff51ae7475))
9
-
10
-
11
-
## BREAKING CHANGES
12
-
13
-
When generating a new project from Angular CLI, by default the `tsconfig.json` doesn't contain any path mappings hence removing `moduleNameMapper` from preset will make sure that the preset works in pair with `tsconfig.json`.
14
8
15
-
Ones who are relying on the value of `moduleNameMapper` from the preset should create their own `moduleNameMapper` config manually or via `ts-jest` util https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping
16
9
10
+
### Features
17
11
12
+
* support **Jest 27** ([#926](https://github.com/thymikee/jest-preset-angular/issues/926)) ([1c761f8](https://github.com/thymikee/jest-preset-angular/commit/1c761f873686a96edeb4c3cb2f184d8a88f5f52a))
13
+
***config:** load zone ESM when running jest in ESM mode ([#892](https://github.com/thymikee/jest-preset-angular/issues/892)) ([e03ec19](https://github.com/thymikee/jest-preset-angular/commit/e03ec19c30b6ff257d0ddd7a8783d65ed5f43f8e)), closes [#751](https://github.com/thymikee/jest-preset-angular/issues/751)
14
+
* add `exports` field to `package.json`, see https://nodejs.org/api/packages.html#packages_package_entry_points
15
+
***presets:** add type definition for `presets` entry point ([#801](https://github.com/thymikee/jest-preset-angular/issues/801)) ([e4ff0c0](https://github.com/thymikee/jest-preset-angular/commit/e4ff0c0e19e5941e7e7db1da9b5c29e01d58ab58))
16
+
***compiler:** support ESM ([#721](https://github.com/thymikee/jest-preset-angular/issues/721)) ([a2166f8](https://github.com/thymikee/jest-preset-angular/commit/a2166f859b1c89340ee889520595d05fa3cf65dc))
***compiler:** use `replace-resources` AST transformer from Angular ([#708](https://github.com/thymikee/jest-preset-angular/issues/708)) ([1b20c19](https://github.com/thymikee/jest-preset-angular/commit/1b20c196586487a119f7e5e545c2a7fcfe6359fb))
19
+
***compiler:** use `downlevel-ctor` AST transformer from Angular ([#730](https://github.com/thymikee/jest-preset-angular/issues/730)) ([1f964c3](https://github.com/thymikee/jest-preset-angular/commit/c1242868557a95d79a7bb5a108153496e1f964c3))
***compiler:** reuse `cacheFS` from jest to reduce file system reading ([#679](https://github.com/thymikee/jest-preset-angular/issues/679)) ([f5d9d4b](https://github.com/thymikee/jest-preset-angular/commit/f5d9d4b9c0b5440ab14ddb4a636ea84d384e3408))
25
+
***config:** set `skipLibCheck: true` if not defined in tsconfig ([#678](https://github.com/thymikee/jest-preset-angular/issues/678)) ([0df3ce1](https://github.com/thymikee/jest-preset-angular/commit/0df3ce159c6778893dc08e35bdb99d0f3e0285b5))
23
26
24
-
* allow css testing with `@Component` property `styles` ([#900](https://github.com/thymikee/jest-preset-angular/issues/900)) ([7cf86e0](https://github.com/thymikee/jest-preset-angular/commit/7cf86e006495c6b9f12f6eb274effc4f03ba97c5))
25
-
* allow css testing with `@Component` property `styleUrls` ([#903](https://github.com/thymikee/jest-preset-angular/issues/903)) ([c275166](https://github.com/thymikee/jest-preset-angular/commit/c275166191e3e66be9bb1adc972a75c58650b32e))
26
27
28
+
## BREAKING CHANGES
27
29
28
-
### BREAKING CHANGES
30
+
* Drop support for Angular < **8.0**, see https://angular.io/guide/releases#support-policy-and-schedule.
31
+
* Drop support for Node.js version **10** since it becomes EOL on **2021-04-30**. Required Node version now is **>=12.13.0**.
32
+
* 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.
38
+
***compiler:**`jest-preset-angular` now switches to default to use its own transformer which wraps around `ts-jest` to transform codes.
29
39
30
-
* Drop support for Node.js version 10 since it becomes EOL on **2021-04-30**. To support Angular 12, Node.js **12.13+** or **14.15+** is required.
31
-
*`jest-preset-angular` now allows testing with all Angular supported style extensions.
32
-
33
-
Users who are specifying in jest config
40
+
Users who are currently doing in jest config
34
41
```
42
+
// jest.config.js
35
43
module.exports = {
36
-
globals: {
37
-
'ts-jest': {
38
-
tsconfig: '<rootDir>/tsconfig.spec.json',
39
-
stringifyContentPathRegex: '\\.html$',
40
-
},
41
-
},
42
-
transform: {
43
-
'^.+\\.(ts|js|html)$': 'jest-preset-angular',
44
-
},
44
+
// [...]
45
+
transform: {
46
+
'^.+\\.(ts|js|html)$': 'ts-jest',
47
+
},
45
48
}
46
49
```
47
50
48
51
should change to
52
+
```
53
+
// jest.config.js
54
+
module.exports = {
55
+
// [...]
56
+
transform: {
57
+
'^.+\\.(ts|js|html)$': 'jest-preset-angular',
58
+
},
59
+
}
60
+
```
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:
When generating a new project from Angular CLI, by default the `tsconfig.json` doesn't contain any path mappings hence removing `moduleNameMapper` from preset will make sure that the preset works in pair with `tsconfig.json`.
74
112
75
-
* support jest **27.0.0-next.6** ([#897](https://github.com/thymikee/jest-preset-angular/issues/897)) ([eff3052](https://github.com/thymikee/jest-preset-angular/commit/eff30529995e97daadbdfa04de8f41cb0ff76a8f))
113
+
Ones who are relying on the value of `moduleNameMapper` from the preset should create their own `moduleNameMapper` config manually or via `ts-jest` util https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping
***config:** load zone ESM when running jest in ESM mode ([#892](https://github.com/thymikee/jest-preset-angular/issues/892)) ([e03ec19](https://github.com/thymikee/jest-preset-angular/commit/e03ec19c30b6ff257d0ddd7a8783d65ed5f43f8e)), closes [#751](https://github.com/thymikee/jest-preset-angular/issues/751)
85
-
* support jest **27.0.0-next.5** ([#891](https://github.com/thymikee/jest-preset-angular/issues/891)) ([7a6cb0a](https://github.com/thymikee/jest-preset-angular/commit/7a6cb0af3dbc7b98b48f6759a5c4d299791cd957))
122
+
* Drop support for Node.js version 10 since it becomes EOL on **2021-04-30**. To support Angular 12, Node.js **12.13+** or **14.15+** is required.
86
123
87
124
88
-
### BREAKING CHANGES
89
125
90
-
* add `exports` field to `package.json`, see https://nodejs.org/api/packages.html#packages_package_entry_points
* adopt jest **27.0.0-next.4** ([#876](https://github.com/thymikee/jest-preset-angular/issues/876)) ([603b8ab](https://github.com/thymikee/jest-preset-angular/commit/603b8ab84b4d6345416a78810f409dc1c2d47f09))
140
+
***config:** load zone ESM when running jest in ESM mode ([#892](https://github.com/thymikee/jest-preset-angular/issues/892)) ([e03ec19](https://github.com/thymikee/jest-preset-angular/commit/e03ec19c30b6ff257d0ddd7a8783d65ed5f43f8e)), closes [#751](https://github.com/thymikee/jest-preset-angular/issues/751)
141
+
142
+
143
+
### BREAKING CHANGES
144
+
145
+
* add `exports` field to `package.json`, see https://nodejs.org/api/packages.html#packages_package_entry_points
***compiler:** use constructor downlevel ctor transformer for `isolatedModules: true` ([#792](https://github.com/thymikee/jest-preset-angular/issues/792)) ([00c71ce](https://github.com/thymikee/jest-preset-angular/commit/00c71ceaa06e58432d201d9d5f8deb33e8f54665))
135
172
***presets:** add type definition for `presets` entry point ([#801](https://github.com/thymikee/jest-preset-angular/issues/801)) ([e4ff0c0](https://github.com/thymikee/jest-preset-angular/commit/e4ff0c0e19e5941e7e7db1da9b5c29e01d58ab58))
136
-
* include features from `ts-jest`**27.0.0-next.6**
137
-
* Revert the usage of Angular compiler and use `ts-jest` to transform codes for `isolatedModules: false` ([#800](https://github.com/thymikee/jest-preset-angular/pull/800)) ([e4c9677](https://github.com/thymikee/jest-preset-angular/commit/a9ad3efbee508b59a7fc450ec39099567e4c9677)), closes [#757](https://github.com/thymikee/jest-preset-angular/issues/757)
***devs-infra:** build package with target `es2015` ([#620](https://github.com/thymikee/jest-preset-angular/issues/620)) ([779fd8c](https://github.com/thymikee/jest-preset-angular/commit/779fd8c2f878d21587e24eda4121dc73166dfa53))
190
-
191
-
192
-
### Features
193
-
194
-
* support Jest 27 ([#676](https://github.com/thymikee/jest-preset-angular/issues/676)) ([1a6b10e](https://github.com/thymikee/jest-preset-angular/commit/1a6b10ef66c266a7736f2ef4aed178db836d0c6c))
195
-
***utils:** improve `ngcc-jest-processor` util script to exclude some Jest args ([#662](https://github.com/thymikee/jest-preset-angular/issues/662)) ([cf1bb4c](https://github.com/thymikee/jest-preset-angular/commit/cf1bb4c36e1e68804658da02c6ca3a2bd783a6e2))
196
-
197
-
198
208
### Performance Improvements
199
209
200
210
***compiler:** reuse `cacheFS` from jest to reduce file system reading ([#679](https://github.com/thymikee/jest-preset-angular/issues/679)) ([f5d9d4b](https://github.com/thymikee/jest-preset-angular/commit/f5d9d4b9c0b5440ab14ddb4a636ea84d384e3408))
@@ -204,49 +214,16 @@ module.exports = {
204
214
### BREAKING CHANGES
205
215
206
216
* 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.
207
-
*`jest-preset-angular` no longer ships with `es5` build but now with `es2015`
***compiler:** fallback to ES2015 when no target is defined ([d8c4975](https://github.com/thymikee/jest-preset-angular/commit/d8c497515ac981d8903d9c37190be39bde60ca51)), closes [#622](https://github.com/thymikee/jest-preset-angular/issues/622)
218
-
* add `@ngtools/webpack` to peerDependencies list ([003527d](https://github.com/thymikee/jest-preset-angular/commit/003527d5329461e3b9a5c17404d0b64553192234)), closes [#622](https://github.com/thymikee/jest-preset-angular/issues/622)
219
-
220
-
221
-
### Features
222
-
223
-
***compiler:** provide ngcc-jest-processor util ([5c6ae01](https://github.com/thymikee/jest-preset-angular/commit/5c6ae01a0ee665879b32b6b4a75270fc1acdb1db))
***compiler:** cache module resolution with custom compiler host ([22941cc](https://github.com/thymikee/jest-preset-angular/commit/22941ccf2a1fbf8e0c9893670ce6b9056be66534))
234
-
***compiler:** only include none test files when initializing `Program` ([4cc5a1a](https://github.com/thymikee/jest-preset-angular/commit/4cc5a1a7578d45801f7437f9816b11c4d92dfeca))
***compiler:** introduce `NgJestCompiler` for code compilation ([02d272e](https://github.com/thymikee/jest-preset-angular/commit/02d272eb9ec4b14dbf1d2d620266750e1873abe6)), closes [#108](https://github.com/thymikee/jest-preset-angular/issues/108)[#288](https://github.com/thymikee/jest-preset-angular/issues/288)[#322](https://github.com/thymikee/jest-preset-angular/issues/322)[#353](https://github.com/thymikee/jest-preset-angular/issues/353)
245
-
246
-
247
224
### BREAKING CHANGES
248
225
249
-
***compiler:**With the new jest transformer, `jest-preset-angular` now switches to default to use this new transformer and no longer use`ts-jest` to transform codes.
226
+
***compiler:**`jest-preset-angular` now switches to default to use its own transformer which wraps around`ts-jest` to transform codes.
250
227
251
228
Users who are currently doing in jest config
252
229
```
@@ -270,8 +247,6 @@ module.exports = {
270
247
}
271
248
```
272
249
273
-
`isolatedModule: true` will still use `ts-jest` to compile `ts` to `js` but you won't get full compatibility with Ivy.
0 commit comments