Skip to content

Commit

Permalink
release 1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
camsong committed Aug 16, 2021
1 parent 294ad49 commit cbd5282
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.2.0 / 2021-8-16
==================
* Add nonce support, thanks to @tanzhangwen #57

1.1.1 / 2017-6-10
==================
* Fix script error when script request error, thanks to @wheatma
Expand Down
3 changes: 3 additions & 0 deletions build/fetch-jsonp.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@
if (options.charset) {
jsonpScript.setAttribute('charset', options.charset);
}
if (options.nonce) {
jsonpScript.setAttribute('nonce', options.nonce);
}
jsonpScript.id = scriptId;
document.getElementsByTagName('head')[0].appendChild(jsonpScript);

Expand Down
7 changes: 2 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
{
"name": "fetch-jsonp",
"version": "1.1.3",
"version": "1.2.0",
"description": "Fetch JSONP like a boss using Fetch API",
"main": "build/fetch-jsonp.js",
"scripts": {
"prepublish": "npm run lint && npm run clean && npm run build",
"test": "mocha --compilers js:babel/register --recursive --ui bdd --reporter spec",
"build": "babel src/ --modules umd --out-dir build",
"clean": "rm -rf build",
"lint": "eslint src/ test/"
Expand All @@ -20,11 +19,9 @@
"babel": "^5.8.21",
"babel-core": "^5.8.21",
"babel-eslint": "^4.0.5",
"chai": "^3.2.0",
"eslint": "^1.1.0",
"eslint-config-airbnb": "^0.0.7",
"eslint-plugin-react": "^3.2.1",
"mocha": "^2.2.5"
"eslint-plugin-react": "^3.2.1"
},
"repository": {
"type": "git",
Expand Down
Empty file removed test/fetch-jsonp.spec.js
Empty file.

0 comments on commit cbd5282

Please sign in to comment.