Skip to content

Commit 04e27fe

Browse files
committed
Merge pull request #34 from js-data/3.0
3.0
2 parents 29ff8a5 + 5c71c11 commit 04e27fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+11700
-1458
lines changed

.bowerrc

-3
This file was deleted.

.github/ISSUE_TEMPLATE.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
(delete this line) GitHub Issues are NOT for support questions.
2-
(delete this line) GitHub Issues ARE for bug reports, feature requests, and other issues.
1+
(delete this line) GitHub Issues are not for support questions.
2+
(delete this line) GitHub Issues are for bug reports, feature requests, and other issues.
33
(delete this line) Find out how to Get Support here: http://js-data.io/docs/support.
44

5-
<your detailed, discussable, actionable, and helpful text goes here>
5+
<your detailed, actionable, and helpful text goes here>
66

77
Thanks!

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
node_modules/
21
bower_components/
32

43
.idea/
54

65
*.iml
76

87
coverage/
9-
junit/
8+
junit/
9+
doc/
10+
node_modules/
11+
*.log
12+
typings

.npmignore

-36
This file was deleted.

AUTHORS

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# This is the official list of js-data-http project authors.
22
#
3-
# This file is controlled by scripts/authors.js
4-
#
53
# Names are formatted as:
6-
# # commits Name or Organization <email address>
4+
# Name or Organization <email address>
5+
#
76
# The email address is not required for organizations.
7+
#
88
InternalFX <[email protected]>
99
Ivan Voznyakovsky <[email protected]>
1010
Jason Dobry <[email protected]>

CHANGELOG.md

+92
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,41 @@
1+
##### 3.0.0-beta.3 - 28 April 2016
2+
3+
###### Breaking changes
4+
- js-data-http.js no longer exports a default module, you must now do:
5+
- `import {HttpAdapter} from 'js-data-http'
6+
- `var HttpAdapter = require('js-data-http').HttpAdapter
7+
- `var adapter = new window.JSDataHttp.HttpAdapter()`
8+
- `define(['js-data-http'], function (JSDataHttp) { var adapter = new window.JSDataHttp.HttpAdapter(); })
9+
10+
###### Backwards compatible changes
11+
- Added `typings` field to `package.json`
12+
- Added `typings.json`
13+
- Added `dist/js-data-http.d.ts`
14+
15+
##### 3.0.0-beta.2 - 17 April 2016
16+
17+
Official v3 beta release
18+
19+
###### Other
20+
- Upgraded some devDependencies
21+
22+
##### 3.0.0-alpha.10 - 02 April 2016
23+
24+
###### Backwards compatible bug fixes
25+
- Fixed double deserialization of data in some cases
26+
27+
##### 3.0.0-alpha.9 - 18 March 2016
28+
29+
###### Backwards compatible API changes
30+
- Added sum and count methods
31+
32+
###### Other
33+
- Cleaned up some things
34+
35+
##### 3.0.0-alpha.8 - 17 March 2016
36+
37+
- Rebased master
38+
139
##### 2.2.1 - 17 March 2016
240

341
###### Backwards compatible bug fixes
@@ -6,6 +44,20 @@
644
- #46 - Sending large payloads takes huge amount of time - thanks @ivanvoznyakovsky
745
- #47 - perf(http): speed up preparation of http config with large payload - thanks @ivanvoznyakovsky
846

47+
##### 3.0.0-alpha.7 - 10 March 2016
48+
49+
###### Other
50+
- Now using js-data-repo-tools
51+
- Now using js-data-adapter
52+
53+
##### 3.0.0-alpha.6 - 23 February 2016
54+
55+
- getEndpoint now works with multiple parents
56+
57+
##### 3.0.0-alpha.5 - 23 February 2016
58+
59+
- Rebased master
60+
961
##### 2.2.0 - 23 February 2016
1062

1163
###### Backwards compatible API changes
@@ -16,8 +68,48 @@
1668
- Added AUTHORS and CONTRIBUTORS files
1769
- Updated Readme
1870

71+
##### 3.0.0-alpha.4 - 12 February 2016
72+
73+
###### Backwards compatible API changes
74+
- Better debugging/logging
75+
- Updates for the newest js-data alpha
76+
77+
##### 3.0.0-alpha.3 - 10 January 2016
78+
79+
###### Backwards compatible API changes
80+
- Added updateMany, createMany, and responseError methods.
81+
82+
##### 3.0.0-alpha.2 - 09 January 2016
83+
84+
###### Breaking API changes
85+
- All options that could be found at `DSHttpAdapter#defaults` will now be on
86+
the actual instances of `DSHttpAdapter`. e.g. `DSHttpAdapter#defaults.deserialize`
87+
is now at `DSHttpAdapter#deserialize`. This makes it easier to extend the
88+
`DSHttpAdapter` class and override its methods.
89+
90+
###### Backwards compatible API changes
91+
- Added lifecycle methods: beforeFind, afterPOST, etc.
92+
- Added support for the `raw` option
93+
94+
##### 3.0.0-alpha.1 - 12 December 2015
95+
96+
###### Breaking API changes
97+
- Actions are now part of js-data-http, rather than js-data
98+
- Now requires js-data 3.x or greater
99+
100+
###### Backwards compatible API changes
101+
- Added option to support use of `window.fetch`
102+
- Added option to supply custom http implementation
103+
104+
###### Other
105+
- Published the js-data-http-node package, a build of js-data-http that works in Node.js
106+
19107
##### 2.1.2 - 28 October 2015
20108

109+
###### Backwards compatible API changes
110+
- Added option to support use of `window.fetch`
111+
- Added option to supply custom http implementation
112+
21113
###### Other
22114
- Dropped Grunt
23115
- Now reporting code coverage properly

CONTRIBUTORS

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
# People who have contributed to the js-data-http project.
1+
# This is the official list of js-data-http project contributors.
22
#
3-
# This file is controlled by scripts/authors.js
3+
# Names are formatted as:
4+
# Name <email address>
45
#
5-
# Names should be added to this file as:
6-
# [commit count] Name <email address>
7-
1 InternalFX <[email protected]>
8-
1 Ivan Voznyakovsky <[email protected]>
9-
56 Jason Dobry <[email protected]>
10-
1 Josh Drake <[email protected]>
11-
1 RobertHerhold <[email protected]>
12-
3 Tomás Fox <[email protected]>
6+
InternalFX <[email protected]>
7+
Ivan Voznyakovsky <[email protected]>
8+
Jason Dobry <[email protected]>
9+
Josh Drake <[email protected]>
10+
RobertHerhold <[email protected]>
11+
Tomás Fox <[email protected]>

README.md

+20-44
Original file line numberDiff line numberDiff line change
@@ -9,53 +9,28 @@
99
[![Coverage Status][cov_b]][cov_l]
1010
[![Codacy][cod_b]][cod_l]
1111

12-
HTTP adapter for [js-data](http://www.js-data.io/).
12+
This repo contains HTTP adapters for [js-data](http://www.js-data.io/):
1313

14-
To get started, visit __[http://js-data.io](http://www.js-data.io)__.
14+
- js-data-http - HTTP (XHR, includes [axios][axios]) adapter for js-data in the
15+
browser. Capable of using `window.fetch` instead of axios.
16+
- js-data-fetch - Same as js-data-http but doesn't include axios and will use
17+
`window.fetch` if available and if you don't provide your own http library.
18+
- js-data-http-node - Same as js-data-http but runs on Node.js. Depends on axios
19+
and will use axios unless you provide a different http library.
1520

16-
## Table of contents
21+
Tested on IE9, Chrome 46, Firefox 41 & Safari 7.1 using
22+
<img src="https://raw.githubusercontent.com/js-data/js-data-localstorage/master/bs.jpg" alt="bs logo" title="browserstack" width="150" height="35" style="vertical-align: middle" />
1723

18-
* [Quick start](#quick-start)
19-
* [Guides and Tutorials](#guides-and-tutorials)
20-
* [API Reference Docs](#api-reference-docs)
21-
* [Community](#community)
22-
* [Support](#support)
23-
* [Contributing](#contributing)
24-
* [License](#license)
24+
To get started, visit the main website at __[http://js-data.io](http://www.js-data.io/v3.0/docs/js-data-http)__.
2525

26-
## Quick Start
27-
`npm install --save js-data js-data-http` or `bower install --save js-data js-data-http`.
26+
## Links
2827

29-
Load `js-data-http.js` after `js-data.js`.
30-
31-
```js
32-
var adapter = new DSHttpAdapter();
33-
34-
var store = new JSData.DS();
35-
store.registerAdapter('http', adapter, { default: true });
36-
37-
// "store" will now use the http adapter for all async operations
38-
```
39-
40-
## Guides and Tutorials
41-
42-
[Get started at http://js-data.io](http://js-data.io)
43-
44-
## API Reference Docs
45-
46-
[Visit http://api.js-data.io](http://api.js-data.io).
47-
48-
## Community
49-
50-
[Explore the Community](http://js-data.io/docs/community).
51-
52-
## Support
53-
54-
[Find out how to Get Support](http://js-data.io/docs/support).
55-
56-
## Contributing
57-
58-
[Read the Contributing Guide](http://js-data.io/docs/contributing).
28+
* [Quick start](http://www.js-data.io/v3.0/docs/js-data-http)
29+
* [Guides and Tutorials](http://www.js-data.io/v3.0/docs/home)
30+
* [API Reference Docs](http://api.js-data.io/js-data-http)
31+
* [Community](http://js-data.io/docs/community)
32+
* [Support](http://js-data.io/docs/support)
33+
* [Contributing](http://js-data.io/docs/contributing)
5934

6035
## License
6136

@@ -69,13 +44,14 @@ Copyright (c) 2014-2016 js-data-http project authors
6944

7045
[sl_b]: http://slack.js-data.io/badge.svg
7146
[sl_l]: http://slack.js-data.io
47+
[so]: http://stackoverflow.com/questions/tagged/jsdata
7248
[npm_b]: https://img.shields.io/npm/v/js-data-http.svg?style=flat
7349
[npm_l]: https://www.npmjs.org/package/js-data-http
7450
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-http/master.svg?style=flat
7551
[circle_l]: https://circleci.com/gh/js-data/js-data-http/tree/master
7652
[dn_b]: https://img.shields.io/npm/dm/js-data-http.svg?style=flat
7753
[dn_l]: https://www.npmjs.org/package/js-data-http
78-
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-http/master.svg?style=flat
79-
[cov_l]: https://coveralls.io/github/js-data/js-data-http?branch=master
54+
[cov_b]: https://img.shields.io/codecov/c/github/js-data/js-data-http/3.0.svg?style=flat
55+
[cov_l]: https://codecov.io/github/js-data/js-data-http
8056
[cod_b]: https://img.shields.io/codacy/3931bbd8d838463297f70640aa78251b.svg
8157
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-http/dashboard

bower.json

+11-12
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
11
{
22
"name": "js-data-http",
3-
"description": "HTTP adapter for js-data.",
4-
"homepage": "http://www.js-data.io/docs/dshttpadapter",
3+
"description": "HTTP (XHR) adapter for js-data in the browser.",
4+
"homepage": "https://github.com/js-data/js-data-http",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/js-data/js-data-http.git"
88
},
9-
"author": {
10-
"name": "Jason Dobry",
11-
"url": "http://www.pseudobry.com",
12-
"email": "[email protected]"
13-
},
9+
"author": "js-data-http project authors",
1410
"main": "./dist/js-data-http.js",
1511
"ignore": [
1612
".idea/",
1713
".*",
1814
"*.iml",
1915
"src/",
20-
"lib/",
2116
"doc/",
22-
"guide/",
17+
"build_examples/",
2318
"coverage/",
24-
"Gruntfile.js",
19+
"scripts/",
20+
"junit/",
2521
"node_modules/",
22+
"fetch/",
23+
"node/",
2624
"test/",
2725
"package.json",
2826
"karma.conf.js",
29-
"karma.start.js"
27+
"karma.start.js",
28+
"webpack.config.js"
3029
],
3130
"dependencies": {
32-
"js-data": ">=2.0.0"
31+
"js-data": ">=3.0.0-alpha.26"
3332
}
3433
}

build_examples/browserify/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Running `browserify -x axios app.js > bundle.js` in this directory will produce `bundle.js`
2+
3+
Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).

build_examples/browserify/app.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
var JSData = require('js-data')
2+
// normally this would be "var HttpAdapter = require('js-data-http')"
3+
var HttpAdapter = require('../../')
4+
5+
document.getElementById('main').innerHTML = HttpAdapter.version.full
6+
7+
var adapter = new HttpAdapter()
8+
var store = new JSData.DataStore()
9+
store.registerAdapter('http', adapter, { default: true })
10+
store.defineMapper('user')
11+
12+
store.find('user', 1).catch(function (err) {
13+
console.log(err)
14+
})

build_examples/browserify/index.html

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>My App</title>
5+
</head>
6+
<body>
7+
<h1 id="main"></h1>
8+
<!-- load bundled scripts -->
9+
<script src="bundle.js"></script>
10+
</body>
11+
</html>

build_examples/node/app.js

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
var JSData = require('js-data')
2+
// normally this would be "var HttpAdapter = require('js-data-http-node')"
3+
var HttpAdapter = require('../../')
4+
5+
var adapter = new HttpAdapter()
6+
var store = new JSData.Container()
7+
store.registerAdapter('http', adapter, { default: true })
8+
store.defineMapper('user')
9+
10+
store.find('user', 1).catch(function (err) {
11+
console.log(err)
12+
})

0 commit comments

Comments
 (0)