Skip to content
This repository was archived by the owner on May 28, 2023. It is now read-only.

Commit cbe25db

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into HEAD
2 parents 1020f4b + e1ace1b commit cbe25db

File tree

7 files changed

+132
-153
lines changed

7 files changed

+132
-153
lines changed

.travis.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,11 @@ jobs:
1818
- yarn build
1919
node_js: '10'
2020

21-
- <<: *build
22-
node_js: '8'
23-
2421
- &unit
2522
stage: Test
2623
script: yarn test:unit
2724
name: "NodeJS 10 unit tests"
2825
node_js: "10"
26+
- <<: *build
27+
node_js: '12'
2928

30-
- <<: *unit
31-
name: "NodeJS 8 unit tests"
32-
node_js: "8"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Fixed
1010

1111
- Fixed some smaller issues with graphql so that it is now working again with the fronted - #350
12+
- Replaced the old `crop` function call which has been removed from Sharp image processor - @grimasod (#381)
1213

1314

1415
## [1.11.0-rc.1] - 2019.10.03

babel.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
[
44
'@babel/preset-env', {
55
targets: {
6-
node: "8"
6+
node: "10"
77
}
88
}
99
]

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
"request": "^2.85.0",
9292
"request-promise-native": "^1.0.5",
9393
"resource-router-middleware": "^0.6.0",
94-
"sharp": "^0.22.1",
94+
"sharp": "^0.23.4",
9595
"soap": "^0.25.0",
9696
"syswide-cas": "latest",
9797
"winston": "^2.4.2"

src/api/user.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ export default ({config, db}) => {
119119
*/
120120
userApi.post('/reset-password', (req, res) => {
121121
const userProxy = _getProxy(req)
122-
const storeCode = req.query.storeCode
123-
const websiteId = config.storeViews[storeCode].websiteId
122+
const { storeCode } = req.query
123+
const websiteId = storeCode ? config.storeViews[storeCode].websiteId : undefined
124124

125125
if (!req.body.email) {
126126
return apiStatus(res, 'Invalid e-mail provided!', 500)

src/lib/image.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export async function fit (buffer, width, height) {
4545
const transformer = sharp(buffer);
4646

4747
if (width || height) {
48-
transformer.resize(width, height).crop();
48+
transformer.resize(width, height, { fit: sharp.fit.cover });
4949
}
5050

5151
return transformer.toBuffer();

0 commit comments

Comments
 (0)