Skip to content

Commit

Permalink
Merge pull request #34 from js-data/3.0
Browse files Browse the repository at this point in the history
3.0
  • Loading branch information
jmdobry committed Apr 28, 2016
2 parents 29ff8a5 + 5c71c11 commit 04e27fe
Show file tree
Hide file tree
Showing 96 changed files with 11,700 additions and 1,458 deletions.
3 changes: 0 additions & 3 deletions .bowerrc

This file was deleted.

6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(delete this line) GitHub Issues are NOT for support questions.
(delete this line) GitHub Issues ARE for bug reports, feature requests, and other issues.
(delete this line) GitHub Issues are not for support questions.
(delete this line) GitHub Issues are for bug reports, feature requests, and other issues.
(delete this line) Find out how to Get Support here: http://js-data.io/docs/support.

<your detailed, discussable, actionable, and helpful text goes here>
<your detailed, actionable, and helpful text goes here>

Thanks!
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
node_modules/
bower_components/

.idea/

*.iml

coverage/
junit/
junit/
doc/
node_modules/
*.log
typings
36 changes: 0 additions & 36 deletions .npmignore

This file was deleted.

6 changes: 3 additions & 3 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This is the official list of js-data-http project authors.
#
# This file is controlled by scripts/authors.js
#
# Names are formatted as:
# # commits Name or Organization <email address>
# Name or Organization <email address>
#
# The email address is not required for organizations.
#
InternalFX <[email protected]>
Ivan Voznyakovsky <[email protected]>
Jason Dobry <[email protected]>
Expand Down
92 changes: 92 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,41 @@
##### 3.0.0-beta.3 - 28 April 2016

###### Breaking changes
- js-data-http.js no longer exports a default module, you must now do:
- `import {HttpAdapter} from 'js-data-http'
- `var HttpAdapter = require('js-data-http').HttpAdapter
- `var adapter = new window.JSDataHttp.HttpAdapter()`
- `define(['js-data-http'], function (JSDataHttp) { var adapter = new window.JSDataHttp.HttpAdapter(); })

###### Backwards compatible changes
- Added `typings` field to `package.json`
- Added `typings.json`
- Added `dist/js-data-http.d.ts`

##### 3.0.0-beta.2 - 17 April 2016

Official v3 beta release

###### Other
- Upgraded some devDependencies

##### 3.0.0-alpha.10 - 02 April 2016

###### Backwards compatible bug fixes
- Fixed double deserialization of data in some cases

##### 3.0.0-alpha.9 - 18 March 2016

###### Backwards compatible API changes
- Added sum and count methods

###### Other
- Cleaned up some things

##### 3.0.0-alpha.8 - 17 March 2016

- Rebased master

##### 2.2.1 - 17 March 2016

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

##### 3.0.0-alpha.7 - 10 March 2016

###### Other
- Now using js-data-repo-tools
- Now using js-data-adapter

##### 3.0.0-alpha.6 - 23 February 2016

- getEndpoint now works with multiple parents

##### 3.0.0-alpha.5 - 23 February 2016

- Rebased master

##### 2.2.0 - 23 February 2016

###### Backwards compatible API changes
Expand All @@ -16,8 +68,48 @@
- Added AUTHORS and CONTRIBUTORS files
- Updated Readme

##### 3.0.0-alpha.4 - 12 February 2016

###### Backwards compatible API changes
- Better debugging/logging
- Updates for the newest js-data alpha

##### 3.0.0-alpha.3 - 10 January 2016

###### Backwards compatible API changes
- Added updateMany, createMany, and responseError methods.

##### 3.0.0-alpha.2 - 09 January 2016

###### Breaking API changes
- All options that could be found at `DSHttpAdapter#defaults` will now be on
the actual instances of `DSHttpAdapter`. e.g. `DSHttpAdapter#defaults.deserialize`
is now at `DSHttpAdapter#deserialize`. This makes it easier to extend the
`DSHttpAdapter` class and override its methods.

###### Backwards compatible API changes
- Added lifecycle methods: beforeFind, afterPOST, etc.
- Added support for the `raw` option

##### 3.0.0-alpha.1 - 12 December 2015

###### Breaking API changes
- Actions are now part of js-data-http, rather than js-data
- Now requires js-data 3.x or greater

###### Backwards compatible API changes
- Added option to support use of `window.fetch`
- Added option to supply custom http implementation

###### Other
- Published the js-data-http-node package, a build of js-data-http that works in Node.js

##### 2.1.2 - 28 October 2015

###### Backwards compatible API changes
- Added option to support use of `window.fetch`
- Added option to supply custom http implementation

###### Other
- Dropped Grunt
- Now reporting code coverage properly
Expand Down
19 changes: 9 additions & 10 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# People who have contributed to the js-data-http project.
# This is the official list of js-data-http project contributors.
#
# This file is controlled by scripts/authors.js
# Names are formatted as:
# Name <email address>
#
# Names should be added to this file as:
# [commit count] Name <email address>
1 InternalFX <[email protected]>
1 Ivan Voznyakovsky <[email protected]>
56 Jason Dobry <[email protected]>
1 Josh Drake <[email protected]>
1 RobertHerhold <[email protected]>
3 Tomás Fox <[email protected]>
InternalFX <[email protected]>
Ivan Voznyakovsky <[email protected]>
Jason Dobry <[email protected]>
Josh Drake <[email protected]>
RobertHerhold <[email protected]>
Tomás Fox <[email protected]>
64 changes: 20 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,28 @@
[![Coverage Status][cov_b]][cov_l]
[![Codacy][cod_b]][cod_l]

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

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

## Table of contents
Tested on IE9, Chrome 46, Firefox 41 & Safari 7.1 using
<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" />

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

## Quick Start
`npm install --save js-data js-data-http` or `bower install --save js-data js-data-http`.
## Links

Load `js-data-http.js` after `js-data.js`.

```js
var adapter = new DSHttpAdapter();

var store = new JSData.DS();
store.registerAdapter('http', adapter, { default: true });

// "store" will now use the http adapter for all async operations
```

## Guides and Tutorials

[Get started at http://js-data.io](http://js-data.io)

## API Reference Docs

[Visit http://api.js-data.io](http://api.js-data.io).

## Community

[Explore the Community](http://js-data.io/docs/community).

## Support

[Find out how to Get Support](http://js-data.io/docs/support).

## Contributing

[Read the Contributing Guide](http://js-data.io/docs/contributing).
* [Quick start](http://www.js-data.io/v3.0/docs/js-data-http)
* [Guides and Tutorials](http://www.js-data.io/v3.0/docs/home)
* [API Reference Docs](http://api.js-data.io/js-data-http)
* [Community](http://js-data.io/docs/community)
* [Support](http://js-data.io/docs/support)
* [Contributing](http://js-data.io/docs/contributing)

## License

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

[sl_b]: http://slack.js-data.io/badge.svg
[sl_l]: http://slack.js-data.io
[so]: http://stackoverflow.com/questions/tagged/jsdata
[npm_b]: https://img.shields.io/npm/v/js-data-http.svg?style=flat
[npm_l]: https://www.npmjs.org/package/js-data-http
[circle_b]: https://img.shields.io/circleci/project/js-data/js-data-http/master.svg?style=flat
[circle_l]: https://circleci.com/gh/js-data/js-data-http/tree/master
[dn_b]: https://img.shields.io/npm/dm/js-data-http.svg?style=flat
[dn_l]: https://www.npmjs.org/package/js-data-http
[cov_b]: https://img.shields.io/coveralls/js-data/js-data-http/master.svg?style=flat
[cov_l]: https://coveralls.io/github/js-data/js-data-http?branch=master
[cov_b]: https://img.shields.io/codecov/c/github/js-data/js-data-http/3.0.svg?style=flat
[cov_l]: https://codecov.io/github/js-data/js-data-http
[cod_b]: https://img.shields.io/codacy/3931bbd8d838463297f70640aa78251b.svg
[cod_l]: https://www.codacy.com/app/jasondobry/js-data-http/dashboard
23 changes: 11 additions & 12 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
{
"name": "js-data-http",
"description": "HTTP adapter for js-data.",
"homepage": "http://www.js-data.io/docs/dshttpadapter",
"description": "HTTP (XHR) adapter for js-data in the browser.",
"homepage": "https://github.com/js-data/js-data-http",
"repository": {
"type": "git",
"url": "https://github.com/js-data/js-data-http.git"
},
"author": {
"name": "Jason Dobry",
"url": "http://www.pseudobry.com",
"email": "[email protected]"
},
"author": "js-data-http project authors",
"main": "./dist/js-data-http.js",
"ignore": [
".idea/",
".*",
"*.iml",
"src/",
"lib/",
"doc/",
"guide/",
"build_examples/",
"coverage/",
"Gruntfile.js",
"scripts/",
"junit/",
"node_modules/",
"fetch/",
"node/",
"test/",
"package.json",
"karma.conf.js",
"karma.start.js"
"karma.start.js",
"webpack.config.js"
],
"dependencies": {
"js-data": ">=2.0.0"
"js-data": ">=3.0.0-alpha.26"
}
}
3 changes: 3 additions & 0 deletions build_examples/browserify/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Running `browserify -x axios app.js > bundle.js` in this directory will produce `bundle.js`

Note the external dependency "axios" that is excluded from the build (it's not needed when using js-data-angular).
14 changes: 14 additions & 0 deletions build_examples/browserify/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
var JSData = require('js-data')
// normally this would be "var HttpAdapter = require('js-data-http')"
var HttpAdapter = require('../../')

document.getElementById('main').innerHTML = HttpAdapter.version.full

var adapter = new HttpAdapter()
var store = new JSData.DataStore()
store.registerAdapter('http', adapter, { default: true })
store.defineMapper('user')

store.find('user', 1).catch(function (err) {
console.log(err)
})
11 changes: 11 additions & 0 deletions build_examples/browserify/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>My App</title>
</head>
<body>
<h1 id="main"></h1>
<!-- load bundled scripts -->
<script src="bundle.js"></script>
</body>
</html>
12 changes: 12 additions & 0 deletions build_examples/node/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var JSData = require('js-data')
// normally this would be "var HttpAdapter = require('js-data-http-node')"
var HttpAdapter = require('../../')

var adapter = new HttpAdapter()
var store = new JSData.Container()
store.registerAdapter('http', adapter, { default: true })
store.defineMapper('user')

store.find('user', 1).catch(function (err) {
console.log(err)
})
Loading

0 comments on commit 04e27fe

Please sign in to comment.