Skip to content
Open
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
6 changes: 4 additions & 2 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ jobs:
python-version: 3.12
architecture: x64

- name: Install uv
uses: astral-sh/setup-uv@v7

# https://github.com/actions/setup-node
- name: Set up Node.js
uses: actions/setup-node@v6
Expand All @@ -65,8 +68,7 @@ jobs:
- name: Generate runtime grammar
run: |
cd ..
pip install --requirement requirements.txt
python setup_grammar.py javascript
uv run python setup_grammar.py javascript

- name: Set up project
run: npm install
Expand Down
6 changes: 3 additions & 3 deletions DEVELOP.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Javascript:
uv run python setup_grammar.py javascript
```

Now libraries that were built are ready to use, every library e.g. `cratedb_sqlparse_js`
Now libraries that were built are ready to use, every library e.g. `cratedb_sqlparse_js`
are on themselves different projects, with their own dependencies and
dependency management systems.

Expand All @@ -79,7 +79,7 @@ uv run pytest
```shell
uv run poe format
```

## Running Tests for JavaScript
In `./cratedb_sqlparse_js` run:

Expand Down Expand Up @@ -123,7 +123,7 @@ Make sure to run `poe generate` on the root folder first and adjust version numb

Then run:
```shell
npm install --package-lock-only &&
npm install &&
npm run build &&
npm login &&
npm publish
Expand Down
2 changes: 1 addition & 1 deletion cratedb_sqlparse_js/cratedb_sqlparse/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import {sqlparse, Statement} from "./parser.js";
export {sqlparse, Statement};
export const __cratedb_version__ = "5.8.3"
export const __cratedb_version__ = "6.1.1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice that in

def set_version(target: Antlr4Target, version: str):
the versions are set in every language target, so this is already taken care of and there is no need to manually write it.

246 changes: 136 additions & 110 deletions cratedb_sqlparse_js/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions cratedb_sqlparse_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"antlr4": "^4.13.2"
},
"devDependencies": {
"@types/node": "^25.3.1",
"jsdoc": "^4.0.5",
"terser": "^5.46.0",
"vite": "^7.3.1",
Expand Down
3 changes: 2 additions & 1 deletion cratedb_sqlparse_js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"emitDeclarationOnly": true,
"outDir": "./dist",
"declarationMap": true,
"lib": [ "es2015" ],
}
}
}
2 changes: 1 addition & 1 deletion cratedb_sqlparse_py/cratedb_sqlparse/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

__all__ = ["sqlparse", "ParsingException", "Statement"]

__cratedb_version__ = "5.8.3"
__cratedb_version__ = "6.1.1"
Loading