Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@wordpress/api-fetch

Package Overview
Dependencies
Maintainers
6
Versions
186
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/api-fetch - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

4

build-module/middlewares/nonce.js

@@ -6,3 +6,3 @@ import _objectSpread from "@babel/runtime/helpers/objectSpread";

*/
import jQuery from 'jquery';
import { addAction } from '@wordpress/hooks';

@@ -19,3 +19,3 @@ var createNonceMiddleware = function createNonceMiddleware(nonce) {

jQuery(document).on('heartbeat-tick', function (event, response) {
addAction('heartbeat.tick', 'core/api-fetch/create-nonce-middleware', function (response) {
if (response['rest-nonce']) {

@@ -22,0 +22,0 @@ usedNonce = response['rest-nonce'];

@@ -12,3 +12,3 @@ "use strict";

var _jquery = _interopRequireDefault(require("jquery"));
var _hooks = require("@wordpress/hooks");

@@ -28,3 +28,3 @@ /**

(0, _jquery.default)(document).on('heartbeat-tick', function (event, response) {
(0, _hooks.addAction)('heartbeat.tick', 'core/api-fetch/create-nonce-middleware', function (response) {
if (response['rest-nonce']) {

@@ -31,0 +31,0 @@ usedNonce = response['rest-nonce'];

{
"name": "@wordpress/api-fetch",
"version": "1.0.2",
"version": "1.1.0",
"description": "Utility to make WordPress REST API requests.",

@@ -24,4 +24,4 @@ "author": "The WordPress Contributors",

"@babel/runtime": "^7.0.0-beta.52",
"@wordpress/i18n": "^1.2.2",
"jquery": "^3.3.1"
"@wordpress/hooks": "^1.3.2",
"@wordpress/i18n": "^1.2.2"
},

@@ -31,3 +31,3 @@ "publishConfig": {

},
"gitHead": "04961befa151ae1224f50ae2b3742d797b7409d9"
"gitHead": "a942c459289bf89841a00a71272d09068f830ce5"
}
/**
* External dependencies
*/
import jQuery from 'jquery';
import { addAction } from '@wordpress/hooks';

@@ -14,3 +14,3 @@ const createNonceMiddleware = ( nonce ) => ( options, next ) => {

*/
jQuery( document ).on( 'heartbeat-tick', ( event, response ) => {
addAction( 'heartbeat.tick', 'core/api-fetch/create-nonce-middleware', ( response ) => {
if ( response[ 'rest-nonce' ] ) {

@@ -17,0 +17,0 @@ usedNonce = response[ 'rest-nonce' ];

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc