Skip to content

Commit

Permalink
Prepare for 3.0.0-beta.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry committed May 2, 2016
1 parent ccba202 commit d6203f1
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 74 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
##### 3.0.0-beta.4 - 01 May 2016

###### Other
- Couple of JSDoc fixes
- Upgraded dependencies

##### 3.0.0-beta.3 - 28 April 2016

###### Breaking changes
Expand Down
4 changes: 2 additions & 2 deletions fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-fetch",
"description": "HTTP adapter for js-data that uses the fetch API.",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"homepage": "https://github.com/js-data/js-data-http",
"repository": {
"type": "git",
Expand All @@ -22,6 +22,6 @@
"fetch"
],
"peerDependencies": {
"js-data": "^3.0.0-beta.2"
"js-data": "^3.0.0-beta.3"
}
}
6 changes: 3 additions & 3 deletions node/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-http-node",
"description": "Node.js HTTP adapter for js-data.",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"homepage": "https://github.com/js-data/js-data-http",
"repository": {
"type": "git",
Expand All @@ -22,10 +22,10 @@
"node.js"
],
"dependencies": {
"js-data-adapter": "~0.3.0"
"js-data-adapter": "~0.6.1"
},
"peerDependencies": {
"axios": "^0.11.0",
"js-data": "^3.0.0-beta.2"
"js-data": "^3.0.0-beta.3"
}
}
4 changes: 2 additions & 2 deletions node/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var path= require('path')
var path = require('path')

module.exports = {
devtool: 'source-map',
entry: {
'./node/dist/js-data-http-node.js': './src/index.js',
'./node/dist/js-data-http-node.js': './src/index.js'
},
output: {
filename: '[name]',
Expand Down
19 changes: 8 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "js-data-http",
"description": "HTTP (XHR) adapter for js-data in the browser.",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"homepage": "https://github.com/js-data/js-data-http",
"repository": {
"type": "git",
Expand Down Expand Up @@ -41,10 +41,14 @@
"after",
"beforeEach",
"afterEach"
],
"ignore": [
"build_examples/",
"dist/"
]
},
"scripts": {
"lint": "repo-tools lint karma.start.js karma.conf.js src/**/*.js test/*.test.js fetch/karma.*.js node/mocha.start.js scripts/*.js",
"lint": "repo-tools lint \"**/*.js\"",
"doc": "jsdoc -c conf.json src node_modules/js-data-adapter/src && node scripts/cleanup.js",
"version": "repo-tools write-version dist/js-data-http.js fetch/dist/js-data-fetch.js node/dist/js-data-http-node.js",
"webpack": "webpack --config webpack.config.js && webpack --config node/webpack.config.js && webpack --config fetch/webpack.config.js && npm run version",
Expand All @@ -64,34 +68,27 @@
"ci": "npm test && cat ./coverage/lcov.info | codecov"
},
"dependencies": {
"js-data-adapter": "0.5.0"
"js-data-adapter": "0.6.1"
},
"peerDependencies": {
"js-data": "^3.0.0-beta.3"
},
"devDependencies": {
"axios": "0.11.0",
"babel-core": "6.7.7",
"babel-loader": "6.2.4",
"babel-plugin-syntax-async-functions": "6.5.0",
"babel-plugin-transform-regenerator": "6.6.5",
"babel-polyfill": "6.7.4",
"babel-preset-es2015": "6.6.0",
"babel-preset-stage-0": "6.5.0",
"chai": "3.5.0",
"codecov": "1.0.1",
"istanbul": "0.4.3",
"js-data-repo-tools": "0.3.0",
"jsdoc": "3.4.0",
"js-data-repo-tools": "0.5.0",
"karma": "0.13.22",
"karma-browserstack-launcher": "0.1.11",
"karma-chai": "0.1.0",
"karma-mocha": "0.2.2",
"karma-phantomjs-launcher": "1.0.0",
"karma-sinon": "1.0.4",
"mocha": "2.4.5",
"phantomjs-prebuilt": "2.1.7",
"sinon": "1.17.3",
"source-map-support": "0.4.0",
"uglify-js": "2.6.2",
"webpack": "1.13.0"
Expand Down
89 changes: 33 additions & 56 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
/* global fetch:true Headers:true Request:true */

/**
* Registered as `js-data-http` in NPM and Bower. The build of `js-data-http`
* that works on Node.js is registered in NPM as `js-data-http-node`. The build
* of `js-data-http` that does not bundle `axios` is registered in NPM and Bower
* as `js-data-fetch`.
*
* __Script tag__:
* ```javascript
* window.HttpAdapter
* ```
* __CommonJS__:
* ```javascript
* var HttpAdapter = require('js-data-http')
* ```
* __ES6 Modules__:
* ```javascript
* import HttpAdapter from 'js-data-http'
* ```
* __AMD__:
* ```javascript
* define('myApp', ['js-data-http'], function (HttpAdapter) { ... })
* ```
*
* @module js-data-http
*/

const axios = require('axios')
import {utils} from 'js-data'
import {
Expand Down Expand Up @@ -183,40 +157,16 @@ Object.defineProperty(HttpAdapter, '__super__', {
/**
* Alternative to ES6 class syntax for extending `HttpAdapter`.
*
* __ES6__:
* ```javascript
* class MyHttpAdapter extends HttpAdapter {
* deserialize (Model, data, opts) {
* const data = super.deserialize(Model, data, opts)
* data.foo = 'bar'
* return data
* }
* }
* ```
* @example <caption>Using the ES2015 class syntax.</caption>
* class MyHttpAdapter extends HttpAdapter {...}
* const adapter = new MyHttpAdapter()
*
* __ES5__:
* ```javascript
* var instanceProps = {
* // override deserialize
* deserialize: function (Model, data, opts) {
* var Ctor = this.constructor
* var superDeserialize = (Ctor.__super__ || Object.getPrototypeOf(Ctor)).deserialize
* // call the super deserialize
* var data = superDeserialize(Model, data, opts)
* data.foo = 'bar'
* return data
* },
* say: function () { return 'hi' }
* }
* var classProps = {
* yell: function () { return 'HI' }
* }
* @example <caption>Using {@link HttpAdapter.extend}.</caption>
* var instanceProps = {...}
* var classProps = {...}
*
* var MyHttpAdapter = HttpAdapter.extend(instanceProps, classProps)
* var adapter = new MyHttpAdapter()
* adapter.say() // "hi"
* MyHttpAdapter.yell() // "HI"
* ```
*
* @name HttpAdapter.extend
* @method
Expand Down Expand Up @@ -1254,3 +1204,30 @@ exports.addActions = function addActions (opts) {
* otherwise `false` if the current version is not beta.
*/
exports.version = '<%= version %>'

/**
* Registered as `js-data-http` in NPM and Bower. The build of `js-data-http`
* that works on Node.js is registered in NPM as `js-data-http-node`. The build
* of `js-data-http` that does not bundle `axios` is registered in NPM and Bower
* as `js-data-fetch`.
*
* __Script tag__:
* ```javascript
* window.HttpAdapter
* ```
* __CommonJS__:
* ```javascript
* var HttpAdapter = require('js-data-http')
* ```
* __ES6 Modules__:
* ```javascript
* import HttpAdapter from 'js-data-http'
* ```
* __AMD__:
* ```javascript
* define('myApp', ['js-data-http'], function (HttpAdapter) { ... })
* ```
*
* @module js-data-http
*/
exports.default = HttpAdapter

0 comments on commit d6203f1

Please sign in to comment.