Skip to content

Commit

Permalink
Upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
surmon-china committed Mar 28, 2020
1 parent 657ae1a commit 71aef38
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ All notable changes to this project will be documented in this file.

**Breaking change**
- Move `static resolutions` to `static getResolutions()`
- `humanizeWallpapers` return `{ ...wallpaper, humanizedSearchUrl, humanizedImageUrl, humanizeResolutionUrl }`
- `humanizeWallpapers` return `{ ...wallpaper, humanizedSearchUrl, humanizedImageUrl, humanizedResolutionUrl }`

**Update**
- Refactoring with TypeScript
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ the same as option fields.
humanizedCopyrightUrl: string,
humanizedSearchUrl: string,
humanizedImageUrl: string,
humanizeResolutionUrl: string
humanizedResolutionUrl: string
}
```

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wonderful-bing-wallpaper",
"version": "0.3.1",
"version": "0.3.2",
"description": "Simple bing daily wallpaper API lib for node.js",
"keywords": [
"bing",
Expand Down Expand Up @@ -37,7 +37,8 @@
"build": "npm run cleanup && abc build",
"lint": "abc lint --ext .ts,.js src test",
"test": "abc test",
"rebirth": "npm run lint && npm run test && npm run build"
"rebirth": "npm run lint && npm run test && npm run build",
"release": ". ./scripts/release.sh"
},
"private": false,
"license": "MIT",
Expand Down
13 changes: 13 additions & 0 deletions scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -e

# https://github.com/mikeal/merge-release/blob/v4.0.7/merge-release-run.js
PKG_VERSION=$(jq -r '.version' package.json)

git fetch origin v"$PKG_VERSION" || {
type standard-version || npm i -g standard-version
standard-version -a --release-as "$PKG_VERSION" --skip.changelog
git push --follow-tags origin master
npm publish
}
2 changes: 1 addition & 1 deletion src/bing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export default class WonderfulBingWallpaper {
humanizedCopyrightUrl: `${host}${image.copyrightlink}`,
humanizedSearchUrl: `${host}${image.quiz}`,
humanizedImageUrl: `${host}${image.url}`,
humanizeResolutionUrl: `${host}${image.urlbase}_${targetResolution}${targetFileFormat}`
humanizedResolutionUrl: `${host}${image.urlbase}_${targetResolution}${targetFileFormat}`
}
}

Expand Down

0 comments on commit 71aef38

Please sign in to comment.