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

@jupyterlab/settingregistry

Package Overview
Dependencies
Maintainers
35
Versions
282
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jupyterlab/settingregistry - npm Package Compare versions

Comparing version 4.0.0-alpha.18 to 4.0.0-alpha.19

28

lib/settingregistry.d.ts

@@ -33,13 +33,9 @@ import { IDataConnector } from '@jupyterlab/statedb';

/**
* The path in the data where the error occurred.
*/
dataPath: string;
/**
* The keyword whose validation failed.
*/
keyword: string;
keyword: string | string[];
/**
* The error message.
*/
message: string;
message?: string;
/**

@@ -53,2 +49,22 @@ * Optional parameter metadata that might be included in an error.

schemaPath: string;
/**
* @todo handle new fields from ajv8
**/
schema?: unknown;
/**
* @todo handle new fields from ajv8
**/
instancePath: string;
/**
* @todo handle new fields from ajv8
**/
propertyName?: string;
/**
* @todo handle new fields from ajv8
**/
data?: unknown;
/**
* @todo handle new fields from ajv8
**/
parentSchema?: unknown;
}

@@ -55,0 +71,0 @@ }

@@ -14,2 +14,13 @@ // Copyright (c) Jupyter Development Team.

const copy = JSONExt.deepCopy;
/** Default arguments for Ajv instances.
*
* https://ajv.js.org/options.html
*/
const AJV_DEFAULT_OPTIONS = {
/**
* @todo the implications of enabling strict mode are beyond the scope of
* the initial PR
*/
strict: false
};
/**

@@ -33,4 +44,7 @@ * The default number of milliseconds before a `load()` call to the registry

constructor() {
this._composer = new Ajv({ useDefaults: true });
this._validator = new Ajv();
this._composer = new Ajv({
useDefaults: true,
...AJV_DEFAULT_OPTIONS
});
this._validator = new Ajv({ ...AJV_DEFAULT_OPTIONS });
this._composer.addSchema(SCHEMA, 'jupyterlab-plugin-schema');

@@ -60,3 +74,3 @@ this._validator.addSchema(SCHEMA, 'jupyterlab-plugin-schema');

`'object', rejecting type: ${plugin.schema.type}`;
return [{ dataPath: 'type', keyword, schemaPath: '', message }];
return [{ instancePath: 'type', keyword, schemaPath: '', message }];
}

@@ -75,3 +89,3 @@ const errors = this._addSchema(plugin.id, plugin.schema);

{
dataPath: '',
instancePath: '',
keyword: 'syntax',

@@ -87,3 +101,3 @@ schemaPath: '',

{
dataPath: '',
instancePath: '',
keyword: 'parse',

@@ -234,3 +248,3 @@ schemaPath: '',

{
dataPath: '',
instancePath: '',
keyword: 'id',

@@ -361,5 +375,5 @@ message: `Could not fetch settings for ${plugin}.`,

errors.forEach((error, index) => {
const { dataPath, schemaPath, keyword, message } = error;
if (dataPath || schemaPath) {
output.push(`${index} - schema @ ${schemaPath}, data @ ${dataPath}`);
const { instancePath, schemaPath, keyword, message } = error;
if (instancePath || schemaPath) {
output.push(`${index} - schema @ ${schemaPath}, data @ ${instancePath}`);
}

@@ -411,3 +425,3 @@ output.push(`{${keyword}} ${message}`);

{
dataPath: '',
instancePath: '',
keyword: 'id',

@@ -438,3 +452,3 @@ message: `Could not fetch settings for ${plugin}.`,

{
dataPath: '',
instancePath: '',
keyword: 'id',

@@ -459,3 +473,3 @@ message: 'Plugin transformations cannot change plugin IDs.',

{
dataPath: '',
instancePath: '',
keyword: 'timeout',

@@ -462,0 +476,0 @@ message: `Transforming ${plugin.id} timed out.`,

@@ -7,2 +7,3 @@ import { CellType } from '@jupyterlab/nbformat';

import { ISchemaValidator } from './settingregistry';
import type { RJSFSchema, UiSchema } from '@rjsf/utils';
/**

@@ -521,5 +522,2 @@ * The setting registry token.

* The metadata schema.
*
* ## Notes:
* To change to type @rjsf/utils -> RJSFSchema when upgrading rjsf to v5.
*/

@@ -529,8 +527,5 @@ metadataSchema: IMetadataSchema;

* The ui schema as used by react-JSON-schema-form.
*
* ## Notes:
* To change to type @rjsf/utils -> UiSchema when upgrading rjsf to v5.
*/
uiSchema?: {
[metadataKey: string]: PartialJSONObject;
[metadataKey: string]: UiSchema;
};

@@ -562,12 +557,5 @@ /**

* The metadata schema as defined in JSON schema.
*
* ## Notes:
* To remove in favour of @rjsf/utils -> RJSFSchema when upgrading rjsf to v5.
*/
interface IMetadataSchema extends PartialJSONObject {
interface IMetadataSchema extends RJSFSchema {
/**
* The type of data (should be object at first level).
*/
type: string;
/**
* The properties as defined in JSON schema, and interpretable by react-JSON-schema-form.

@@ -574,0 +562,0 @@ */

{
"name": "@jupyterlab/settingregistry",
"version": "4.0.0-alpha.18",
"version": "4.0.0-alpha.19",
"description": "Settings registry for Jupyterlab",

@@ -38,13 +38,14 @@ "homepage": "https://github.com/jupyterlab/jupyterlab",

"dependencies": {
"@jupyterlab/nbformat": "^4.0.0-alpha.18",
"@jupyterlab/statedb": "^4.0.0-alpha.18",
"@lumino/commands": "^2.0.0-alpha.6",
"@lumino/coreutils": "^2.0.0-alpha.6",
"@lumino/disposable": "^2.0.0-alpha.6",
"@lumino/signaling": "^2.0.0-alpha.6",
"ajv": "^6.12.3",
"@jupyterlab/nbformat": "^4.0.0-alpha.19",
"@jupyterlab/statedb": "^4.0.0-alpha.19",
"@lumino/commands": "^2.0.0-beta.1",
"@lumino/coreutils": "^2.0.0-beta.0",
"@lumino/disposable": "^2.0.0-beta.1",
"@lumino/signaling": "^2.0.0-beta.1",
"@rjsf/utils": "^5.1.0",
"ajv": "^8.12.0",
"json5": "^2.2.3"
},
"devDependencies": {
"@jupyterlab/testing": "^4.0.0-alpha.18",
"@jupyterlab/testing": "^4.0.0-alpha.19",
"@types/jest": "^29.2.0",

@@ -51,0 +52,0 @@ "rimraf": "~3.0.0",

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