Skip to content

Commit

Permalink
Merge pull request #21 from hildjj/publish-core-example
Browse files Browse the repository at this point in the history
Publish the abnf for core, since -c uses it.  Update dependencies
  • Loading branch information
hildjj authored Nov 7, 2024
2 parents f62eee3 + 73160a1 commit 0bbcee9
Show file tree
Hide file tree
Showing 8 changed files with 841 additions and 301 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ name: Tests
on:
push:
branches:
- 'main'
- main
pull_request:
branches: ['*']
branches:
- main

jobs:
build:

strategy:
matrix:
node-version: [18.x, 20.x, 21.x, 22.x]
node-version: [18.x, 20.x, 21.x, 22.x, 23.x]
os: [ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -33,4 +34,3 @@ jobs:
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: hildjj/node-abnf
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Publish Package to npmjs
on:
release:
types: [published]
workflow_call:
secrets:
NPM_TOKEN:
required: true

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,6 +23,7 @@ jobs:
cache: pnpm
- run: pnpm i -r
- run: npm run ci
- run: npm pkg delete devDependencies scripts packageManager
- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
16 changes: 0 additions & 16 deletions .npmignore

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ There are a few binaries included:

Check the given ABNF file for correctness.

```
```txt
Usage: abnf_check [options] [abnfFile...]
Check ABNF files for syntax, unused rules, and undefined rules
Expand All @@ -36,7 +36,7 @@ Options:
Output the generated abstract syntax tree for the ABNF input. This output is
mostly diagnostic in nature, not really meant to be parsed.

```
```txt
Usage: abnf_ast [options] [abnfFile...]
Output all of the rules derived from a given ABNF file
Expand All @@ -52,7 +52,7 @@ Generate a [Peggy](https://peggyjs.org/) grammar from the ABNF. The idea
is that you could then annotate this grammar with actions in order to create
a useful parser.

```
```txt
Usage: abnf_gen [options] [abnfFile...]
Create a Peggy grammar from an ABNF file
Expand All @@ -79,7 +79,7 @@ Options:
Using an ABNF, test inputs to see if they match. Returns the Peggy parse
tree, which will likely be somewhat confusing until you're familiar with Peggy.

```
```txt
Usage: abnf_test [options] [abnfFile...]
Send test inputs to an ABNF grammar
Expand Down
9 changes: 5 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import js from "@peggyjs/eslint-config/flat/module.js";
import modern from "@peggyjs/eslint-config/flat/modern.js";
import js from "@peggyjs/eslint-config/module.js";
import modern from "@peggyjs/eslint-config/modern.js";

export default [
{
ignores: [
"examples/*.js",
"node_modules/**",
"lib/abnfp.js", // Generated
"test/snapshots/**", // Generated
],
},
js,
modern,
...js,
...modern,
];
2 changes: 1 addition & 1 deletion lib/abnfp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @generated by Peggy 4.0.3.
// @generated by Peggy 4.1.1.
//
// https://peggyjs.org/

Expand Down
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@
},
"main": "lib/abnf.js",
"type": "module",
"files": [
"bin/",
"lib/",
"examples/core.abnf"
],
"scripts": {
"lint": "eslint .",
"build": "peggy --format es lib/abnfp.peggy",
Expand All @@ -46,19 +51,19 @@
},
"dependencies": {
"commander": "^12.1.0",
"peggy": "^4.0.3"
"peggy": "^4.1.1"
},
"devDependencies": {
"@peggyjs/coverage": "1.2.0",
"@peggyjs/eslint-config": "^4.0.4",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"ava": "6.1.3",
"@peggyjs/eslint-config": "^5.0.0",
"@typescript-eslint/eslint-plugin": "^8.13.0",
"@typescript-eslint/parser": "^8.13.0",
"ava": "6.2.0",
"c8": "10.1.2",
"eslint": "^9.9.1",
"typescript": "^5.5.4"
"eslint": "^9.14.0",
"typescript": "^5.6.3"
},
"packageManager": "pnpm@9.9.0",
"packageManager": "pnpm@9.12.3",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit 0bbcee9

Please sign in to comment.