Skip to content

Commit 6c3485d

Browse files
committed
Stable Version 0.4.1.
1 parent 340d018 commit 6c3485d

File tree

8 files changed

+38
-18
lines changed

8 files changed

+38
-18
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
###### Backwards compatible API changes
44
- Added `forceTrailingSlash` option to `DSHttpAdapter#defaults`
55

6+
###### Other
7+
- Improved checking for the js-data dependency
8+
69
##### 0.4.0 - 25 September 2014
710

811
###### Breaking API changes

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing Guide
22

3-
First, feel free to contact me with questions. [Mailing List](https://groups.google.com/forum/?fromgroups#!forum/js-data-project). [Issues](https://github.com/js-data/js-data-http/issues).
3+
First, feel free to contact me with questions. [Mailing List](https://groups.io/org/groupsio/jsdata). [Issues](https://github.com/js-data/js-data-http/issues).
44

55
1. Contribute to the issue that is the reason you'll be developing in the first place
66
1. Fork js-data-http

bower.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@
2929
"karma.conf.js",
3030
"karma.start.js"
3131
],
32-
"peerDependencies": {
33-
"js-data": "~0.4.x"
34-
},
35-
"devDependencies": {
32+
"dependencies": {
3633
"js-data": "~0.4.x"
3734
}
3835
}

dist/js-data-http.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,10 +1290,21 @@ process.chdir = function (dir) {
12901290

12911291
},{}],23:[function(require,module,exports){
12921292
var JSData;
1293-
if (!window && typeof module !== 'undefined' && module.exports) {
1293+
1294+
try {
12941295
JSData = require('js-data');
1295-
} else {
1296-
JSData = window.JSData;
1296+
} catch (e) {
1297+
}
1298+
1299+
if (!JSData) {
1300+
try {
1301+
JSData = window.JSData;
1302+
} catch (e) {
1303+
}
1304+
}
1305+
1306+
if (!JSData) {
1307+
throw new Error('js-data must be loaded!');
12971308
}
12981309

12991310
var makePath = JSData.DSUtils.makePath;

dist/js-data-http.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<title></title>
66
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
77
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
8-
<script src="https://github.com/js-data/js-data/releases/download/0.4.0/js-data-0.4.0.min.js"></script>
8+
<script src="https://github.com/js-data/js-data/releases/download/0.4.1/js-data-0.4.1.min.js"></script>
99
<script
1010
src="https://github.com/js-data/js-data-http/releases/download/0.4.1/js-data-http-0.4.1.min.js"></script>
1111
<script src="./example.js"></script>

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"url": "https://github.com/js-data/js-data-http/blob/master/LICENSE"
1818
}
1919
],
20+
"main": "./src/index.js",
2021
"devDependencies": {
2122
"grunt": "0.4.5",
2223
"grunt-browserify": "3.0.1",
@@ -44,12 +45,9 @@
4445
"scripts": {
4546
"test": "grunt test"
4647
},
47-
"peerDependencies": {
48-
"js-data": "~0.4.x"
49-
},
5048
"dependencies": {
5149
"axios": "0.3.1",
52-
"es6-promise": "1.0.0",
53-
"mout": "0.10.0"
50+
"mout": "0.10.0",
51+
"js-data": "~0.4.x"
5452
}
5553
}

src/index.js

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
var JSData;
2-
if (!window && typeof module !== 'undefined' && module.exports) {
2+
3+
try {
34
JSData = require('js-data');
4-
} else {
5-
JSData = window.JSData;
5+
} catch (e) {
6+
}
7+
8+
if (!JSData) {
9+
try {
10+
JSData = window.JSData;
11+
} catch (e) {
12+
}
13+
}
14+
15+
if (!JSData) {
16+
throw new Error('js-data must be loaded!');
617
}
718

819
var makePath = JSData.DSUtils.makePath;

0 commit comments

Comments
 (0)