New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@squiz/dx-json-schema-lib

Package Overview
Dependencies
Maintainers
52
Versions
488
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squiz/dx-json-schema-lib - npm Package Compare versions

Comparing version 1.65.0 to 1.65.1

6

CHANGELOG.md
# Change Log
## 1.65.1
### Patch Changes
- 928cc88: Made children optional for formatted text nodes/tags
## 1.65.0

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

2

lib/formatted-text/v1/formattedText.d.ts

@@ -32,3 +32,3 @@ /**

export interface FormattedTextTag {
children: WithChildrenNode;
children?: WithChildrenNode;
formattingOptions?: FormattingOptions;

@@ -35,0 +35,0 @@ type: 'tag';

@@ -79,3 +79,3 @@ {

},
"required": ["type", "tag", "children"]
"required": ["type", "tag"]
},

@@ -82,0 +82,0 @@ "ComponentNode": {

@@ -34,2 +34,3 @@ import { Input } from '@sagold/json-query';

resolveInput(input: Input, inputSchema: JSONSchema): Promise<Input>;
private assignResolvedData;
protected resolveInputArray(input: Input, setters: Promise<(input: Input) => Input>[], schema: JSONSchema, value: unknown, pointer: string): Promise<void>;

@@ -36,0 +37,0 @@ private isPrimitiveSchema;

@@ -247,2 +247,17 @@ "use strict";

}
assignResolvedData(input, pointer, resolvedData) {
// TODO: Revert to using JSONQuery.set once https://github.com/sagold/json-query/pull/27 is resolved.
// Test "should resolve multiple primitive type array items in multi-level nested array structures" confirms
// desired behaviour.
json_query_1.default.get(input, pointer, (unresolvedData) => {
if (resolvedData === unresolvedData) {
return;
}
for (const prop of Object.getOwnPropertyNames(unresolvedData)) {
delete unresolvedData[prop];
}
Object.assign(unresolvedData, resolvedData);
});
return input;
}
async resolveInputArray(input, setters, schema, value, pointer) {

@@ -262,3 +277,3 @@ const allPossibleSchemaTitles = schema.oneOf.map((o) => {

.then(() => resolver(value))
.then((resolvedData) => (item) => json_query_1.default.set(item, pointer, resolvedData, 'replace'))
.then((resolvedData) => (item) => this.assignResolvedData(item, pointer, resolvedData))
.catch((e) => Promise.reject(new JsonResolutionError_1.JsonResolutionError(e, pointer, value)));

@@ -265,0 +280,0 @@ setters.push(setResolvedData);

{
"name": "@squiz/dx-json-schema-lib",
"version": "1.65.0",
"version": "1.65.1",
"description": "",

@@ -23,3 +23,3 @@ "main": "lib/index.js",

"@types/jest": "28.1.8",
"@types/node": "18.15.2",
"@types/node": "20.11.24",
"dotenv": "16.0.3",

@@ -26,0 +26,0 @@ "jest": "29.4.1",

@@ -90,3 +90,3 @@ {

},
"required": ["type", "tag", "children"]
"required": ["type", "tag"]
},

@@ -93,0 +93,0 @@

@@ -35,3 +35,3 @@ /* eslint-disable */

export interface FormattedTextTag {
children: WithChildrenNode;
children?: WithChildrenNode;
formattingOptions?: FormattingOptions;

@@ -38,0 +38,0 @@ type: 'tag';

@@ -289,2 +289,21 @@ import JSONQuery, { Input } from '@sagold/json-query';

private assignResolvedData(input: Input, pointer: string, resolvedData: unknown): Input {
// TODO: Revert to using JSONQuery.set once https://github.com/sagold/json-query/pull/27 is resolved.
// Test "should resolve multiple primitive type array items in multi-level nested array structures" confirms
// desired behaviour.
JSONQuery.get(input, pointer, (unresolvedData) => {
if (resolvedData === unresolvedData) {
return;
}
for (const prop of Object.getOwnPropertyNames(unresolvedData)) {
delete unresolvedData[prop];
}
Object.assign(unresolvedData, resolvedData);
});
return input;
}
protected async resolveInputArray(

@@ -310,5 +329,3 @@ input: Input,

.then(() => resolver(value))
.then(
(resolvedData) => (item: typeof input) => JSONQuery.set(item, pointer, resolvedData, 'replace' as any), //import issue
)
.then((resolvedData) => (item: typeof input) => this.assignResolvedData(item, pointer, resolvedData))
.catch((e) => Promise.reject(new JsonResolutionError(e, pointer, value)));

@@ -315,0 +332,0 @@ setters.push(setResolvedData);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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