Skip to content
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
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[*.pegjs]
indent_style = space
indent_size = 2
11 changes: 6 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Link Checker'
name: "Link Checker"

on:
workflow_dispatch:
Expand All @@ -12,11 +12,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: true

- name: Setup node
uses: actions/setup-node@v3

uses: actions/setup-node@v4
with:
node-version: 16
cache: npm
Expand All @@ -25,4 +26,4 @@ jobs:
run: npm ci

- name: Install
run: npm run test
run: npm run test
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tests/RFC9535/jsonpath-compliance-test-suite"]
path = tests/RFC9535/jsonpath-compliance-test-suite
url = https://github.com/jsonpath-standard/jsonpath-compliance-test-suite.git
2 changes: 1 addition & 1 deletion .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{}
{}
3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "vitest.explorer"]
}
6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"editor.tabSize": 2,
"editor.insertSpaces": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
18 changes: 18 additions & 0 deletions builder.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import * as peggy from "peggy";
import * as fs from "node:fs";
import tspegjs from "ts-pegjs";

const grammerFile = fs.readFileSync("src/jsonpath.pegjs", "utf8");
const footer = fs.readFileSync("src/jsonpath.footer.ts", "utf8");
const parserCode = peggy.generate(grammerFile, {
plugins: [tspegjs],
output: "source",
});

const output = `${parserCode}

// Footer
${footer}
`;

fs.writeFileSync("src/jsonpath.ts", output, { encoding: "utf8", flag: "w" });
11 changes: 0 additions & 11 deletions jest.config.ts

This file was deleted.

Loading
Loading