Skip to content

Commit 0a4e887

Browse files
committed
Merge remote-tracking branch 'origin/main' into complete_roles
2 parents c7b8077 + b27c8e4 commit 0a4e887

File tree

495 files changed

+288376
-194682
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

495 files changed

+288376
-194682
lines changed

.changeset/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/brown-ravens-obey.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@neo4j-cypher/react-codemirror-playground': patch
3+
'@neo4j-cypher/react-codemirror': patch
4+
---
5+
6+
Fix incorrect exports

.changeset/config.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch"
10+
}

.changeset/fuzzy-rice-train.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@neo4j-cypher/language-server': major
3+
'@neo4j-cypher/language-support': major
4+
'@neo4j-cypher/react-codemirror': major
5+
'@neo4j-cypher/react-codemirror-playground': major
6+
'@neo4j-cypher/schema-poller': major
7+
'@neo4j-cypher/vscode-extension': major
8+
---
9+
10+
First alpha release of the new Neo4j's Cypher Language Support, including syntax highlighting, auto-completion and linting as features

.changeset/hungry-beans-eat.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
'@neo4j-cypher/react-codemirror': patch
4+
'@neo4j-cypher/language-server': patch
5+
---
6+
7+
Add support for console commands

.changeset/nervous-rabbits-greet.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'neo4j-cypher-vscode-extension': patch
3+
'@neo4j-cypher/language-server': patch
4+
---
5+
6+
Makes language server executable with npx

.changeset/pink-chefs-trade.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@neo4j-cypher/react-codemirror-playground': patch
3+
'@neo4j-cypher/language-support': patch
4+
'@neo4j-cypher/react-codemirror': patch
5+
'neo4j-cypher-vscode-extension': patch
6+
'@neo4j-cypher/language-server': patch
7+
---
8+
9+
Moves semantic analysis to a separate worker file

.changeset/pre.json

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"mode": "pre",
3+
"tag": "next",
4+
"initialVersions": {
5+
"@neo4j-cypher/language-server": "1.0.0",
6+
"@neo4j-cypher/language-support": "1.0.0",
7+
"@neo4j-cypher/react-codemirror": "1.0.0",
8+
"@neo4j-cypher/react-codemirror-playground": "1.0.0",
9+
"@neo4j-cypher/schema-poller": "1.0.0",
10+
"neo4j-for-vscode": "1.0.0",
11+
"antlr4": "4.13.1",
12+
"antlr4-c3": "3.0.1"
13+
},
14+
"changesets": [
15+
"brown-ravens-obey",
16+
"fuzzy-rice-train",
17+
"hungry-beans-eat",
18+
"nervous-rabbits-greet",
19+
"pink-chefs-trade",
20+
"purple-buckets-applaud",
21+
"purple-suns-applaud",
22+
"quick-berries-report",
23+
"silver-students-wait",
24+
"stale-donkeys-grow",
25+
"twelve-cycles-call",
26+
"violet-peas-float"
27+
]
28+
}

.changeset/purple-buckets-applaud.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/react-codemirror': patch
3+
---
4+
5+
Improved history prop change detection

.changeset/purple-suns-applaud.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
---
4+
5+
Fix issue where syntax highlighting crashes on create constraint query

.changeset/quick-berries-report.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/react-codemirror': patch
3+
---
4+
5+
Editor history is now a controlled prop

.changeset/silver-students-wait.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
---
4+
5+
Adds semantic analysis for procedures and functions

.changeset/stale-donkeys-grow.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
---
4+
5+
Fix incorrect completions when identifier overlaps with keyword

.changeset/twelve-cycles-call.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
---
4+
5+
Adds signature help capabilities to the language support

.changeset/violet-peas-float.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@neo4j-cypher/language-support': patch
3+
---
4+
5+
Improves speed of semantic analysis between 2x and 6x

.eslintignore

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
out/
2+
dist/
3+
esm/
24
packages/language-support/src/generated-parser/*
3-
packages/antlr4/src/antlr4/*
4-
packages/antlr4/spec/*
5-
packages/antlr4/src/*
6-
packages/antlr4-c3/src/*
7-
packages/antlr4-c3/tests/*
8-
packages/antlr4-c3/lib/*
95
jest.config.js
6+
jest.config.cjs
107
rollup.config.js
118
index.html
12-
packages/language-support/src/highlighting/semanticAnalysis.js
9+
packages/language-support/src/highlighting/semanticAnalysis.js
10+
.eslintrc.js
11+
vendor/*

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
*.png filter=lfs diff=lfs merge=lfs -text
22
*.gif filter=lfs diff=lfs merge=lfs -text
3+
4+
5+
semanticAnalysis.js linguist-vendored

.github/workflows/benchmark.yaml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Push benchmarks to grafana
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
benchmark:
9+
name: Time benchmark
10+
environment: grafana-api-key
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Setup antlr4
17+
uses: ./.github/actions/setup-antlr4
18+
19+
- name: Install dependencies with frozen lock file and generate parser
20+
run: npm ci
21+
22+
- name: Build project
23+
env:
24+
NODE_OPTIONS: '--max_old_space_size=4096'
25+
run: npm run build
26+
27+
- name: Install Playwright Browsers
28+
run: npx playwright install --with-deps
29+
30+
- name: Benchmark
31+
run: npm run benchmark --concurrency=1
32+
env:
33+
GRAFANA_API_KEY: ${{ secrets.GRAFANA_API_KEY }}

.github/workflows/ci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,5 +85,5 @@ jobs:
8585
if: always()
8686
with:
8787
name: playwright-report
88-
path: packages/react-codemirror-experimental/playwright-report/
88+
path: packages/react-codemirror/playwright-report/
8989
retention-days: 30

.github/workflows/deploy-demo.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Upload artifact
4949
uses: actions/upload-pages-artifact@v1
5050
with:
51-
path: './packages/codemirror-playground/dist/'
51+
path: './packages/react-codemirror-playground/dist/'
5252

5353
- name: Deploy to GitHub Pages
5454
id: deployment

.github/workflows/deploy-cypher-editor.yaml .github/workflows/publish-npm-packages.yaml

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
name: Publish react-editor-experimental package to npm
1+
name: Publish packages to npm
22

33
on:
4-
# Runs on pushes targeting the default branch
54
push:
65
branches: ['main']
76

8-
# Allows you to run this workflow manually from the Actions tab
9-
workflow_dispatch:
10-
117
env:
128
NODE_OPTIONS: '--max_old_space_size=4096'
139

@@ -29,12 +25,11 @@ jobs:
2925
- name: Install dependencies with frozen lock file and generate parser
3026
run: npm ci
3127

32-
- name: Build project
33-
run: npm run build
34-
35-
- name: Publish on updated version number
36-
uses: JS-DevTools/npm-publish@v2
28+
- name: Create Release Pull Request or Publish to npm
29+
id: changesets
30+
uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 # v1.4.5
3731
with:
38-
token: ${{ secrets.NPM_TOKEN }}
39-
package: 'packages/react-codemirror-experimental/package.json'
40-
access: 'restricted'
32+
publish: npm run release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
out
2+
build
3+
dist
4+
esm
25
node_modules
36
generated-parser
47
generated
@@ -8,8 +11,10 @@ generated
811
*.tokens
912
*.vsix
1013
.turbo
11-
build/
12-
dist/
1314
*.antlr
1415
*.jar
15-
*.clinic
16+
*.clinic
17+
*.tsbuildinfo
18+
*.npmrc
19+
benchmarks.txt
20+
.idea/

.husky/post-checkout

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; }
2+
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
33
git lfs post-checkout "$@"

.husky/post-commit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-commit'.\n"; exit 2; }
2+
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
33
git lfs post-commit "$@"

.husky/post-merge

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-merge'.\n"; exit 2; }
2+
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
33
git lfs post-merge "$@"

.husky/pre-push

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
2-
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/pre-push'.\n"; exit 2; }
2+
command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'pre-push' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; }
33
git lfs pre-push "$@"

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18.18.2

.prettierignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
out/
22
packages/language-support/src/generated-parser/*
3-
packages/antlr4-c3/*
3+
vendor/*

.vscode/launch.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@
1414
"name": "VSCode Playground",
1515
"runtimeExecutable": "${execPath}",
1616
"args": [
17-
"--extensionDevelopmentPath=${workspaceRoot}/packages/vscode-playground"
17+
"--extensionDevelopmentPath=${workspaceRoot}/packages/vscode-extension"
18+
],
19+
"outFiles": [
20+
"${workspaceRoot}/packages/vscode-extension/**/*.js",
21+
"${workspaceRoot}/packages/language-support/**/*.js",
22+
"${workspaceRoot}/packages/schema-poller/**/*.js"
1823
],
19-
"outFiles": ["${workspaceRoot}/packages/vscode-playground/out/**/*.js"],
2024
"autoAttachChildProcesses": true,
21-
"preLaunchTask": {
22-
"type": "npm",
23-
"script": "watch"
24-
}
25+
"sourceMaps": true
2526
}
2627
],
2728
"type": "pwa-node",

.vscode/settings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"typescript.tsc.autoDetect": "off",
33
"typescript.preferences.quoteStyle": "single",
44
"editor.codeActionsOnSave": {
5-
"source.fixAll.eslint": true
5+
"source.fixAll.eslint": "explicit"
66
},
77
"editor.defaultFormatter": "esbenp.prettier-vscode",
88
"editor.formatOnSave": true,

CONTRIBUTING.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Contributing to Cypher Language Support
2+
3+
We're grateful for any thoughts or code you share. Feel free to open an issue if you run into a bug or have other improvement suggestions. To contribute a fix or a new feature we have a bit of process you'll need to follow:
4+
5+
- Do your work in a personal fork of the original repository
6+
- Create a branch (with a useful name) for your contribution
7+
- Include unit/e2e tests if appropriate (obviously not necessary for documentation changes)
8+
- Take a moment to read and sign our [Contributor License Agreement](https://neo4j.com/developer/cla).
9+
10+
We can't guarantee that we'll accept pull requests and may ask you to make some changes before they go in.
11+
Occasionally, we might also have logistical, commercial, or legal reasons why we can't accept your work but we'll try to find an alternative way for you to contribute in that case.
12+
13+
## Building the project
14+
15+
Pre-requisites:
16+
17+
- Node.js LTS (18.x)
18+
- [Git LFS](https://git-lfs.github.com/) easiest to install via package manager (e.g. `brew install git-lfs` on macOS)
19+
- [antlr4-tools](https://github.com/antlr/antlr4-tools) easiest to install with `pip install antlr4-tools` (python3 required)
20+
21+
In the root folder of the project run:
22+
23+
- `npm install`
24+
- `npm run build`
25+
26+
From here you can start the `react-codemirror-playground` with:
27+
28+
`npm run dev:codemirror`
29+
30+
To run the VS Code extension, choose `VSCode Playground` in the `Run & Debug` menu in VS Code.

LICENSE LICENSE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Apache License
22
Version 2.0, January 2004
3-
http://www.apache.org/licenses/
3+
https://www.apache.org/licenses/
44

55
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
66

@@ -186,16 +186,16 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2023 Neo4j Inc.
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.
193193
You may obtain a copy of the License at
194194

195-
http://www.apache.org/licenses/LICENSE-2.0
195+
https://www.apache.org/licenses/LICENSE-2.0
196196

197197
Unless required by applicable law or agreed to in writing, software
198198
distributed under the License is distributed on an "AS IS" BASIS,
199199
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200200
See the License for the specific language governing permissions and
201-
limitations under the License.
201+
limitations under the License.

0 commit comments

Comments
 (0)