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

@wordpress/interactivity

Package Overview
Dependencies
Maintainers
0
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/interactivity - npm Package Compare versions

Comparing version 6.5.0 to 6.6.0

14

build-module/directives.js

@@ -247,8 +247,9 @@ // eslint-disable-next-line eslint-comments/disable-enable-pair

const ns = defaultEntry.namespace;
const currentValue = useRef({
[ns]: proxifyState(ns, {})
});
const currentValue = useRef(proxifyState(ns, {}));
// No change should be made if `defaultEntry` does not exist.
const contextStack = useMemo(() => {
const result = {
...inheritedValue
};
if (defaultEntry) {

@@ -263,6 +264,7 @@ const {

}
updateContext(currentValue.current[namespace], deepClone(value));
currentValue.current[namespace] = proxifyContext(currentValue.current[namespace], inheritedValue[namespace]);
updateContext(currentValue.current, deepClone(value));
currentValue.current = proxifyContext(currentValue.current, inheritedValue[namespace]);
result[namespace] = currentValue.current;
}
return currentValue.current;
return result;
}, [defaultEntry, inheritedValue]);

@@ -269,0 +271,0 @@ return createElement(Provider, {

@@ -254,8 +254,9 @@ "use strict";

const ns = defaultEntry.namespace;
const currentValue = (0, _hooks.useRef)({
[ns]: (0, _proxies.proxifyState)(ns, {})
});
const currentValue = (0, _hooks.useRef)((0, _proxies.proxifyState)(ns, {}));
// No change should be made if `defaultEntry` does not exist.
const contextStack = (0, _hooks.useMemo)(() => {
const result = {
...inheritedValue
};
if (defaultEntry) {

@@ -270,6 +271,7 @@ const {

}
updateContext(currentValue.current[namespace], deepClone(value));
currentValue.current[namespace] = proxifyContext(currentValue.current[namespace], inheritedValue[namespace]);
updateContext(currentValue.current, deepClone(value));
currentValue.current = proxifyContext(currentValue.current, inheritedValue[namespace]);
result[namespace] = currentValue.current;
}
return currentValue.current;
return result;
}, [defaultEntry, inheritedValue]);

@@ -276,0 +278,0 @@ return (0, _preact.h)(Provider, {

@@ -5,4 +5,18 @@ <!-- Learn how to maintain this file at https://github.com/WordPress/gutenberg/tree/HEAD/packages#maintaining-changelogs. -->

## 6.6.0 (2024-08-21)
### Bug Fixes
- Fix context inheritance from namespaces different than the current one ([#64677](https://github.com/WordPress/gutenberg/pull/64677)).
## 6.5.0 (2024-08-07)
### Enhancements
- Refactor internal proxy and signals system ([#62734](https://github.com/WordPress/gutenberg/pull/62734)).
### Bug Fixes
- Prevent overriding of existing properties on state and context after a client-side navigation ([#62734](https://github.com/WordPress/gutenberg/pull/62734)).
## 6.4.0 (2024-07-24)

@@ -13,5 +27,7 @@

## 6.2.0 (2024-06-26)
### Enhancements
- Export `splitTask` function from `@wordpress/interactivity` package to facilitate yielding to the main thread. See example in [async actions](https://github.com/WordPress/gutenberg/blob/trunk/docs/reference-guides/interactivity-api/api-reference.md#async-actions) documentation. ([#62665](https://github.com/WordPress/gutenberg/pull/62665))
## 6.1.0 (2024-06-15)

@@ -18,0 +34,0 @@

{
"name": "@wordpress/interactivity",
"version": "6.5.0",
"version": "6.6.0",
"description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.",

@@ -36,3 +36,3 @@ "author": "The WordPress Contributors",

},
"gitHead": "c3101ab024e2bfc85d525c6d247e0d57cafc9fd9"
"gitHead": "ab9564947967bb3f00343130954b9efacba6cdd7"
}

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