Skip to content

Commit

Permalink
feat: update release (#107)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bugs5382 authored Jun 24, 2024
2 parents 51ae5bd + edd452e commit f9d804e
Show file tree
Hide file tree
Showing 23 changed files with 292 additions and 67 deletions.
5 changes: 3 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/__tests__/*.test.ts
/bin/**/*
/__tests__/*
/bin/**/*
vitest.config.ts
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: Bug Report
about: Report a bug
labels: bug
---

## Search terms

<!-- Include keywords that might help others with the same problem find this issue -->

## Environment

- HL7 Client version:
- TypeScript version:
- Node.js version:
- OS:

Questions:

- Are you using the Node [HL7 Server](https://github.com/Bugs5382/node-hl7-server) package as your HL7 Server to connect to or a 3rd party system?

## Expected Behavior

<!-- How did you expect HL7 Client to work? -->

## Actual Behavior

<!-- What does HL7 Client fail to do? -->

## Steps to reproduce the bug

<!--
Please provide the code causing the issue, as comprehensively as possible.
If the issue is related to a specific HL7 message, please include the actual
message you sent. Ensure that any sensitive information is scrubbed and sanitized before sharing.
-->

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Question
about: Ask a question
labels: question
---

## Search terms

<!-- Include keywords that might help others with the same question find this issue -->

## Question
52 changes: 52 additions & 0 deletions .github/workflows/dependabot-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Dependabot Auto-Merge

on:
pull_request_target:
types: [review_requested]

permissions:
contents: write
pull-requests: write
packages: read

jobs:
Dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GH_TOKEN }}"
skip-commit-verification: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Approve PR, if not already approved
run: |
gh pr checkout "$PR_URL"
if [ "$(gh pr status --json reviewDecision -q .currentBranch.reviewDecision)" != "APPROVED" ]; then
gh pr review --approve "$PR_URL"
else
echo "PR Already Approved.";
fi
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Run unit tests
run: |
npm test
- name: Aggregate Dependabot PRs
id: aggregate_prs
run: |
PR_URL=$(gh pr list --json state:open author:dependabot[bot] base:$PR_BASE_BRANCH -q '.[].url' | jq -r 'join(" ")')
echo "::set-output name=pr_url::$PR_URL"
env:
PR_BASE_BRANCH: develop
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Merge aggregated PRs
if: steps.aggregate_prs.outputs.pr_url != ''
run: |
gh pr merge --auto --merge ${{ steps.aggregate_prs.outputs.pr_url }}
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
40 changes: 28 additions & 12 deletions .github/workflows/ci.yaml → .github/workflows/deploy-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
name: GitHub CI
name: "Deploy: CI"
on:
push:
branches: [ 'main', 'develop' ]

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
Test:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
strategy:
matrix:
node-version: [ 20.x, 'lts/*' ]
Expand All @@ -31,11 +32,6 @@ jobs:
Release:
runs-on: ubuntu-latest
needs: [ 'Test' ]
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -55,4 +51,24 @@ jobs:
run: npm run semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
Merge:
runs-on: ubuntu-latest
needs: [ 'Release' ]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
ref: develop
- name: Configure Git
run: |
git config --global user.email "[email protected]"
git config --global user.name "Bugs5382"
- name: Merge main into develop
run: |
git remote set-url origin https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}
git fetch origin
git checkout develop
git merge origin/main -m "chore: merge main into develop [ci skip]"
git push origin develop
28 changes: 28 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "Deploy: Typedoc to GitHub Pages"

on:
push:
branches:
- main

jobs:
Build-and-Deploy-Docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
- name: Install dependencies
run: npm install
- name: Generate Typedoc documentation
run: npm run typedoc
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GH_TOKEN }}
publish_dir: ./docs
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
6 changes: 3 additions & 3 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Lint PR"
name: "PR: Lint Title"

on:
pull_request_target:
Expand All @@ -16,14 +16,14 @@ concurrency:


jobs:
validate:
Validate:
permissions:
contents: read
pull-requests: read
name: Validate PR Title
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@0cf5902181e78341bb97bb06646396e5bd354b3f # v1.4.0
- uses: thehanimo/[email protected].2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
configuration_path: ".github/pr-title-checker-config.json"
34 changes: 34 additions & 0 deletions .github/workflows/pr-unit-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "PR: Unit Tests"

on:
pull_request:
branches:
- develop
types:
- opened
- synchronize

jobs:
Test:
name: Run Unit tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 20.x, 'lts/*' ]
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm install --ignore-scripts
- name: Run Lint Fix
run: npm run lint:fix
- name: Run Unit Tests
run: npm run test
- name: Check test results
run: exit ${{ steps.Test.outputs.test_result }}
id: check_test_result
39 changes: 38 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,34 @@
# [2.2.0](https://github.com/Bugs5382/node-hl7-client/compare/v2.1.0...v2.2.0) (2024-06-04)
# [2.3.0-beta.1](https://github.com/Bugs5382/node-hl7-client/compare/v2.2.0...v2.3.0-beta.1) (2024-06-24)


### Bug Fixes

* clear connection timer ([9d9f296](https://github.com/Bugs5382/node-hl7-client/commit/9d9f2965906417b4027640950e63d8d9ca7f5314)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* connections and threads failing to close ([#102](https://github.com/Bugs5382/node-hl7-client/issues/102)) ([013d95e](https://github.com/Bugs5382/node-hl7-client/commit/013d95ec0a57f7150d48e17e0248b793380219e0))
* lint issue ([2a35e19](https://github.com/Bugs5382/node-hl7-client/commit/2a35e1935ab3071bfa487478f2ae5184add1f200))
* lint issue ([80d7667](https://github.com/Bugs5382/node-hl7-client/commit/80d7667ba32a706783b44ee8644cf23d7eecf0ec))
* race condition ([4b9e6cf](https://github.com/Bugs5382/node-hl7-client/commit/4b9e6cf880973c3e8921f696c6f467f1cc595c63)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* race condition ([84f0a89](https://github.com/Bugs5382/node-hl7-client/commit/84f0a898670315fec4d7660d89efcdcfab180d7d)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* race condition ([#106](https://github.com/Bugs5382/node-hl7-client/issues/106)) ([1a8bf3e](https://github.com/Bugs5382/node-hl7-client/commit/1a8bf3e267bfcff2be1b11ab98a255fc7480ba8a))


### Features

* minor code cleanups ([#105](https://github.com/Bugs5382/node-hl7-client/issues/105)) ([da37ee1](https://github.com/Bugs5382/node-hl7-client/commit/da37ee101b959ff7a131775aa7b2c2a1b971ae1c))
* typedoc working! ([6b884ff](https://github.com/Bugs5382/node-hl7-client/commit/6b884ff6c5a6e43bbb52c4de37a8afec229c599e)), closes [#37](https://github.com/Bugs5382/node-hl7-client/issues/37)

# [2.2.0-beta.1](https://github.com/Bugs5382/node-hl7-client/compare/v2.1.1-beta.3...v2.2.0-beta.1) (2024-06-24)

# [2.2.0](https://github.com/Bugs5382/node-hl7-client/compare/v2.1.0...v2.2.0) (2024-06-04)

### Bug Fixes


* lint issue ([2a35e19](https://github.com/Bugs5382/node-hl7-client/commit/2a35e1935ab3071bfa487478f2ae5184add1f200))
* lint issue ([80d7667](https://github.com/Bugs5382/node-hl7-client/commit/80d7667ba32a706783b44ee8644cf23d7eecf0ec))
* race condition ([4b9e6cf](https://github.com/Bugs5382/node-hl7-client/commit/4b9e6cf880973c3e8921f696c6f467f1cc595c63)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* race condition ([84f0a89](https://github.com/Bugs5382/node-hl7-client/commit/84f0a898670315fec4d7660d89efcdcfab180d7d)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* race condition ([#106](https://github.com/Bugs5382/node-hl7-client/issues/106)) ([1a8bf3e](https://github.com/Bugs5382/node-hl7-client/commit/1a8bf3e267bfcff2be1b11ab98a255fc7480ba8a))
* 2.4 spec MSH9.3 ([7af0970](https://github.com/Bugs5382/node-hl7-client/commit/7af097037e201b7fb63394ea757c2edf688a965c))
* parsing error ([adb0911](https://github.com/Bugs5382/node-hl7-client/commit/adb09115964b7857e33c6b11b1db84bc92beeefe)), closes [#96](https://github.com/Bugs5382/node-hl7-client/issues/96)
* parsing error ([#97](https://github.com/Bugs5382/node-hl7-client/issues/97)) ([747ef5d](https://github.com/Bugs5382/node-hl7-client/commit/747ef5d33fe72ba5f3c3434563fa1ef669652364))
Expand All @@ -11,6 +37,17 @@

### Features


* minor code cleanups ([#105](https://github.com/Bugs5382/node-hl7-client/issues/105)) ([da37ee1](https://github.com/Bugs5382/node-hl7-client/commit/da37ee101b959ff7a131775aa7b2c2a1b971ae1c))
* typedoc working! ([6b884ff](https://github.com/Bugs5382/node-hl7-client/commit/6b884ff6c5a6e43bbb52c4de37a8afec229c599e)), closes [#37](https://github.com/Bugs5382/node-hl7-client/issues/37)

## [2.1.1-beta.3](https://github.com/Bugs5382/node-hl7-client/compare/v2.1.1-beta.2...v2.1.1-beta.3) (2024-06-22)


### Bug Fixes

* clear connection timer ([9d9f296](https://github.com/Bugs5382/node-hl7-client/commit/9d9f2965906417b4027640950e63d8d9ca7f5314)), closes [#100](https://github.com/Bugs5382/node-hl7-client/issues/100)
* connections and threads failing to close ([#102](https://github.com/Bugs5382/node-hl7-client/issues/102)) ([013d95e](https://github.com/Bugs5382/node-hl7-client/commit/013d95ec0a57f7150d48e17e0248b793380219e0))
* merge in fixes ([#98](https://github.com/Bugs5382/node-hl7-client/issues/98)) ([97bbb58](https://github.com/Bugs5382/node-hl7-client/commit/97bbb589a4bcf50cb9f9228cba1f82f88e9ea259))

## [2.1.1-beta.2](https://github.com/Bugs5382/node-hl7-client/compare/v2.1.1-beta.1...v2.1.1-beta.2) (2024-06-04)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ They might be sans uppercase throughout the documentation, but they would have t

## Documentation

It's way too extensive to include on this README alone. Please [read this](pages/index.md) to gain more information.
It's way too extensive to include on this README alone.
Please [read this](pages/index.md) to gain more information.
GitHub pages now has mostly full listing of all methods, classes, etc., but only for the most recent release.

## Acknowledgements

Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-hl7-client",
"version": "2.2.0",
"version": "2.3.0-beta.1",
"description": "A pure Node.js HL7 Client that allows for communication to a HL7 Broker/Server that can send properly formatted HL7 messages with ease.It can also parse and then you can extract message segments out.",
"module": "./lib/esm/index.js",
"main": "./lib/cjs/index.js",
Expand Down Expand Up @@ -75,24 +75,24 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@the-rabbit-hole/semantic-release-config": "^1.5.0",
"@types/node": "^20.14.0",
"@types/node": "^20.14.8",
"@types/tcp-port-used": "^1.0.4",
"@typescript-eslint/parser": "^7.11.0",
"@typescript-eslint/parser": "^7.13.1",
"@vitest/coverage-v8": "^1.6.0",
"@vitest/ui": "^1.6.0",
"node-hl7-server": "^2.2.0",
"node-hl7-server": "^2.3.0",
"npm-check-updates": "^16.14.20",
"npm-package-json-lint": "^7.1.0",
"npm-package-json-lint": "^8.0.0",
"portfinder": "^1.0.32",
"pre-commit": "^1.2.2",
"semantic-release": "^24.0.0",
"snazzy": "^9.0.0",
"tcp-port-used": "^1.0.2",
"ts-node": "^10.9.2",
"ts-standard": "^12.0.2",
"tsd": "^0.31.0",
"typedoc": "^0.25.13",
"typescript": "5.4.5",
"tsd": "^0.31.1",
"typedoc": "^0.26.2",
"typescript": "5.5.2",
"vitest": "^1.6.0"
},
"precommit": [
Expand Down
Loading

0 comments on commit f9d804e

Please sign in to comment.