Skip to content

Commit

Permalink
Merge pull request #19 from hildjj/update-deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
hildjj authored Aug 27, 2024
2 parents 60afbf9 + 524c21b commit 76eafeb
Show file tree
Hide file tree
Showing 12 changed files with 413 additions and 410 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ jobs:
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Check coding standards
if: matrix.node-version == '20.x' && matrix.os == 'ubuntu-latest'
run: npm run lint
- name: Test
run: npm run coverage
run: npm run ci
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
cache: pnpm
- run: pnpm i -r
- run: npm run ci
- run: npm publish --access public --provenance
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
coverage/
examples/*.js
examples/*.peggy
Expand Down
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.eslintrc.js
.gitattributes
.github/
.ncurc
.vscode/
*.peggy
coverage/
Expand All @@ -13,4 +14,3 @@ node_modules
pnpm-lock.yaml
t.abnf
test/
.ncurc
1 change: 1 addition & 0 deletions bin/abnf_ast.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ program
files.push("-");
}
for (const f of files) {
// eslint-disable-next-line no-useless-assignment
let rules = null;
try {
if (f === "-") {
Expand Down
1 change: 1 addition & 0 deletions bin/abnf_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ program
files.push("-");
}
for (const f of files) {
// eslint-disable-next-line no-useless-assignment
let rules = null;
try {
if (f === "-") {
Expand Down
1 change: 1 addition & 0 deletions bin/abnf_gen.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ program
let lines = 0;
const file_offsets = [];
for (const f of files) {
// eslint-disable-next-line no-useless-assignment
let text = null;
if (f === "-") {
text = await readStream(process.stdin);
Expand Down
3 changes: 1 addition & 2 deletions bin/abnf_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ program
const abnfSource = await readStream(s);
let testText = null;
let testSource = null;
// eslint-disable-next-line no-useless-assignment
let text = null;
try {
const rules = await abnf.parseString(abnfSource, f);
Expand All @@ -48,7 +49,6 @@ program
if (typeof opts.test === "string") {
testSource = "command line";
testText = opts.test;
// eslint-disable-next-line no-eval -- Required
const parseOpts = {
grammarSource: testSource,
};
Expand All @@ -65,7 +65,6 @@ program
} else if (opts.testFile) {
testSource = opts.testFile;
testText = fs.readFileSync(opts.testFile, "utf8");
// eslint-disable-next-line no-eval -- Required
console.log(util.inspect(parser.parse(testText, {
grammarSource: testSource,
}), {
Expand Down
1 change: 1 addition & 0 deletions lib/abnf.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export function parseStream(input, grammarSource = "stdin") {
});
input.on("error", reject);
input.on("end", () => {
// eslint-disable-next-line no-useless-assignment
let s = "";
switch (bufs.length) {
case 0:
Expand Down
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.2.
// @generated by Peggy 4.0.3.
//
// https://peggyjs.org/

Expand Down
23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,24 @@
"pretest": "npm run build",
"test": "ava",
"precoverage": "npm run build",
"coverage": "c8 ava"
"coverage": "c8 ava",
"ci": "npm run coverage && npm run lint"
},
"dependencies": {
"commander": "^12.0.0",
"peggy": "^4.0.2"
"commander": "^12.1.0",
"peggy": "^4.0.3"
},
"devDependencies": {
"@peggyjs/coverage": "1.1.0",
"@peggyjs/eslint-config": "^3.2.4",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@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",
"c8": "9.1.0",
"eslint": "^8.57.0",
"typescript": "^5.4.5"
"c8": "10.1.2",
"eslint": "^9.9.1",
"typescript": "^5.5.4"
},
"packageManager": "pnpm@9.1.0",
"packageManager": "pnpm@9.9.0",
"engines": {
"node": ">=18"
}
Expand Down
Loading

0 comments on commit 76eafeb

Please sign in to comment.