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 3.0.0 to 3.0.1

7

CHANGELOG.md
# @sketch-hq/sketch-assistant-utils
## 3.0.1
### Patch Changes
- 97d2d36: Map rule errors into plain objects with type PlainRuleError
- 97d2d36: Fix `createRule` test helper to create dummy rules with an undefined platform by default
## 3.0.0

@@ -4,0 +11,0 @@

7

dist/cjs/run-assistant/index.js

@@ -78,3 +78,8 @@ "use strict";

violations,
errors: Array.from(error),
errors: Array.from(error).map(error => ({
assistantName: error.assistantName,
ruleName: error.ruleName,
message: error.cause.message,
stack: error.cause.stack || '',
})),
metadata,

@@ -81,0 +86,0 @@ };

2

dist/cjs/test-helpers/index.js

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

debug,
platform: platform !== null && platform !== void 0 ? platform : 'node',
platform,
});

@@ -30,0 +30,0 @@ exports.createRule = createRule;

@@ -103,2 +103,11 @@ import { FileFormat3 } from '@sketch-hq/sketch-file-format-ts';

/**
* JavaScript errors encountered during rule invocation normalised into plain objects.
*/
export declare type PlainRuleError = {
assistantName: string;
ruleName: string;
message: string;
stack: string;
};
/**
* The result of running an assistant. One or more `violations` implies the assistant's rules found

@@ -111,3 +120,3 @@ * issues with the Sketch document. One or more `errors` implies that some rules didn't run because

violations: Violation[];
errors: Error[];
errors: PlainRuleError[];
metadata: {

@@ -114,0 +123,0 @@ assistant: Omit<AssistantDefinition, 'rules'>;

@@ -72,3 +72,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

violations,
errors: Array.from(error),
errors: Array.from(error).map(error => ({
assistantName: error.assistantName,
ruleName: error.ruleName,
message: error.cause.message,
stack: error.cause.stack || '',
})),
metadata,

@@ -75,0 +80,0 @@ };

@@ -25,3 +25,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

debug,
platform: platform !== null && platform !== void 0 ? platform : 'node',
platform,
});

@@ -28,0 +28,0 @@ /**

@@ -103,2 +103,11 @@ import { FileFormat3 } from '@sketch-hq/sketch-file-format-ts';

/**
* JavaScript errors encountered during rule invocation normalised into plain objects.
*/
export declare type PlainRuleError = {
assistantName: string;
ruleName: string;
message: string;
stack: string;
};
/**
* The result of running an assistant. One or more `violations` implies the assistant's rules found

@@ -111,3 +120,3 @@ * issues with the Sketch document. One or more `errors` implies that some rules didn't run because

violations: Violation[];
errors: Error[];
errors: PlainRuleError[];
metadata: {

@@ -114,0 +123,0 @@ assistant: Omit<AssistantDefinition, 'rules'>;

{
"name": "@sketch-hq/sketch-assistant-utils",
"version": "3.0.0",
"version": "3.0.1",
"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

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