Socket
Socket
Sign inDemoInstall

wordpress-query-media

Package Overview
Dependencies
37
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 2.0.0-alpha

19

lib/index.js

@@ -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"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc