-
Notifications
You must be signed in to change notification settings - Fork 7
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
Adds scaffolding for publishing #124
Conversation
changeset pre enter next
"outFiles": [ | ||
"${workspaceRoot}/packages/vscode-extension/**/*.js", | ||
"${workspaceRoot}/packages/language-support/**/*.cjs", | ||
"${workspaceRoot}/packages/schema-poller/**/*.cjs" | ||
], | ||
"autoAttachChildProcesses": true, | ||
"preLaunchTask": { | ||
"type": "npm", | ||
"script": "watch" | ||
} | ||
"sourceMaps": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixes the VSCode debugging
@@ -34,6 +35,6 @@ | |||
"prettier-plugin-organize-imports": "^3.2.1", | |||
"ts-jest": "^29.1.1", | |||
"turbo": "^1.10.15", | |||
"typescript": "^4.8.4" | |||
"typescript": "4.9.5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aligns the same typescript version everywhere
@@ -0,0 +1,15 @@ | |||
{ | |||
"mode": "pre", | |||
"tag": "next", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know how it works but my intuition tells me we should be using this next tag instead of the alpha one? At least that's what they even describe in the changesets documentation
@@ -14,11 +22,11 @@ | |||
}, | |||
"scripts": { | |||
"gen-parser": "antlr4 -Dlanguage=TypeScript -visitor src/antlr-grammar/CypherParser.g4 src/antlr-grammar/CypherLexer.g4 -o src/generated-parser/ -Xexact-output-dir", | |||
"postinstall": "npm run gen-parser", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this as far as I know. The generated parser should be included in the package
"module": "./esm/index.js", | ||
"version": "2.0.0-next.0", | ||
"main": "./dist/cjs/index.cjs", | ||
"moudle": "./dist/esm/index.mjs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mispelt
vendor/antlr4-c3/deps
Outdated
@@ -0,0 +1,1606 @@ | |||
@[email protected] /Users/ncordon/neo4j/intellisense/cypher-lsp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file
@@ -1,7 +1,8 @@ | |||
{ | |||
"compilerOptions": { | |||
"declaration": true, | |||
"target": "ES2022", | |||
"target": "ESNext", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Research whether we should use ESNext vs es2020 for example
"ignore": [ | ||
"antlr4", | ||
"antlr4-c3", | ||
"vscode-extension", | ||
"react-codemirror-playground", | ||
"schema-poller" | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need this. In the description of ignore
it says Packages that should not be released
@@ -0,0 +1,25 @@ | |||
# Node files |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if we need this file either
"version": "0.0.1", | ||
"main": "dist/cypher-language-server.js", | ||
"version": "2.0.0-next.0", | ||
"main": "./dist/server.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for VSCode debugging to work
"type": "npm", | ||
"script": "watch" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure whether we need the watch but it seems broken to me locally
const runServer = context.asAbsolutePath( | ||
path.join('dist', 'cypher-language-server.js'), | ||
); | ||
const debugServer = context.asAbsolutePath( | ||
path.join('..', 'language-server', 'dist', 'server.js'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a different configuration for debug and for running (once the extension is compiled, the language server has to be living inside it, we cannot use a relative path). Also we want that language server to be minified.
@@ -9,7 +9,8 @@ | |||
"skipLibCheck": true, | |||
"sourceMap": true, | |||
"target": "ESNext", | |||
"outDir": "dist" | |||
"outDir": "dist", | |||
"incremental": true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enables incremental compilation
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@neo4j-cypher", | |||
"description": "Cypher Language Support", | |||
"name": "neo4j-cypher-language-support", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This name wasn't valid for the top package because of the @
🤷♂️
"name": "@neo4j-cypher/vscode-extension", | ||
"description": "Neo4j's Cypher VSCode extension", | ||
"author": "neo4j", | ||
"name": "neo4j-cypher-vscode-extension", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The command to publish the VSCode extension doesn't like this name either
This PR brings a lot of changes to make the package ready for publishing:
.vscode/launch
file and giving them the paths of all source maps inside language support and schema-poller.npm run build
, unless you run a clean.changeset
and aligns all versions on a 2.0.0-next.0 release.CypherLSP.neo4j
to justneo4j
namespace, which looks cleaner:Caveats
package-lock.json
has a lot of changes. I upgraded my npm locally to 9.5.0 so maybe that is caused a lot of them.