Skip to content

Commit 3badcbb

Browse files
committed
more build/cleanup/chores
1 parent add87aa commit 3badcbb

7 files changed

Lines changed: 46 additions & 14 deletions

File tree

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.PHONY: all build test wasm extension editor playground website clean
1+
.PHONY: all build test wasm extension editor playground website clean publish
22

33
# Build everything
44
all: extension wasm editor
@@ -55,6 +55,11 @@ website-build:
5555
install:
5656
pnpm install
5757

58+
# Build and publish npm packages
59+
publish: editor react
60+
cd editor/codemirror && npm publish
61+
cd react && npm publish
62+
5863
# Clean build artifacts
5964
clean:
6065
rm -f gnata_jsonata.dylib gnata_jsonata.so gnata_jsonata.h

editor/codemirror/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"@codemirror/lint": "^6.0.0",
3434
"@codemirror/state": "^6.0.0",
3535
"@codemirror/view": "^6.0.0",
36-
"@lezer/generator": "^1.0.0",
36+
"@lezer/generator": "^1.7.1",
3737
"@lezer/highlight": "^1.0.0",
3838
"@lezer/lr": "^1.0.0",
3939
"@rollup/plugin-node-resolve": "^16.0.0",
@@ -44,5 +44,13 @@
4444
"tslib": "^2.8.1",
4545
"typescript": "^5.9.3"
4646
},
47-
"license": "MIT"
47+
"license": "MIT",
48+
"repository": {
49+
"type": "git",
50+
"url": "https://github.com/rbbydotdev/gnata-sqlite",
51+
"directory": "editor/codemirror"
52+
},
53+
"publishConfig": {
54+
"access": "public"
55+
}
4856
}
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { lezer } from "@lezer/generator/rollup"
22
import { nodeResolve } from "@rollup/plugin-node-resolve"
3-
import ts from "rollup-plugin-ts"
3+
import typescript from "@rollup/plugin-typescript"
44

55
export default {
66
input: "src/index.ts",
@@ -9,5 +9,18 @@ export default {
99
{ file: "dist/index.cjs", format: "cjs", sourcemap: true },
1010
],
1111
external: (id) => /^@codemirror|^@lezer/.test(id),
12-
plugins: [lezer(), nodeResolve(), ts()],
12+
plugins: [
13+
lezer(),
14+
nodeResolve(),
15+
typescript({
16+
compilerOptions: {
17+
declaration: true,
18+
declarationDir: "dist",
19+
skipLibCheck: true,
20+
// Suppress TS2742 (inferred type not portable) and TS2307 (grammar import)
21+
noEmit: false,
22+
},
23+
noForceEmit: true,
24+
}),
25+
],
1326
}

editor/codemirror/src/highlight.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const jsonataHighlighting = styleTags({
1818
CompareOp: t.compareOperator,
1919
ConcatOp: t.operator,
2020
RangeOp: t.operator,
21-
PipeOp: t.operator,
2221
ChainOp: t.operator,
2322
ElvisOp: t.operator,
2423
CoalesceOp: t.operator,

editor/codemirror/src/jsonata.grammar

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ BinaryExpr {
6565
expression !compare (CompareOp | kw<"in">) expression |
6666
expression !logicAnd kw<"and"> expression |
6767
expression !logicOr kw<"or"> expression |
68-
expression !range (RangeOp | PipeOp | ElvisOp | CoalesceOp) expression
68+
expression !range (RangeOp | ElvisOp | CoalesceOp) expression
6969
}
7070

7171
ConditionalExpr {
@@ -167,7 +167,6 @@ kw<term> { @specialize[@name={term}]<Name, term> }
167167
ElvisOp { "?:" }
168168
CoalesceOp { "??" }
169169
ConcatOp { "&" }
170-
PipeOp { "|" }
171170
CompareOp { "=" | "!=" | "<" | ">" | "<=" | ">=" }
172171

173172
"." "," ";" ":" "(" ")" "[" "]" "{" "}" "?" "^" "@" "#"

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

react/package.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,13 @@
4848
"typescript": "^5.0.0",
4949
"vitest": "^4.1.2"
5050
},
51-
"license": "MIT"
51+
"license": "MIT",
52+
"repository": {
53+
"type": "git",
54+
"url": "https://github.com/rbbydotdev/gnata-sqlite",
55+
"directory": "react"
56+
},
57+
"publishConfig": {
58+
"access": "public"
59+
}
5260
}

0 commit comments

Comments
 (0)