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

@commercetools/frontend-sdk

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commercetools/frontend-sdk - npm Package Compare versions

Comparing version 1.12.1 to 1.12.2

lib/chunk-FULEZNH5.mjs

88

CHANGELOG.md
## Version 1.12.2 (2024-06-13)
* fix: fixed array serialisation into query
* fix: Fixed jsdocs customerHeaderValue type
## Version 1.12.1 (2024-05-16)

@@ -9,6 +15,8 @@

* Added support to add coFE-Custom-Configuration header value globally via configure, and modually on callAction and PageAPI methods
* Added support to add coFE-Custom-Configuration header value globally via configure, and modularly on callAction and PageAPI methods
## Version 1.11.2 (2024-05-02)
* Fixed bug in error reporting affecting versions 1.11.0 and 1.11.1

@@ -18,2 +26,3 @@

* Reverted PageAPI interfaces back to types due to unintended breaking change

@@ -23,2 +32,3 @@

* Added Frontastic-Request-Id to errorCaught event trigger

@@ -31,2 +41,3 @@ * Added Frontastic-Request-Id header value to SDKResponse

* Removed httpOnly flag from cookie options as default

@@ -36,2 +47,3 @@

* Set cookie options httpOnly and secure to true by default

@@ -42,2 +54,3 @@ * Added the ability to skip the action queue on the SDK.callAction method

* Improved error handling

@@ -47,2 +60,3 @@

* Error values are explicity set to correct loss of data

@@ -52,2 +66,3 @@

* Updated README.md

@@ -57,2 +72,3 @@

* Removed deprecated orderHistoryFetched event

@@ -63,2 +79,3 @@ * Added ability to override cookie handling in SDK.configure

* Deprecated Extension base class, replaced with Integration to correct terminolgy

@@ -68,2 +85,3 @@

* Added support for 6 digit locales

@@ -73,2 +91,3 @@

* Added SSR support for rememberMeCookie helpers

@@ -83,2 +102,3 @@ * Added JSdocs for intellisense

* Send currency across in header for API calls

@@ -89,2 +109,3 @@ * Test for missing endpoint on protocol and add if missing

* fix: include headers from IncomingMessage on SSR fetch

@@ -94,2 +115,3 @@

* Added ServerOption support for getPreview and getPages methods

@@ -99,2 +121,3 @@

* Added ServerOptions type to index export

@@ -104,2 +127,3 @@

* Updated version

@@ -109,2 +133,3 @@

* Updated version

@@ -114,2 +139,3 @@

* Rework of cookie handling for better SSR support

@@ -119,2 +145,3 @@

* feat: added support to pass serverSession in callAction

@@ -124,2 +151,3 @@

* fix: compatibility with non-v8 browsers

@@ -129,2 +157,3 @@

* Replaced esbuild and tsc for tsup build

@@ -134,2 +163,3 @@

* Added optional serverSession parameter to getPage to pass server session for SSR

@@ -140,2 +170,3 @@ * Added serverSession helper to access server session cookie

* Replaced automatic assigning of Commercetools-Frontend-Extension-Version header in fetcher with optional extensionVersion parameter in SDKConfig

@@ -145,2 +176,3 @@

* Added throwIfNotConfigured method to Page API calls

@@ -151,2 +183,3 @@ * Added optional query param to getPage

* Implemented getPages method

@@ -156,2 +189,3 @@

* Added getPreview page API method

@@ -162,2 +196,3 @@ * fix: removed nested isError property from FetchError

* fix: only add Commercetools-Frontend-Extension-Version header if NEXT_PUBLIC_EXT_BUILD_ID provided

@@ -167,2 +202,3 @@

* fix: type generation, exclude test folder from build

@@ -172,2 +208,3 @@

* fix: updated node version

@@ -177,2 +214,3 @@

* fix: Use Commercetools-Frontend-Extension-Version header on SDK

@@ -183,2 +221,3 @@ * feat: SDK accepts posix and bcp47 language tags/locales

* fix: included @frontastic/extension-types as dependency

@@ -188,2 +227,3 @@

* Added support for arrays in action queries

@@ -193,2 +233,3 @@

* Added page API with getPage method

@@ -198,2 +239,3 @@

* Changed BUILD_ID to EXT_BUILD_ID

@@ -203,2 +245,3 @@

* fix: added NEXT_PUBLIC prefix to BUILD_ID env variable

@@ -208,2 +251,3 @@

* fix: issue with previous release process

@@ -213,2 +257,3 @@

* fix: updated @types/node

@@ -218,2 +263,3 @@

* feat: Added access token support for multitenancy projects

@@ -224,2 +270,3 @@ * Added node to types in tsconfig

* fix: error in error event trigger after reformatting

@@ -229,2 +276,3 @@

* Updated perttier config and ran fix

@@ -236,2 +284,3 @@ * Removed trailingComma:all

* Fix up prettier config to better suit the project

@@ -241,2 +290,3 @@

* Full release out of alpha/beta

@@ -247,2 +297,3 @@ * Removed getPage for later release

* Added generic type for CustomEvents to abstract extension class

@@ -256,2 +307,3 @@ * Exported SDKResponse type from package index

* Fixed typo in .npmignore

@@ -261,2 +313,3 @@

* Added .npmignore to optimise package size

@@ -266,2 +319,3 @@

* Replaced webpack build with esbuild and tsc

@@ -271,2 +325,3 @@

* fix: export SDK class type for extension

@@ -276,2 +331,3 @@

* Removed SDK class from public export

@@ -282,2 +338,3 @@ * Changed format of params of callAction and getPage mathods

Updated and extended StandardEvents type

@@ -287,2 +344,3 @@

* Updated StandardEvents type

@@ -292,2 +350,3 @@

* Added more descriptive error types, error event triggering handled by SDK

@@ -298,2 +357,3 @@ * Updated type of dynamic event return to object with unknown keys and data

* Exposed ActionError class

@@ -303,2 +363,3 @@

* Updated data type of action error event

@@ -308,2 +369,3 @@

* Changed return type of callAction to better describe and handle errors

@@ -313,2 +375,3 @@

* Added actionError StandardEvent type

@@ -318,2 +381,3 @@

* Updated callAction return type so cannot be void

@@ -326,2 +390,3 @@ * Event names modified

* Fixed major NPM deployment issue

@@ -331,2 +396,3 @@

* Updated prepublishOnly script

@@ -336,2 +402,3 @@

* Updated name of emitter class and export type

@@ -341,2 +408,3 @@

* Added error handling

@@ -346,22 +414,8 @@

* Hide event handler modifiers to prevent extensions accessing others
## Version 1.0.6-alpha.0 (2022-11-30)
## Version 1.0.0-alpha.0 (2022-11-29)
* Fixed typo in README.md
## Version 1.0.5-alpha.0 (2022-11-30)
* Updated method name
## Version 1.0.4-alpha.0 (2022-11-30)
* Added README.md
## Version 1.0.3-alpha.0 (2022-11-29)
* Initial release
## Version 1.0.0-alpha.0 (2022-11-29)
* Initial release

@@ -51,4 +51,11 @@ "use strict";

Object.keys(query).forEach((key) => {
if (query[key] !== void 0) {
params.set(key, query[key].toString());
let value = query[key];
if (value !== void 0) {
if (Array.isArray(value)) {
value.forEach((currentValue) => {
params.append(key, currentValue.toString());
});
} else {
params.set(key, query[key].toString());
}
}

@@ -55,0 +62,0 @@ });

13

lib/index.js

@@ -602,4 +602,11 @@ "use strict";

Object.keys(query).forEach((key) => {
if (query[key] !== void 0) {
params.set(key, query[key].toString());
let value = query[key];
if (value !== void 0) {
if (Array.isArray(value)) {
value.forEach((currentValue) => {
params.append(key, currentValue.toString());
});
} else {
params.set(key, query[key].toString());
}
}

@@ -902,3 +909,3 @@ });

* @param {boolean} [options.skipQueue] - An optional boolean, default false indicating whether or not to skip the action queue and execute fully asyncronously. May cause race conditions if used incorrectly.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -905,0 +912,0 @@ *

@@ -93,3 +93,3 @@ import { EventManager } from './EventManager.js';

* @param {boolean} [options.skipQueue] - An optional boolean, default false indicating whether or not to skip the action queue and execute fully asyncronously. May cause race conditions if used incorrectly.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -96,0 +96,0 @@ *

@@ -382,4 +382,11 @@ "use strict";

Object.keys(query).forEach((key) => {
if (query[key] !== void 0) {
params.set(key, query[key].toString());
let value = query[key];
if (value !== void 0) {
if (Array.isArray(value)) {
value.forEach((currentValue) => {
params.append(key, currentValue.toString());
});
} else {
params.set(key, query[key].toString());
}
}

@@ -682,3 +689,3 @@ });

* @param {boolean} [options.skipQueue] - An optional boolean, default false indicating whether or not to skip the action queue and execute fully asyncronously. May cause race conditions if used incorrectly.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -685,0 +692,0 @@ *

@@ -19,3 +19,3 @@ import { ServerOptions } from '../../cookieHandling/ServerOptions.js';

* @param {Object.<string, number, boolean, string[], number[], boolean[]>} [options.query] - An optional key, value pair object to be serialised into the url query.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -35,3 +35,3 @@ *

* @param {string} options.previewId - A string representing the ID of the preview to be fetched, likely to be acquired from a query in the visited URL.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -52,3 +52,3 @@ *

* @param {string} [options.types="static"] - An optional string with a default value of "static". The types of pages to fetch.
* @param {boolean} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {string} [options.customHeaderValue] - An optional string, the value to assign to a "coFE-Custom-Configuration" header value. Overrides customHeaderValue passed in {@link SDK.configure}.
* @param {Object} [options.serverOptions] - An optional object containing the res and req objects for ServerResponse and IncomingMessage with cookies respectively. Required for server-side rendering session management.

@@ -55,0 +55,0 @@ *

{
"name": "@commercetools/frontend-sdk",
"version": "1.12.1",
"version": "1.12.2",
"license": "UNLICENSED",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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