diff --git a/CHANGELOG.md b/CHANGELOG.md index bf89495..e5955c6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/fetch/package.json b/fetch/package.json index 1634988..4875fba 100644 --- a/fetch/package.json +++ b/fetch/package.json @@ -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", @@ -22,6 +22,6 @@ "fetch" ], "peerDependencies": { - "js-data": "^3.0.0-beta.2" + "js-data": "^3.0.0-beta.3" } } diff --git a/node/package.json b/node/package.json index 7126302..1409ec2 100644 --- a/node/package.json +++ b/node/package.json @@ -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", @@ -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" } } diff --git a/node/webpack.config.js b/node/webpack.config.js index 9ba2482..e2bd388 100644 --- a/node/webpack.config.js +++ b/node/webpack.config.js @@ -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]', diff --git a/package.json b/package.json index b60e33a..bdc4cb9 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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" diff --git a/src/index.js b/src/index.js index 1950856..28c538d 100644 --- a/src/index.js +++ b/src/index.js @@ -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 { @@ -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 Using the ES2015 class syntax. + * 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 Using {@link HttpAdapter.extend}. + * var instanceProps = {...} + * var classProps = {...} * * var MyHttpAdapter = HttpAdapter.extend(instanceProps, classProps) * var adapter = new MyHttpAdapter() - * adapter.say() // "hi" - * MyHttpAdapter.yell() // "HI" - * ``` * * @name HttpAdapter.extend * @method @@ -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