Skip to content

Commit cbd5282

Browse files
committed
release 1.2.0
1 parent 294ad49 commit cbd5282

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

HISTORY.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.2.0 / 2021-8-16
2+
==================
3+
* Add nonce support, thanks to @tanzhangwen #57
4+
15
1.1.1 / 2017-6-10
26
==================
37
* Fix script error when script request error, thanks to @wheatma

build/fetch-jsonp.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@
7878
if (options.charset) {
7979
jsonpScript.setAttribute('charset', options.charset);
8080
}
81+
if (options.nonce) {
82+
jsonpScript.setAttribute('nonce', options.nonce);
83+
}
8184
jsonpScript.id = scriptId;
8285
document.getElementsByTagName('head')[0].appendChild(jsonpScript);
8386

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
{
22
"name": "fetch-jsonp",
3-
"version": "1.1.3",
3+
"version": "1.2.0",
44
"description": "Fetch JSONP like a boss using Fetch API",
55
"main": "build/fetch-jsonp.js",
66
"scripts": {
77
"prepublish": "npm run lint && npm run clean && npm run build",
8-
"test": "mocha --compilers js:babel/register --recursive --ui bdd --reporter spec",
98
"build": "babel src/ --modules umd --out-dir build",
109
"clean": "rm -rf build",
1110
"lint": "eslint src/ test/"
@@ -20,11 +19,9 @@
2019
"babel": "^5.8.21",
2120
"babel-core": "^5.8.21",
2221
"babel-eslint": "^4.0.5",
23-
"chai": "^3.2.0",
2422
"eslint": "^1.1.0",
2523
"eslint-config-airbnb": "^0.0.7",
26-
"eslint-plugin-react": "^3.2.1",
27-
"mocha": "^2.2.5"
24+
"eslint-plugin-react": "^3.2.1"
2825
},
2926
"repository": {
3027
"type": "git",

test/fetch-jsonp.spec.js

Whitespace-only changes.

0 commit comments

Comments
 (0)