jest-image-snapshot 4.5.0 → 4.5.1

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.
@@ -0,0 +1,31 @@
1
+ name: Health Check
2
+
3
+ on:
4
+ schedule:
5
+ # At minute 0 past hour 0800 and 2000.
6
+ - cron: '0 8,20 * * *'
7
+
8
+ jobs:
9
+ tests:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ node: [ '10.x', '12.x', '14.x', '16.x' ]
14
+ name: Node ${{ matrix.node }}
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - run: |
18
+ git remote set-branches --add origin main
19
+ git fetch
20
+ - name: Setup Node
21
+ uses: actions/setup-node@v2
22
+ with:
23
+ node-version: ${{ matrix.node }}
24
+ - name: Install Dependencies
25
+ run: npm ci
26
+ env:
27
+ NODE_ENV: development
28
+ - name: Run Test Script
29
+ run: npm run test
30
+ env:
31
+ NODE_ENV: production
@@ -0,0 +1,37 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ prepare:
10
+ runs-on: ubuntu-latest
11
+ if: "! contains(github.event.head_commit.message, '[skip ci]')"
12
+ steps:
13
+ - run: echo "${{ github.event.head_commit.message }}"
14
+ release:
15
+ needs: prepare
16
+ name: Release
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Checkout
20
+ uses: actions/checkout@v2
21
+ with:
22
+ persist-credentials: false
23
+ - name: Setup Node.js
24
+ uses: actions/setup-node@v2
25
+ with:
26
+ node-version: 12
27
+ - name: Install dependencies
28
+ run: npm ci
29
+ - name: Release
30
+ env:
31
+ GIT_AUTHOR_EMAIL: ${{ secrets.GIT_AUTHOR_EMAIL }}
32
+ GIT_AUTHOR_NAME: ${{ secrets.GIT_AUTHOR_NAME }}
33
+ GIT_COMMITTER_EMAIL: ${{ secrets.GIT_COMMITTER_EMAIL }}
34
+ GIT_COMMITTER_NAME: ${{ secrets.GIT_COMMITTER_NAME }}
35
+ GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
36
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
37
+ run: npx semantic-release
@@ -0,0 +1,43 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ tests:
10
+ runs-on: ubuntu-latest
11
+ strategy:
12
+ matrix:
13
+ node: [ '10.x','12.x', '14.x', '16.x' ]
14
+ name: Node ${{ matrix.node }}
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - run: |
18
+ git remote set-branches --add origin main
19
+ git fetch
20
+ - name: Setup Node
21
+ uses: actions/setup-node@v2
22
+ with:
23
+ node-version: ${{ matrix.node }}
24
+ - name: Install Dependencies
25
+ run: npm ci
26
+ env:
27
+ NODE_ENV: development
28
+ - name: Unit Tests
29
+ run: npm run test
30
+ env:
31
+ NODE_ENV: production
32
+ - name: Lockfile Lint Test
33
+ run: npm run test:lockfile
34
+ env:
35
+ NODE_ENV: production
36
+ - name: Git History Test
37
+ run: npm run test:git-history
38
+ env:
39
+ NODE_ENV: production
40
+ - name: Lint
41
+ run: npm run lint
42
+ env:
43
+ NODE_ENV: production
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [4.5.1](https://github.com/americanexpress/jest-image-snapshot/compare/v4.5.0...v4.5.1) (2021-06-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** bump glob-parent from 5.1.1 to 5.1.2 ([#276](https://github.com/americanexpress/jest-image-snapshot/issues/276)) ([0c5879e](https://github.com/americanexpress/jest-image-snapshot/commit/0c5879ea2552682208e822d5d696c94121ed7125))
7
+
1
8
  # [4.5.0](https://github.com/americanexpress/jest-image-snapshot/compare/v4.4.1...v4.5.0) (2021-04-29)
2
9
 
3
10
 
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  <h1 align="center">
2
- <img src='https://github.com/americanexpress/jest-image-snapshot/raw/master/jest-image-snapshot.png' alt="Jest Image Snapshot - One Amex" width='50%'/>
2
+ <img src='https://github.com/americanexpress/jest-image-snapshot/raw/main/jest-image-snapshot.png' alt="Jest Image Snapshot - One Amex" width='50%'/>
3
3
  </h1>
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/jest-image-snapshot)](https://www.npmjs.com/package/jest-image-snapshot)
6
- [![Travis (.org) branch](https://img.shields.io/travis/americanexpress/jest-image-snapshot/master)](https://travis-ci.org/americanexpress/jest-image-snapshot)
6
+ ![Health Check](https://github.com/americanexpress/jest-image-snapshot/workflows/Health%20Check/badge.svg)
7
7
  [![Mentioned in Awesome Jest](https://awesome.re/mentioned-badge.svg)](https://github.com/jest-community/awesome-jest)
8
8
 
9
9
  > Jest matcher that performs image comparisons using [pixelmatch](https://github.com/mapbox/pixelmatch) and behaves just like [Jest snapshots](https://facebook.github.io/jest/docs/snapshot-testing.html) do! Very useful for visual regression testing.
@@ -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 <=26` is a peerDependency. `jest-image-snapshot` will **not** work with anything below Jest 20.x.x
78
+ Please note that `Jest` `>=20 <=27` is a peerDependency. `jest-image-snapshot` will **not** work with anything below Jest 20.x.x
79
79
 
80
80
  ### Invocation
81
81
 
@@ -292,7 +292,7 @@ Please feel free to open pull requests and see [CONTRIBUTING.md](./CONTRIBUTING.
292
292
  ## 🗝️ License
293
293
 
294
294
  Any contributions made under this project will be governed by the [Apache License
295
- 2.0](https://github.com/americanexpress/jest-image-snapshot/blob/master/LICENSE.txt).
295
+ 2.0](https://github.com/americanexpress/jest-image-snapshot/blob/main/LICENSE.txt).
296
296
 
297
297
  ## 🗣️ Code of Conduct
298
298
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-image-snapshot",
3
- "version": "4.5.0",
3
+ "version": "4.5.1",
4
4
  "description": "Jest matcher for image comparisons. Most commonly used for visual regression testing.",
5
5
  "main": "src/index.js",
6
6
  "engines": {
@@ -10,7 +10,7 @@
10
10
  "lint": "eslint ./ --ignore-path .gitignore --ext .js",
11
11
  "test": "jest --ci=false",
12
12
  "test:lockfile": "lockfile-lint -p package-lock.json -t npm -a npm -o https: -c -i",
13
- "test:git-history": "commitlint --from origin/master --to HEAD",
13
+ "test:git-history": "commitlint --from origin/main --to HEAD",
14
14
  "posttest": "npm run lint && npm run test:git-history && npm run test:lockfile"
15
15
  },
16
16
  "keywords": [
@@ -53,8 +53,8 @@
53
53
  "eslint-config-amex": "^7.0.0",
54
54
  "husky": "^4.2.1",
55
55
  "image-size": "^0.8.3",
56
- "jest": "^26.0.1",
57
- "jest-snapshot": "^26.0.1",
56
+ "jest": "^27.0.4",
57
+ "jest-snapshot": "^27.0.4",
58
58
  "lockfile-lint": "^4.0.0",
59
59
  "mock-spawn": "^0.2.6",
60
60
  "semantic-release": "^17.0.4"
@@ -71,7 +71,7 @@
71
71
  "ssim.js": "^3.1.1"
72
72
  },
73
73
  "peerDependencies": {
74
- "jest": ">=20 <=26"
74
+ "jest": ">=20 <=27"
75
75
  },
76
76
  "husky": {
77
77
  "hooks": {
@@ -80,6 +80,20 @@
80
80
  }
81
81
  },
82
82
  "release": {
83
+ "branches": [
84
+ "+([0-9])?(.{+([0-9]),x}).x",
85
+ "main",
86
+ "next",
87
+ "next-major",
88
+ {
89
+ "name": "beta",
90
+ "prerelease": true
91
+ },
92
+ {
93
+ "name": "alpha",
94
+ "prerelease": true
95
+ }
96
+ ],
83
97
  "plugins": [
84
98
  "@semantic-release/commit-analyzer",
85
99
  "@semantic-release/release-notes-generator",
@@ -87,7 +101,6 @@
87
101
  "@semantic-release/npm",
88
102
  "@semantic-release/git",
89
103
  "@semantic-release/github"
90
- ],
91
- "branch": "master"
104
+ ]
92
105
  }
93
106
  }
package/.travis.yml DELETED
@@ -1,24 +0,0 @@
1
- language: node_js
2
- node_js:
3
- - 10
4
- - 12
5
- - 14
6
- before_install:
7
- # Create a master branch for commitlint
8
- # https://github.com/conventional-changelog/commitlint/issues/6
9
- - git remote set-branches origin master && git fetch
10
- jobs:
11
- include:
12
- # Define the release stage that runs semantic-release
13
- - stage: release
14
- node_js:
15
- - 10
16
- - 12
17
- - 14
18
- deploy:
19
- on:
20
- branch: master
21
- provider: script
22
- skip_cleanup: true
23
- script:
24
- - npx semantic-release