Skip to content

Commit

Permalink
Merge pull request GregRos#60 from sp3ctum/feature/project-maintenance
Browse files Browse the repository at this point in the history
Various project maintenance related improvements
  • Loading branch information
GregRos committed Oct 10, 2023
2 parents 344eef9 + a35e600 commit a9ccc9b
Show file tree
Hide file tree
Showing 22 changed files with 301 additions and 260 deletions.
6 changes: 2 additions & 4 deletions .eslintrc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
name: Node.js CI
on:
pull_request:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '16'
cache: npm
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm run lint:check
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: "16"
cache: npm
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm run lint:check
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
96 changes: 48 additions & 48 deletions .github/workflows/push.yaml
Original file line number Diff line number Diff line change
@@ -1,56 +1,56 @@
name: Node.js CI
on:
push:
branches:
- master
workflow_dispatch:
push:
branches:
- master
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false
group: "pages"
cancel-in-progress: false

jobs:
build_deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '16'
cache: npm
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm run lint:check
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: node_modules/.bin/typedoc --out docs
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build_deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16.x
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: "16"
cache: npm
registry-url: https://registry.npmjs.org
- run: npm install
- run: npm run build
- run: npm run lint:check
- run: npm test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: node_modules/.bin/typedoc --out docs
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: "docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
24 changes: 12 additions & 12 deletions .istanbul.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
instrumentation:
root: .
extensions:
- .js
default-excludes: true
excludes:
- "**/*.no-cover.js"
- "**/test/**" #no need to instrument this test code! Things references by it remain covered.
- "**/functions/**" #many indicators are not utilized so let's ignore them.
- "**/implementation/issues.js" #contains things like exception throws, not executable code
- "**/basics/result.js" #should not be instrumented
- ".obsidian/**" #not executable code
- ".github/**" #not executable code
root: .
extensions:
- .js
default-excludes: true
excludes:
- "**/*.no-cover.js"
- "**/test/**" #no need to instrument this test code! Things references by it remain covered.
- "**/functions/**" #many indicators are not utilized so let's ignore them.
- "**/implementation/issues.js" #contains things like exception throws, not executable code
- "**/basics/result.js" #should not be instrumented
- ".obsidian/**" #not executable code
- ".github/**" #not executable code
2 changes: 1 addition & 1 deletion .prettierrc.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Dealing with failure is hard, whether you’re realizing you can never be a fath

`parjs` handles it by using the SHF or 😕😬💀 system, which I just made up. It recognizes three kinds of failures:

* 😕 **S**oft failures — A parser quickly says it’s not applicable to the input. Used to parse alternative inputs.
* 😬 **H**ard failures — Parsing failed unexpectedly. Can only be handled by special combinators.
* 💀 **F**atal failure — Happen when you decide and tell the parser to [halt and catch fire](<https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)>). They can’t be handled.
- 😕 **S**oft failures — A parser quickly says it’s not applicable to the input. Used to parse alternative inputs.
- 😬 **H**ard failures — Parsing failed unexpectedly. Can only be handled by special combinators.
- 💀 **F**atal failure — Happen when you decide and tell the parser to [halt and catch fire](<https://en.wikipedia.org/wiki/Halt_and_Catch_Fire_(computing)>). They can’t be handled.

Parsing failures bubble up through combinators unless they’re handled, just like exceptions. Handling a failure always means backtracking to before it happened.

Expand Down
16 changes: 16 additions & 0 deletions documentation/development.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Development instructions

This project is using [Yarn](https://yarnpkg.com/) as a package manager. The recommendation is to install the latest version of Yarn globally on your system. The version of yarn used for development is specified in the package.json file. The latest versions of yarn will choose the correct version to use automatically.

Common development commands:

```sh
# install dependencies
yarn

# build (must be done before testing)
yarn build

# test (remember to build first to make sure the code is up to date)
yarn build && yarn test
```
Loading

0 comments on commit a9ccc9b

Please sign in to comment.