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

@sketch-hq/sketch-assistant-utils

Package Overview
Dependencies
Maintainers
3
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sketch-hq/sketch-assistant-utils - npm Package Compare versions

Comparing version 5.0.0-next.6 to 5.0.0-next.7

6

CHANGELOG.md
# @sketch-hq/sketch-assistant-utils
## 5.0.0-next.7
### Patch Changes
- f48a2de: Exclude 'do_objectID' and '\$pointer' attributes from the object hash function
## 5.0.0-next.6

@@ -4,0 +10,0 @@

16

dist/cjs/rule-utils/index.js

@@ -20,6 +20,12 @@ "use strict";

/**
* Object hash comparison function that ignores 'do_objectID' and '$pointer' attributes
*/
const stableObjectHash = (obj, excludeKeys = []) => {
return object_utils_1.objectHash(obj, [...excludeKeys, 'do_objectID', '$pointer']);
};
/**
* Helper function that creates a string hash from a set of attributes of a style
* object.
*/
const styleHash = (style) => object_utils_1.objectHash({
const styleHash = (style) => stableObjectHash({
borders: style === null || style === void 0 ? void 0 : style.borders,

@@ -43,3 +49,3 @@ borderOptions: style === null || style === void 0 ? void 0 : style.borderOptions,

*/
const textStyleHash = (style) => object_utils_1.objectHash({
const textStyleHash = (style) => stableObjectHash({
borders: style === null || style === void 0 ? void 0 : style.borders,

@@ -51,3 +57,3 @@ borderOptions: style === null || style === void 0 ? void 0 : style.borderOptions,

innerShadows: style === null || style === void 0 ? void 0 : style.innerShadows,
textStyle: style && style.textStyle ? object_utils_1.objectHash(style === null || style === void 0 ? void 0 : style.textStyle) : null,
textStyle: style && style.textStyle ? stableObjectHash(style === null || style === void 0 ? void 0 : style.textStyle) : null,
});

@@ -184,5 +190,3 @@ exports.textStyleHash = textStyleHash;

nodeToObject: object_utils_1.nodeToObject,
objectHash(obj, excludeKeys = []) {
return object_utils_1.objectHash(obj, [...excludeKeys, 'do_objectID', '$pointer']);
},
objectHash: stableObjectHash,
objectsEqual(obj1, obj2, excludeKeys = []) {

@@ -189,0 +193,0 @@ return object_utils_1.objectsEqual(obj1, obj2, [...excludeKeys, 'do_objectID', '$pointer']);

@@ -8,6 +8,12 @@ import mem from 'mem';

/**
* Object hash comparison function that ignores 'do_objectID' and '$pointer' attributes
*/
const stableObjectHash = (obj, excludeKeys = []) => {
return objectHash(obj, [...excludeKeys, 'do_objectID', '$pointer']);
};
/**
* Helper function that creates a string hash from a set of attributes of a style
* object.
*/
const styleHash = (style) => objectHash({
const styleHash = (style) => stableObjectHash({
borders: style === null || style === void 0 ? void 0 : style.borders,

@@ -29,3 +35,3 @@ borderOptions: style === null || style === void 0 ? void 0 : style.borderOptions,

*/
const textStyleHash = (style) => objectHash({
const textStyleHash = (style) => stableObjectHash({
borders: style === null || style === void 0 ? void 0 : style.borders,

@@ -37,3 +43,3 @@ borderOptions: style === null || style === void 0 ? void 0 : style.borderOptions,

innerShadows: style === null || style === void 0 ? void 0 : style.innerShadows,
textStyle: style && style.textStyle ? objectHash(style === null || style === void 0 ? void 0 : style.textStyle) : null,
textStyle: style && style.textStyle ? stableObjectHash(style === null || style === void 0 ? void 0 : style.textStyle) : null,
});

@@ -168,5 +174,3 @@ /**

nodeToObject,
objectHash(obj, excludeKeys = []) {
return objectHash(obj, [...excludeKeys, 'do_objectID', '$pointer']);
},
objectHash: stableObjectHash,
objectsEqual(obj1, obj2, excludeKeys = []) {

@@ -173,0 +177,0 @@ return objectsEqual(obj1, obj2, [...excludeKeys, 'do_objectID', '$pointer']);

{
"name": "@sketch-hq/sketch-assistant-utils",
"version": "5.0.0-next.6",
"version": "5.0.0-next.7",
"module": "dist/esm/index",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index",

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