Socket
Socket
Sign inDemoInstall

@dotdev/next-components

Package Overview
Dependencies
Maintainers
17
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dotdev/next-components - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

5

dist/helpers/cart.d.ts

@@ -8,2 +8,7 @@ import "whatwg-fetch";

triggerPaymentButtons: () => void;
/**
* TODO: I have switched this to use axios because there were caching issues on older versions of
* Safari (v11.1). It would make sense to switch all requests to use axios but I haven't done so
* far as I do not have time to test the other requests are still working.
*/
getCartJSON: () => void;

@@ -10,0 +15,0 @@ addItem: (id: number, qty: number, properties?: any) => Promise<void>;

15

dist/helpers/cart.js

@@ -53,2 +53,3 @@ "use strict";

require("whatwg-fetch");
var axios_1 = require("axios");
var Cart = /** @class */ (function () {

@@ -66,4 +67,9 @@ function Cart() {

};
/**
* TODO: I have switched this to use axios because there were caching issues on older versions of
* Safari (v11.1). It would make sense to switch all requests to use axios but I haven't done so
* far as I do not have time to test the other requests are still working.
*/
this.getCartJSON = function () {
fetch("/cart?view=json&x=" + Math.random(), {
axios_1.default.get("/cart?view=json&x=" + Math.random(), {
headers: {

@@ -75,6 +81,7 @@ "X-Requested-With": "XMLHttpRequest",

},
method: "GET"
})
.then(function (response) { return response.json(); })
.then(function (data) { return _this.context.update({ cart: data }); });
.then(function (_a) {
var data = _a.data;
_this.context.update({ cart: data });
});
};

@@ -81,0 +88,0 @@ this.addItem = function (id, qty, properties) { return __awaiter(_this, void 0, void 0, function () {

{
"name": "@dotdev/next-components",
"version": "1.2.2",
"version": "1.2.3",
"license": "SEE LICENSE IN LICENCE.md",

@@ -10,2 +10,3 @@ "description": "Common components for Next projects",

"@shopify/theme-cart": "^1.0.1",
"axios": "^0.20.0",
"moment": "^2.23.0",

@@ -12,0 +13,0 @@ "numeral": "^2.0.6",

Sorry, the diff of this file is not supported yet

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