jest-image-snapshot 5.2.0 → 6.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.
- package/CHANGELOG.md +19 -0
- package/README.md +1 -1
- package/package.json +6 -6
- package/src/index.js +3 -2
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,22 @@
|
|
1
|
+
# [6.0.0](https://github.com/americanexpress/jest-image-snapshot/compare/v5.2.0...v6.0.0) (2022-11-03)
|
2
|
+
|
3
|
+
|
4
|
+
* chore(jest)!: add support for jest v29 (#309) ([79e53fc](https://github.com/americanexpress/jest-image-snapshot/commit/79e53fc010793f574cd9da783ced895af6987712)), closes [#309](https://github.com/americanexpress/jest-image-snapshot/issues/309)
|
5
|
+
|
6
|
+
|
7
|
+
### BREAKING CHANGES
|
8
|
+
|
9
|
+
* Drop support for Node v12 and Node v17,
|
10
|
+
as Jest v29 does not support these versions.
|
11
|
+
|
12
|
+
* ci(release): use Node v16 for release action
|
13
|
+
|
14
|
+
Node v16 is the current active LTS release of Node.JS
|
15
|
+
|
16
|
+
Co-authored-by: Jamie King <hello@jamieking.me>
|
17
|
+
|
18
|
+
Co-authored-by: Jamie King <hello@jamieking.me>
|
19
|
+
|
1
20
|
# [5.2.0](https://github.com/americanexpress/jest-image-snapshot/compare/v5.1.1...v5.2.0) (2022-08-31)
|
2
21
|
|
3
22
|
|
package/README.md
CHANGED
@@ -75,7 +75,7 @@ Thanks `jest-image-snapshot`, that broken header would not have looked good in p
|
|
75
75
|
npm i --save-dev jest-image-snapshot
|
76
76
|
```
|
77
77
|
|
78
|
-
Please note that `Jest` `>=20 <=
|
78
|
+
Please note that `Jest` `>=20 <=29` is a peerDependency. `jest-image-snapshot` will **not** work with anything below Jest 20.x.x
|
79
79
|
|
80
80
|
### Invocation
|
81
81
|
|
package/package.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
{
|
2
2
|
"name": "jest-image-snapshot",
|
3
|
-
"version": "
|
3
|
+
"version": "6.0.0",
|
4
4
|
"description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"engines": {
|
7
|
-
"node": "^
|
7
|
+
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
8
8
|
},
|
9
9
|
"scripts": {
|
10
10
|
"lint": "eslint ./ --ignore-path .gitignore --ext .js",
|
@@ -53,14 +53,14 @@
|
|
53
53
|
"eslint-config-amex": "^7.0.0",
|
54
54
|
"husky": "^4.2.1",
|
55
55
|
"image-size": "^0.8.3",
|
56
|
-
"jest": "^
|
57
|
-
"jest-snapshot": "^
|
56
|
+
"jest": "^29.0.0",
|
57
|
+
"jest-snapshot": "^29.0.0",
|
58
58
|
"lockfile-lint": "^4.0.0",
|
59
59
|
"mock-spawn": "^0.2.6",
|
60
60
|
"semantic-release": "^17.0.4"
|
61
61
|
},
|
62
62
|
"dependencies": {
|
63
|
-
"chalk": "^
|
63
|
+
"chalk": "^4.0.0",
|
64
64
|
"get-stdin": "^5.0.1",
|
65
65
|
"glur": "^1.1.2",
|
66
66
|
"lodash": "^4.17.4",
|
@@ -71,7 +71,7 @@
|
|
71
71
|
"ssim.js": "^3.1.1"
|
72
72
|
},
|
73
73
|
"peerDependencies": {
|
74
|
-
"jest": ">=20 <=
|
74
|
+
"jest": ">=20 <=29"
|
75
75
|
},
|
76
76
|
"husky": {
|
77
77
|
"hooks": {
|
package/src/index.js
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
const kebabCase = require('lodash/kebabCase');
|
16
16
|
const merge = require('lodash/merge');
|
17
17
|
const path = require('path');
|
18
|
-
const Chalk = require('chalk').
|
18
|
+
const Chalk = require('chalk').Instance;
|
19
19
|
const { diffImageToSnapshot, runDiffImageToSnapshot } = require('./diff-snapshot');
|
20
20
|
const fs = require('fs');
|
21
21
|
const OutdatedSnapshotReporter = require('./outdated-snapshot-reporter');
|
@@ -174,7 +174,8 @@ function configureToMatchImageSnapshot({
|
|
174
174
|
} = this;
|
175
175
|
const chalkOptions = {};
|
176
176
|
if (typeof noColors !== 'undefined') {
|
177
|
-
|
177
|
+
// 1 means basic ANSI 16-color support, 0 means no support
|
178
|
+
chalkOptions.level = noColors ? 0 : 1;
|
178
179
|
}
|
179
180
|
const chalk = new Chalk(chalkOptions);
|
180
181
|
|