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

@neo4j-cypher/react-codemirror

Package Overview
Dependencies
Maintainers
0
Versions
131
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neo4j-cypher/react-codemirror - npm Package Compare versions

Comparing version 2.0.0-next.15 to 2.0.0-next.16

9

CHANGELOG.md
# @neo4j-cypher/react-codemirror
## 2.0.0-next.16
### Patch Changes
- Updated dependencies [84a12fc]
- Updated dependencies [d329252]
- Updated dependencies [b0e419e]
- @neo4j-cypher/language-support@2.0.0-next.13
## 2.0.0-next.15

@@ -4,0 +13,0 @@

4

dist/e2e_tests/autoCompletion.spec.js

@@ -213,3 +213,3 @@ import { jsx as _jsx } from "react/jsx-runtime";

// and trusting the CSS is making this truly strikethrough
await expect(page.locator('.cm-deprecated-completion')).toBeVisible();
await expect(page.locator('.cm-deprecated-element')).toBeVisible();
});

@@ -227,3 +227,3 @@ test('shows deprecated function as strikethrough on auto-completion', async ({ page, mount, }) => {

// and trusting the CSS is making this truly strikethrough
await expect(page.locator('.cm-deprecated-completion')).toBeVisible();
await expect(page.locator('.cm-deprecated-element')).toBeVisible();
});

@@ -230,0 +230,0 @@ test('does not signature help information on auto-completion if docs and signature are empty', async ({ page, mount, }) => {

@@ -21,3 +21,4 @@ import { jsx as _jsx } from "react/jsx-runtime";

});
test('onExecute updates should override debounce updates', async ({ mount, page, }) => {
// TODO Fix this test
test.fixme('onExecute updates should override debounce updates', async ({ mount, page }) => {
const editorPage = new CypherEditorPage(page);

@@ -24,0 +25,0 @@ let value = '';

@@ -87,2 +87,16 @@ import { jsx as _jsx } from "react/jsx-runtime";

});
test('Strikethroughs are shown for deprecated functions', async ({ page, mount }) => {
const editorPage = new CypherEditorPage(page);
const query = `RETURN id()`;
await mount(_jsx(CypherEditor, { value: query, schema: testData.mockSchema }));
await expect(editorPage.page.locator('.cm-deprecated-element').last()).toBeVisible({ timeout: 3000 });
await editorPage.checkWarningMessage('id', "Function id is deprecated.");
});
test('Strikethroughs are shown for deprecated procedures', async ({ page, mount }) => {
const editorPage = new CypherEditorPage(page);
const query = `CALL apoc.create.uuids()`;
await mount(_jsx(CypherEditor, { value: query, schema: testData.mockSchema }));
await expect(editorPage.page.locator('.cm-deprecated-element').last()).toBeVisible({ timeout: 3000 });
await editorPage.checkWarningMessage('apoc.create.uuids', "Procedure apoc.create.uuids is deprecated.");
});
//# sourceMappingURL=syntaxValidation.spec.js.map

@@ -38,3 +38,3 @@ import { snippet, } from '@codemirror/autocomplete';

if (completion.deprecated) {
return 'cm-deprecated-completion';
return 'cm-deprecated-element';
}

@@ -41,0 +41,0 @@ else {

@@ -35,2 +35,4 @@ import type { Facet } from '@codemirror/state';

number: NodeType;
setting: NodeType;
settingValue: NodeType;
};

@@ -37,0 +39,0 @@ export type PrismSpecificTokenType = 'class-name' | 'identifier' | 'string' | 'relationship' | 'boolean' | 'number';

@@ -40,2 +40,4 @@ import { languageDataProp } from '@codemirror/language';

number: NodeType.define({ id: 28, name: 'numberLiteral' }),
setting: NodeType.define({ id: 29, name: 'setting' }),
settingValue: NodeType.define({ id: 30, name: 'settingValue' }),
});

@@ -64,4 +66,6 @@ export const tokenTypeToStyleTag = {

consoleCommand: tags.macroName,
setting: tags.attributeName,
settingValue: tags.attributeValue,
};
export const parserAdapterNodeSet = (nodes) => new NodeSet(Object.values(nodes)).extend(styleTags(tokenTypeToStyleTag));
//# sourceMappingURL=constants.js.map

@@ -88,3 +88,3 @@ import { HighlightStyle, syntaxHighlighting, } from '@codemirror/language';

},
'.cm-deprecated-completion': {
'.cm-deprecated-element': {
'text-decoration': 'line-through',

@@ -91,0 +91,0 @@ },

import { linter } from '@codemirror/lint';
import { parserWrapper, validateSyntax } from '@neo4j-cypher/language-support';
import { DiagnosticSeverity } from 'vscode-languageserver-types';
import { DiagnosticSeverity, DiagnosticTag } from 'vscode-languageserver-types';
import workerpool from 'workerpool';

@@ -49,10 +49,17 @@ import WorkerURL from './lintWorker?worker&url';

const result = await lastSemanticJob;
return result.map((diag) => {
const a = result.map((diagnostic) => {
return {
from: diag.offsets.start,
to: diag.offsets.end,
severity: diag.severity === DiagnosticSeverity.Error ? 'error' : 'warning',
message: diag.message,
from: diagnostic.offsets.start,
to: diagnostic.offsets.end,
severity: diagnostic.severity === DiagnosticSeverity.Error
? 'error'
: 'warning',
message: diagnostic.message,
...(diagnostic.tags !== undefined &&
diagnostic.tags.includes(DiagnosticTag.Deprecated)
? { markClass: 'cm-deprecated-element' }
: {}),
};
});
return a;
}

@@ -59,0 +66,0 @@ catch (err) {

@@ -20,3 +20,3 @@ {

],
"version": "2.0.0-next.15",
"version": "2.0.0-next.16",
"main": "./dist/index.js",

@@ -55,3 +55,3 @@ "types": "./dist/index.d.ts",

"@lezer/highlight": "^1.1.3",
"@neo4j-cypher/language-support": "2.0.0-next.12",
"@neo4j-cypher/language-support": "2.0.0-next.13",
"@types/prismjs": "^1.26.3",

@@ -58,0 +58,0 @@ "@types/workerpool": "^6.4.7",

@@ -52,3 +52,3 @@ import {

if (completion.deprecated) {
return 'cm-deprecated-completion';
return 'cm-deprecated-element';
} else {

@@ -55,0 +55,0 @@ return null;

@@ -43,2 +43,4 @@ import { languageDataProp } from '@codemirror/language';

number: NodeType.define({ id: 28, name: 'numberLiteral' }),
setting: NodeType.define({ id: 29, name: 'setting' }),
settingValue: NodeType.define({ id: 30, name: 'settingValue' }),
});

@@ -82,2 +84,4 @@

consoleCommand: tags.macroName,
setting: tags.attributeName,
settingValue: tags.attributeValue,
};

@@ -84,0 +88,0 @@

@@ -133,3 +133,3 @@ import {

},
'.cm-deprecated-completion': {
'.cm-deprecated-element': {
'text-decoration': 'line-through',

@@ -136,0 +136,0 @@ },

import { Diagnostic, linter } from '@codemirror/lint';
import { Extension } from '@codemirror/state';
import { parserWrapper, validateSyntax } from '@neo4j-cypher/language-support';
import { DiagnosticSeverity } from 'vscode-languageserver-types';
import { DiagnosticSeverity, DiagnosticTag } from 'vscode-languageserver-types';
import workerpool from 'workerpool';

@@ -77,11 +77,18 @@ import type { CypherConfig } from './langCypher';

return result.map((diag) => {
const a: Diagnostic[] = result.map((diagnostic) => {
return {
from: diag.offsets.start,
to: diag.offsets.end,
from: diagnostic.offsets.start,
to: diagnostic.offsets.end,
severity:
diag.severity === DiagnosticSeverity.Error ? 'error' : 'warning',
message: diag.message,
diagnostic.severity === DiagnosticSeverity.Error
? 'error'
: 'warning',
message: diagnostic.message,
...(diagnostic.tags !== undefined &&
diagnostic.tags.includes(DiagnosticTag.Deprecated)
? { markClass: 'cm-deprecated-element' }
: {}),
};
});
return a;
} catch (err) {

@@ -88,0 +95,0 @@ if (!(err instanceof workerpool.Promise.CancellationError)) {

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

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