Skip to content

Commit f567a37

Browse files
authored
Major update (#12)
* Use v3.0.0 of warrant-js * Add hasFeature, hasPermission, check, checkMany, [Feature/Permission]ProtectedComponent, [Feature/Permission]ProtectedRoute, and with[Feature/Permission] * Update vulnerable dependencies * Make warrant-js a peer dependency * Update to React 18 and remove all ProtectedRoute components and dependency on react-router-dom * Add tests * Add CI job * Skip live test during GitHub action * Upgrade to the latest versions of typescript and ts-loader * Add release job * Update to v3.1.0 of warrant-js * Update README * Fix typos in README
1 parent c1c7dee commit f567a37

17 files changed

+12032
-4083
lines changed

.github/workflows/ci.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Build & Test
2+
on:
3+
push:
4+
branches: [master]
5+
pull_request:
6+
branches: [master]
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
- uses: actions/setup-node@v3
15+
- name: Build
16+
run: |
17+
npm ci
18+
npm test

.github/workflows/release.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish to NPM
2+
on:
3+
push:
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+"
6+
jobs:
7+
release:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Setup Node Environment
13+
uses: actions/setup-node@v3
14+
with:
15+
registry-url: "https://registry.npmjs.org"
16+
- name: Build, Test, and Publish
17+
run: |
18+
npm ci
19+
npm test
20+
npm run build
21+
npm publish
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

0 commit comments

Comments
 (0)