wordpress-query-media
Advanced tools
Comparing version 1.0.0 to 2.0.0-alpha
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _selectors = require('./selectors'); | ||
@@ -84,5 +88,5 @@ | ||
QueryMedia.propTypes = { | ||
attachmentId: _react.PropTypes.number.isRequired, | ||
requestingMedia: _react.PropTypes.bool, | ||
requestMedia: _react.PropTypes.func | ||
attachmentId: _propTypes2.default.number.isRequired, | ||
requestingMedia: _propTypes2.default.bool, | ||
requestMedia: _propTypes2.default.func | ||
}; | ||
@@ -97,9 +101,6 @@ | ||
return { | ||
requestingMedia: (0, _selectors.isRequestingMedia)(state, attachmentId) | ||
requesting: (0, _selectors.isRequestingMedia)(state, attachmentId) | ||
}; | ||
}, function (dispatch) { | ||
return (0, _redux.bindActionCreators)({ | ||
requestMedia: _state.requestMedia | ||
}, dispatch); | ||
})(QueryMedia); | ||
module.exports = exports['default']; | ||
return (0, _redux.bindActionCreators)({ requestMedia: _state.requestMedia }, dispatch); | ||
})(QueryMedia); |
@@ -24,4 +24,4 @@ "use strict"; | ||
/** | ||
* Returns true if a request is in progress for the specified media item | ||
* , or false otherwise. | ||
* Returns true if a request is in progress for the specified media | ||
* item, or false otherwise. | ||
* | ||
@@ -37,3 +37,3 @@ * @param {Object} state Global state tree | ||
return !!state.media.requests[attachmentId]; | ||
return Boolean(state.media.requests[attachmentId]); | ||
} |
@@ -7,4 +7,2 @@ 'use strict'; | ||
exports.MEDIA_REQUEST_FAILURE = exports.MEDIA_REQUEST_SUCCESS = exports.MEDIA_REQUEST = undefined; | ||
exports.items = items; | ||
exports.requests = requests; | ||
exports.requestMedia = requestMedia; | ||
@@ -37,3 +35,3 @@ | ||
/** | ||
/* | ||
* Tracks all known media objects, indexed by post global ID. | ||
@@ -51,4 +49,3 @@ * | ||
case MEDIA_REQUEST_SUCCESS: | ||
var posts = _defineProperty({}, action.media.id, action.media); | ||
return Object.assign({}, state, posts); | ||
return Object.assign({}, state, _defineProperty({}, action.media.id, action.media)); | ||
default: | ||
@@ -55,0 +52,0 @@ return state; |
{ | ||
"name": "wordpress-query-media", | ||
"version": "1.0.0", | ||
"version": "2.0.0-alpha", | ||
"description": "A component for fetching WordPress media data from the REST API.", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/ryelle/wordpress-query-media" | ||
"url": "https://github.com/ryelle/wp-redux-helpers/packages/wordpress-query-media" | ||
}, | ||
@@ -16,28 +16,15 @@ "keywords": [ | ||
"license": "GPL-2.0+", | ||
"devDependencies": { | ||
"babel-core": "^6.17.0", | ||
"babel-eslint": "^7.0.0", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-plugin-syntax-jsx": "^6.13.0", | ||
"babel-polyfill": "^6.16.0", | ||
"babel-preset-es2015": "^6.16.0", | ||
"babel-preset-react": "^6.16.0", | ||
"babel-preset-stage-0": "^6.16.0", | ||
"babel-register": "^6.18.0", | ||
"chai": "^3.5.0", | ||
"deep-freeze": "0.0.1", | ||
"eslint": "^3.8.1", | ||
"eslint-plugin-react": "^6.4.1", | ||
"sinon": "^1.17.6" | ||
}, | ||
"dependencies": { | ||
"debug": "^2.2.0", | ||
"react": "^15.3.2", | ||
"react-redux": "^4.4.5", | ||
"debug": "^3.1.0", | ||
"lodash": "^4.17.2", | ||
"qs": "^6.3.0", | ||
"react": "^16.1.1", | ||
"react-redux": "^5.0.6", | ||
"redux": "^3.6.0", | ||
"shallowequal": "^0.2.2", | ||
"shallowequal": "^1.0.2", | ||
"wordpress-rest-api-oauth-1": "^1.0.8" | ||
}, | ||
"engines": { | ||
"node": ">=0.10" | ||
"node": "8.9.1", | ||
"npm": "5.5.1" | ||
}, | ||
@@ -51,8 +38,4 @@ "main": "lib/index.js", | ||
"watch": "babel src --out-dir lib --watch", | ||
"lint": "eslint js --ext=js,jsx", | ||
"test": "mocha --require ./mocha-setup", | ||
"preversion": "npm test", | ||
"version": "npm run build && git add -A lib", | ||
"postversion": "git push && git push --tags" | ||
"preversion": "npm run build" | ||
} | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
12191
8
203
2
+ Addedlodash@^4.17.2
+ Addedqs@^6.3.0
+ Added@babel/runtime@7.24.7(transitive)
+ Addeddebug@3.2.7(transitive)
+ Addedms@2.1.3(transitive)
+ Addedreact@16.14.0(transitive)
+ Addedreact-lifecycles-compat@3.0.4(transitive)
+ Addedreact-redux@5.1.2(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedshallowequal@1.1.0(transitive)
- Removedasap@2.0.6(transitive)
- Removedcore-js@1.2.7(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removeddebug@2.6.9(transitive)
- Removedencoding@0.1.13(transitive)
- Removedfbjs@0.8.18(transitive)
- Removediconv-lite@0.6.3(transitive)
- Removedis-stream@1.1.0(transitive)
- Removedisomorphic-fetch@2.2.1(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedms@2.0.0(transitive)
- Removednode-fetch@1.7.3(transitive)
- Removedpromise@7.3.1(transitive)
- Removedreact@15.7.0(transitive)
- Removedreact-redux@4.4.10(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsetimmediate@1.0.5(transitive)
- Removedshallowequal@0.2.2(transitive)
- Removedua-parser-js@0.7.38(transitive)
- Removedwhatwg-fetch@3.6.20(transitive)
Updateddebug@^3.1.0
Updatedreact@^16.1.1
Updatedreact-redux@^5.0.6
Updatedshallowequal@^1.0.2