Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into database-procedures-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Sep 18, 2024
2 parents 023270b + 752ddf6 commit 30ddb3f
Show file tree
Hide file tree
Showing 19 changed files with 468 additions and 1,431 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"purple-buckets-applaud",
"purple-suns-applaud",
"quick-berries-report",
"selfish-wombats-pay",
"silver-students-wait",
"stale-donkeys-grow",
"stale-peas-warn",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/selfish-wombats-pay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@neo4j-cypher/language-support': patch
---

Fixes bug using non language keywords (EXPLAIN, PROFILE, etc) as symbolic names
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@50750fa876cc1e54c7cb972db5e2f7271fc53d99 # v1.4.8
uses: changesets/action@3de3850952bec538fde60aac71731376e57b9b57 # v1.4.8
with:
publish: npm run release
env:
Expand Down
1,804 changes: 385 additions & 1,419 deletions package-lock.json

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions packages/language-server/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @neo4j-cypher/language-server

## 2.0.0-next.9

### Patch Changes

- Updated dependencies [05663bd]
- @neo4j-cypher/language-support@2.0.0-next.8

## 2.0.0-next.8

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"cypher",
"language server"
],
"version": "2.0.0-next.8",
"version": "2.0.0-next.9",
"main": "./dist/server.js",
"types": "src/server.ts",
"repository": {
Expand All @@ -34,7 +34,7 @@
"cypher-language-server": "./dist/cypher-language-server"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.7",
"@neo4j-cypher/language-support": "2.0.0-next.8",
"lodash.debounce": "^4.0.8",
"neo4j-driver": "^5.3.0",
"vscode-languageserver": "^8.1.0",
Expand Down
6 changes: 6 additions & 0 deletions packages/language-support/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @neo4j-cypher/language-support

## 2.0.0-next.8

### Patch Changes

- 05663bd: Fixes bug using non language keywords (EXPLAIN, PROFILE, etc) as symbolic names

## 2.0.0-next.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/language-support/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"linting",
"highlighting"
],
"version": "2.0.0-next.7",
"version": "2.0.0-next.8",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.mjs",
"types": "./dist/types/index.d.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ useCmd: useCompletionRule symbolicAliasName?;
listCompletionRule: LIST;

useCompletionRule: USE;

externalKeywords: preparserOption | HISTORY | CLEAR | PARAM;
7 changes: 7 additions & 0 deletions packages/language-support/src/antlr-grammar/CypherParser.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1769,6 +1769,12 @@ symbolicLabelNameString
| unescapedLabelSymbolicNameString
;

// Do not remove this, it is needed for composing the grammar
// with other ones (e.g. language support ones)
externalKeywords
: IDENTIFIER
;

unescapedLabelSymbolicNameString
: IDENTIFIER
| ACCESS
Expand Down Expand Up @@ -2025,6 +2031,7 @@ unescapedLabelSymbolicNameString
| YIELD
| ZONE
| ZONED
| externalKeywords
;

endOfFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -976,4 +976,19 @@ describe('Syntactic validation spec', () => {
},
]);
});

test.each([
`MATCH (n:Test1) RETURN n.profile`,
`CREATE (n:Test1 {explain: 'Explain'});`,
`RETURN { clear: 'Clear', params: 'params', history: 'history'}`,
])(
'Syntax validation should not fail if cmd keywords are used in map properties %s',
(query) => {
expect(
getDiagnosticsForQuery({
query,
}),
).toEqual([]);
},
);
});
8 changes: 8 additions & 0 deletions packages/react-codemirror-playground/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @neo4j-cypher/react-codemirror-playground

## 2.0.0-next.11

### Patch Changes

- Updated dependencies [05663bd]
- @neo4j-cypher/language-support@2.0.0-next.8
- @neo4j-cypher/react-codemirror@2.0.0-next.11

## 2.0.0-next.10

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/react-codemirror-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@neo4j-cypher/react-codemirror-playground",
"private": true,
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"type": "module",
"scripts": {
"dev": "vite --open",
Expand All @@ -21,8 +21,8 @@
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.7",
"@neo4j-cypher/react-codemirror": "2.0.0-next.10",
"@neo4j-cypher/language-support": "2.0.0-next.8",
"@neo4j-cypher/react-codemirror": "2.0.0-next.11",
"@codemirror/autocomplete": "^6.5.1",
"@codemirror/commands": "^6.2.2",
"@codemirror/language": "^6.6.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-codemirror/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @neo4j-cypher/react-codemirror

## 2.0.0-next.11

### Patch Changes

- Updated dependencies [05663bd]
- @neo4j-cypher/language-support@2.0.0-next.8

## 2.0.0-next.10

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/react-codemirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"codemirror",
"codemirror 6"
],
"version": "2.0.0-next.10",
"version": "2.0.0-next.11",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"type": "module",
Expand Down Expand Up @@ -51,7 +51,7 @@
"@codemirror/view": "^6.29.1",
"@lezer/common": "^1.0.2",
"@lezer/highlight": "^1.1.3",
"@neo4j-cypher/language-support": "2.0.0-next.7",
"@neo4j-cypher/language-support": "2.0.0-next.8",
"@types/prismjs": "^1.26.3",
"@types/workerpool": "^6.4.7",
"ayu": "^8.0.1",
Expand Down
7 changes: 7 additions & 0 deletions packages/schema-poller/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @neo4j-cypher/schema-poller

## 2.0.0-next.8

### Patch Changes

- Updated dependencies [05663bd]
- @neo4j-cypher/language-support@2.0.0-next.8

## 2.0.0-next.7

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/schema-poller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"author": "Neo4j Inc.",
"license": "Apache-2.0",
"version": "2.0.0-next.7",
"version": "2.0.0-next.8",
"main": "./dist/cjs/src/index.js",
"module": "./dist/esm/src/index.js",
"exports": {
Expand All @@ -26,7 +26,7 @@
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.7",
"@neo4j-cypher/language-support": "2.0.0-next.8",
"ajv": "^8.12.0",
"neo4j-driver": "^5.12.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@
"test:webviews": "wdio run ./dist/tests/runWebviewTests.js"
},
"dependencies": {
"@neo4j-cypher/language-server": "2.0.0-next.8",
"@neo4j-cypher/language-server": "2.0.0-next.9",
"@neo4j-ndl/base": "^2.12.3",
"@neo4j-ndl/react": "^2.16.5",
"neo4j-driver": "^5.12.0",
Expand Down
6 changes: 6 additions & 0 deletions release-canary.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ function buildProject() {

const langSupport = 'packages/language-support';
const reactCodemirror = 'packages/react-codemirror';
const reactCodemirrorPlayground = 'packages/react-codemirror-playground';
const langSupportVersion = getCanaryVersion(langSupport);
const reactCodemirrorVersion = getCanaryVersion(reactCodemirror);

Expand All @@ -97,6 +98,11 @@ replaceDependency(
'@neo4j-cypher/language-support',
langSupportVersion,
);
replaceDependency(
reactCodemirrorPlayground,
'@neo4j-cypher/react-codemirror',
reactCodemirrorVersion,
);
updateVersion(reactCodemirror, reactCodemirrorVersion);
// We need to rebuild everything with the newly generated versions
buildProject();
Expand Down

0 comments on commit 30ddb3f

Please sign in to comment.