Skip to content

Commit

Permalink
Renames every package to be @neo4j-cypher
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Oct 19, 2023
1 parent 24be6b0 commit 05dec58
Show file tree
Hide file tree
Showing 28 changed files with 108 additions and 79 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,5 @@ jobs:
if: always()
with:
name: playwright-report
path: packages/react-codemirror-experimental/playwright-report/
path: packages/react-codemirror/playwright-report/
retention-days: 30
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cypher-editor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@ jobs:
uses: JS-DevTools/npm-publish@v2
with:
token: ${{ secrets.NPM_TOKEN }}
package: 'packages/react-codemirror-experimental/package.json'
package: 'packages/react-codemirror/package.json'
access: 'restricted'
66 changes: 36 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "cypher-lsp",
"description": "Cypher LSP",
"name": "@neo4j-cypher",
"description": "Cypher Language Support",
"license": "Apache",
"version": "1.0.0",
"categories": [],
"repository": {
"type": "git",
"url": "git+https://github.com/neo4j/cypher-lsp.git"
"url": "git+https://github.com/neo4j/cypher-language-support.git"
},
"workspaces": [
"packages/*"
Expand Down
6 changes: 3 additions & 3 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "cypher-language-server",
"name": "@neo4j-cypher/language-server",
"description": "Cypher Language Server",
"author": "neo4j",
"license": "Apache-2.0",
"version": "0.0.1",
"main": "dist/server.js",
"types": "src/server.ts",
"dependencies": {
"language-support": "*",
"@neo4j-cypher/language-support": "*",
"@neo4j-cypher/schema-poller": "*",
"neo4j-driver": "^5.3.0",
"schema-poller": "*",
"vscode-languageserver": "^8.1.0",
"vscode-languageserver-textdocument": "^1.0.8"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/src/autocompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import {

import { Range } from 'vscode-languageserver-types';

import { autocomplete } from 'language-support';
import { Neo4jSchemaPoller } from 'schema-poller';
import { autocomplete } from '@neo4j-cypher/language-support';
import { Neo4jSchemaPoller } from '@neo4j-cypher/schema-poller';
import { TextDocument } from 'vscode-languageserver-textdocument';

export function doAutoCompletion(
Expand Down
7 changes: 5 additions & 2 deletions packages/language-server/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ import {

import { TextDocument } from 'vscode-languageserver-textdocument';

import { syntaxColouringLegend, validateSyntax } from 'language-support';
import { Neo4jSchemaPoller } from 'schema-poller';
import {
syntaxColouringLegend,
validateSyntax,
} from '@neo4j-cypher/language-support';
import { Neo4jSchemaPoller } from '@neo4j-cypher/schema-poller';
import { doAutoCompletion } from './autocompletion';
import { doSignatureHelp } from './signatureHelp';
import { applySyntaxColouringForDocument } from './syntaxColouring';
Expand Down
4 changes: 2 additions & 2 deletions packages/language-server/src/signatureHelp.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { signatureHelp } from 'language-support';
import { signatureHelp } from '@neo4j-cypher/language-support';
import {
Position,
Range,
Expand All @@ -7,7 +7,7 @@ import {
TextDocuments,
} from 'vscode-languageserver/node';

import { Neo4jSchemaPoller } from 'schema-poller';
import { Neo4jSchemaPoller } from '@neo4j-cypher/schema-poller';
import { TextDocument } from 'vscode-languageserver-textdocument';

export const emptyResult: SignatureHelp = {
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/src/syntaxColouring.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
applySyntaxColouring,
mapCypherToSemanticTokenIndex,
} from 'language-support';
} from '@neo4j-cypher/language-support';
import {
SemanticTokensBuilder,
SemanticTokensParams,
Expand Down
2 changes: 1 addition & 1 deletion packages/language-support/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "language-support",
"name": "@neo4j-cypher/language-support",
"description": "Cypher language support",
"author": "neo4j",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-codemirror-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "codemirror-playground",
"name": "@neo4j-cypher/react-codemirror-playground",
"private": true,
"version": "0.0.0",
"type": "module",
Expand All @@ -9,14 +9,14 @@
"preview": "vite preview"
},
"dependencies": {
"@neo4j-cypher/language-support": "*",
"@codemirror/autocomplete": "^6.5.1",
"@codemirror/commands": "^6.2.2",
"@codemirror/language": "^6.6.0",
"@lezer/common": "^1.0.2",
"@lezer/highlight": "^1.1.3",
"@neo4j-cypher/react-codemirror-experimental": "*",
"@uiw/react-codemirror": "^4.19.9",
"language-support": "*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"vite-plugin-node-stdlib-browser": "^0.2.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-codemirror-playground/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CypherEditor } from '@neo4j-cypher/react-codemirror-experimental';
import { DbSchema } from 'language-support';
import { DbSchema } from '@neo4j-cypher/language-support';
import { CypherEditor } from '@neo4j-cypher/react-codemirror';
import { useMemo, useState } from 'react';
import { Tree } from 'react-d3-tree';
import { dummyDbSchema } from './mock-schema.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror-playground/src/TokenTable.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { applySyntaxColouring } from 'language-support';
import { applySyntaxColouring } from '@neo4j-cypher/language-support';
import React from 'react';

export function TokenTable({ document }: { document: string }) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror-playground/src/tree-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
CypherParser,
parse,
ParserRuleContext,
} from 'language-support';
} from '@neo4j-cypher/language-support';

export function getDebugTree(cypher: string): SimpleTree {
const statements = parse(cypher);
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@neo4j-cypher/react-codemirror-experimental",
"name": "@neo4j-cypher/react-codemirror",
"license": "Apache-2.0",
"files": [
"dist",
Expand Down
3 changes: 1 addition & 2 deletions packages/react-codemirror/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ export default defineConfig({
],

webServer: {
command:
'npm run e2e-http-server -w @neo4j-cypher/react-codemirror-experimental',
command: 'npm run e2e-http-server -w @neo4j-cypher/react-codemirror',
url: 'http://localhost:3000',
reuseExistingServer: !process.env.CI,
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/CypherEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { EditorView, KeyBinding, keymap } from '@codemirror/view';
import type { DbSchema } from '@neo4j-cypher/language-support';
import CodeEditor, {
ReactCodeMirrorProps,
ReactCodeMirrorRef,
} from '@uiw/react-codemirror';
import type { DbSchema } from 'language-support';
import React from 'react';
import { cypher } from './lang-cypher/lang-cypher';
import { basicNeo4jSetup } from './neo4j-setup';
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export { CypherParser, parse } from '@neo4j-cypher/language-support';
export * as ReactCodemirror from '@uiw/react-codemirror';
export { CypherParser, parse } from 'language-support';
export { CypherEditor } from './CypherEditor';
export { cypher } from './lang-cypher/lang-cypher';
export { darkThemeConstants, lightThemeConstants } from './themes';
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/lang-cypher/ParserAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
applySyntaxColouring,
CypherTokenType,
ParsedCypherToken,
} from 'language-support';
} from '@neo4j-cypher/language-support';
import { cypherTokenTypeToNode, parserAdapterNodeSet } from './constants';

const DEFAULT_NODE_GROUP_SIZE = 4;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/lang-cypher/autocomplete.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CompletionSource } from '@codemirror/autocomplete';
import { autocomplete, DbSchema } from 'language-support';
import { autocomplete, DbSchema } from '@neo4j-cypher/language-support';
import { CompletionItemKind } from 'vscode-languageserver-types';
import { CompletionItemIcons } from '../icons';

Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/lang-cypher/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { languageDataProp } from '@codemirror/language';
import type { Facet } from '@codemirror/state';
import { NodeSet, NodeType } from '@lezer/common';
import { styleTags, Tag, tags } from '@lezer/highlight';
import { CypherTokenType } from 'language-support';
import { CypherTokenType } from '@neo4j-cypher/language-support';

export const cypherTokenTypeToNode = (facet: Facet<unknown>) => ({
topNode: NodeType.define({
Expand Down
2 changes: 1 addition & 1 deletion packages/react-codemirror/src/lang-cypher/lang-cypher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {
Language,
LanguageSupport,
} from '@codemirror/language';
import type { DbSchema } from 'language-support';
import type { DbSchema } from '@neo4j-cypher/language-support';
import { cypherAutocomplete } from './autocomplete';
import { ParserAdapter } from './ParserAdapter';
import { cypherLinter } from './syntax-validation';
Expand Down
Loading

0 comments on commit 05dec58

Please sign in to comment.