Skip to content

Commit

Permalink
build: fix dependebot vulnerabilities (#38)
Browse files Browse the repository at this point in the history
* build(deps): add resolutions for vunerable packages

* ci: add pr title validation check and types check

* ci: add permissions to the release workflow

* chore: squash

* build(deps): update commitlint package and convert config to ts

* build(deps): update husky and remove config

* chore: squash

* docs: move clients and providers to usage
  • Loading branch information
kieranroneill authored Sep 11, 2024
1 parent a6214f4 commit 0ad2131
Show file tree
Hide file tree
Showing 32 changed files with 6,548 additions and 1,844 deletions.
38 changes: 33 additions & 5 deletions .github/workflows/pull_request_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,29 @@ jobs:
- name: "🧶 Setup Yarn Dependencies"
uses: ./.github/actions/use-yarn-dependencies

##
# validation
##

validate_pr_title:
name: "Validate PR Title"
needs: install
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v4
- name: "🧶 Setup Yarn Dependencies"
uses: ./.github/actions/use-yarn-dependencies
- name: "✅ Validate"
run: echo ${{ github.event.pull_request.title }} | yarn commitlint

##
# lint, build documentation, build package and test
##

lint:
name: "Lint"
needs: install
needs: [install, validate_pr_title]
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
Expand All @@ -33,9 +49,21 @@ jobs:
- name: "👕 Lint"
run: yarn lint

build_documenation:
type_check:
name: "Type Check"
needs: [install, validate_pr_title]
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v4
- name: "🧶 Setup Yarn Dependencies"
uses: ./.github/actions/use-yarn-dependencies
- name: "🔍 Type Check"
run: yarn types:check

build_documentation:
name: "Build Documentation"
needs: install
needs: [install, validate_pr_title]
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
Expand All @@ -47,7 +75,7 @@ jobs:

build_package:
name: "Build Package"
needs: install
needs: [install, validate_pr_title]
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
Expand All @@ -59,7 +87,7 @@ jobs:

test:
name: "Test"
needs: install
needs: [install, validate_pr_title]
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
release:
name: "Release"
needs: install
permissions:
contents: write # to be able to publish a github release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
Expand Down
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
3 changes: 0 additions & 3 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
6 changes: 0 additions & 6 deletions .huskyrc

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ This will compile the Typescript source code into a `dist/` directory.
| `yarn run lint` | Runs the linter on `.js` and `.ts` files. |
| `yarn run prettier` | Runs the prettier on `.js` and `.ts` files. |
| `yarn test` | Runs the tests. |
| `yarn types:check` | Performs a type check on the `src/` directory. |

<sup>[Back to top ^][table-of-contents]</sup>

Expand Down
21 changes: 0 additions & 21 deletions commitlint.config.js

This file was deleted.

7 changes: 7 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import type { UserConfig } from '@commitlint/types';

const config: UserConfig = {
extends: ['@commitlint/config-conventional'],
};

export default config;
68 changes: 39 additions & 29 deletions docs/scripts/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,48 @@ const sidebars = {
'terminology',
{
items: [
'clients/getting-started',
'clients/discover-providers',
'clients/enabling-a-client',
'clients/disabling-a-client',
'clients/signing-transactions',
'clients/posting-transactions',
'clients/signing-and-posting-transactions',
'clients/signing-a-message',
{
items: [
'clients/getting-started',
'clients/discover-providers',
'clients/enabling-a-client',
'clients/disabling-a-client',
'clients/signing-transactions',
'clients/posting-transactions',
'clients/signing-and-posting-transactions',
'clients/signing-a-message',
],
label: 'Clients',
link: {
type: 'doc',
id: 'clients/index',
},
type: 'category',
},
{
items: [
'providers/getting-started',
'providers/responding-to-discover-requests',
'providers/responding-to-enable-requests',
'providers/responding-to-disable-requests',
'providers/responding-to-sign-transactions-requests',
'providers/responding-to-post-transactions-requests',
'providers/responding-to-sign-and-post-transactions-requests',
'providers/responding-to-sign-message-requests',
'providers/throwing-an-error',
],
label: 'Providers',
link: {
type: 'doc',
id: 'providers/index',
},
type: 'category',
},
],
label: 'Clients',
label: 'Usage',
link: {
type: 'doc',
id: 'clients/index',
},
type: 'category',
},
{
items: [
'providers/getting-started',
'providers/responding-to-discover-requests',
'providers/responding-to-enable-requests',
'providers/responding-to-disable-requests',
'providers/responding-to-sign-transactions-requests',
'providers/responding-to-post-transactions-requests',
'providers/responding-to-sign-and-post-transactions-requests',
'providers/responding-to-sign-message-requests',
'providers/throwing-an-error',
],
label: 'Providers',
link: {
type: 'doc',
id: 'providers/index',
id: 'usage/index',
},
type: 'category',
},
Expand Down
Loading

0 comments on commit 0ad2131

Please sign in to comment.