Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sets up publishing #127

Merged
merged 9 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,5 @@
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"antlr4",
"antlr4-c3",
"vscode-extension",
"react-codemirror-playground",
"schema-poller"
]
"updateInternalDependencies": "patch"
}
2 changes: 1 addition & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@neo4j-cypher/react-codemirror": "1.0.0",
"@neo4j-cypher/react-codemirror-playground": "1.0.0",
"@neo4j-cypher/schema-poller": "1.0.0",
"@neo4j-cypher/vscode-extension": "1.0.0",
"neo4j-cypher-vscode-extension": "1.0.0",
"antlr4": "4.13.1",
"antlr4-c3": "3.0.1"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: Publish react-codemirror package to npm
name: Publish packages to npm

on:
# Runs on pushes targeting the default branch
# push:
# branches: ['main']

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
push:
branches: ['publishing']

env:
NODE_OPTIONS: '--max_old_space_size=4096'
Expand All @@ -32,9 +28,10 @@ jobs:
- name: Build project
run: npm run build

- name: Publish on updated version number
uses: JS-DevTools/npm-publish@v2
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@f13b1baaa620fde937751f5d2c3572b9da32af23 # v1.4.5
with:
token: ${{ secrets.NPM_TOKEN }}
package: 'packages/react-codemirror/package.json'
access: 'restricted'
publish: npm run release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ generated
.turbo
*.antlr
*.jar
*.clinic
*.clinic
*.tsbuildinfo
25 changes: 0 additions & 25 deletions .npmignore

This file was deleted.

1 change: 0 additions & 1 deletion package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"scripts": {
"prepare": "husky install",
"build": "turbo run build",
"release": "turbo run build && npx changeset publish",
"clean": "turbo run clean",
"watch": "turbo run watch",
"test": "turbo run test",
Expand Down
2 changes: 1 addition & 1 deletion packages/language-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ A language server wrapper for the `@neo4j-cypher/language-support` package.
## Bundle the server and run with node

To package the language server into a single javascript bundle, go to the root of the project and
do `npm run bundle`.
do `npm run build`.
After that a file `./packages/language-server/dist/cypher-language-server.js` will be generated.

You can run the language server with `node ./cypher-language-server.js --stdio`.
Expand Down
34 changes: 30 additions & 4 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,46 @@
{
"name": "@neo4j-cypher/language-server",
"description": "Cypher Language Server",
"author": "Neo4j",
"author": "Neo4j Inc.",
"license": "Apache-2.0",
"files": [
"./dist/cypher-language-server.js",
"./src",
"package.json",
"README.md",
"LICENSE.md",
"CHANGELOG.md"
],
"keywords": [
"neo4j",
"cypher",
"language server"
],
"version": "2.0.0-next.0",
"main": "./dist/server.js",
"main": "./dist/cypher-language-server.js",
"types": "src/server.ts",
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bin": {
"cypher-language-server": "/dist/cypher-language-server.js"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.0",
"@neo4j-cypher/schema-poller": "2.0.0-next.0",
"neo4j-driver": "^5.3.0",
"vscode-languageserver": "^8.1.0",
"vscode-languageserver-textdocument": "^1.0.8"
},
"scripts": {
"build": "tsc -b",
"build": "tsc -b && npm run bundle",
"bundle": "esbuild ./src/server.ts --bundle --format=cjs --platform=node --outfile=dist/cypher-language-server.js",
"clean": "rm -rf dist",
"watch": "tsc -b -w"
Expand Down
28 changes: 27 additions & 1 deletion packages/language-support/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,23 @@
{
"name": "@neo4j-cypher/language-support",
"description": "Cypher language support",
"author": "Neo4j",
"author": "Neo4j Inc.",
"license": "Apache-2.0",
"files": [
"dist",
"src",
"package.json",
"README.md",
"LICENSE.md",
"CHANGELOG.md"
],
"keywords": [
"neo4j",
"cypher",
"autocompletion",
"linting",
"highlighting"
],
"version": "2.0.0-next.0",
"main": "./dist/cjs/index.cjs",
"module": "./dist/esm/index.mjs",
Expand All @@ -14,6 +29,17 @@
"default": "./dist/cjs/index.cjs"
}
},
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2"
},
"dependencies": {
"antlr4": "*",
"antlr4-c3": "*",
Expand Down
11 changes: 11 additions & 0 deletions packages/react-codemirror-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@
"build": "tsc --noEmit && vite build",
"preview": "vite preview"
},
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.0",
"@neo4j-cypher/react-codemirror": "2.0.0-next.0",
Expand Down
24 changes: 23 additions & 1 deletion packages/react-codemirror/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,19 @@
"license": "Apache-2.0",
"files": [
"dist",
"src",
"package.json",
"README.md"
"README.md",
"LICENSE.md",
"CHANGELOG.md"
],
"keywords": [
"neo4j",
"cypher",
"react",
"editor",
"codemirror",
"codemirror 6"
],
"version": "2.0.0-next.0",
"main": "./dist/cjs/index.cjs",
Expand All @@ -28,6 +39,17 @@
"test:e2e": "playwright test -c playwright-ct.config.ts",
"test:e2e-ui": "playwright test -c playwright-ct.config.ts --ui"
},
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.0",
"@codemirror/autocomplete": "^6.5.1",
Expand Down
16 changes: 14 additions & 2 deletions packages/schema-poller/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
{
"name": "@neo4j-cypher/schema-poller",
"private": true,
"description": "",
"author": "Neo4j",
"author": "Neo4j Inc.",
"license": "Apache-2.0",
"version": "2.0.0-next.0",
"main": "./dist/cjs/src/index.js",
"moudle": "./dist/esm/src/index.js",
"module": "./dist/esm/src/index.js",
"exports": {
".": {
"require": "./dist/cjs/src/index.js",
"import": "./dist/esm/src/index.js",
"default": "./dist/cjs/src/index.js"
}
},
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2"
},
"dependencies": {
"@neo4j-cypher/language-support": "2.0.0-next.0",
"neo4j-driver": "^5.12.0"
Expand Down
21 changes: 15 additions & 6 deletions packages/vscode-extension/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
{
"name": "neo4j-cypher-vscode-extension",
"private": true,
"description": "Enables support for Neo4j and its query language Cypher",
"author": "Neo4j",
"author": "Neo4j Inc.",
"license": "Apache-2.0",
"version": "2.0.0-next.0",
"repository": "https://github.com/neo4j/cypher-language-support",
"engines": {
"vscode": "^1.75.0"
},
"publisher": "Neo4j",
"publisher": "Neo4j Inc.",
"activationEvents": [
"onLanguage:cypher"
],
"main": "./dist/extension.js",
"repository": {
"type": "git",
"url": "git://github.com/neo4j/cypher-language-support.git"
},
"bugs": {
"url": "https://github.com/neo4j/cypher-language-support/issues"
},
"engineStrict": true,
"engines": {
"node": ">=18.18.2",
"vscode": "^1.75.0"
},
"contributes": {
"languages": [
{
Expand Down