-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Feat/versioning #71
Merged
Merged
Changes from 16 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
9565a40
move deps to root package.json
cre8 197f64e
update test call
cre8 cbfd4d8
cancel concurrency
cre8 3d67d87
limit to packages folder
cre8 35914d7
chore(release): v2.0.2
cre8 b3f72c3
update test calls
cre8 8ad9a30
fix: update versioning
cre8 5e5f4b7
chore(release): v2.0.3
cre8 b71656d
improve coverage report
cre8 0a315ff
update ci
cre8 e0d9d96
add npmrc to gitignore
cre8 ddb57eb
fix: optimize ci run
cre8 4c03626
fix: update actions
cre8 ed901e3
ignore lint for now
cre8 1cd7f43
Add sync functions for decode/present (#72)
lukasjhan 62e6428
Add 0.x markdown documentation (#73)
lukasjhan 9433086
Merge branch 'main' into feat/versioning
cre8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"es2021": true, | ||
"node": true | ||
}, | ||
"extends": "standard-with-typescript", | ||
"parserOptions": { | ||
"ecmaVersion": "latest", | ||
"sourceType": "module" | ||
}, | ||
"rules": { | ||
} | ||
} |
172 changes: 172 additions & 0 deletions
172
.github/workflows/build-test-publish-on-push-cached.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
name: build-test-publish-on-push-cached | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
- 'unstable' | ||
push: | ||
branches: | ||
- 'main' | ||
- 'next' | ||
- 'unstable' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- run: pnpm install | ||
- run: pnpm build | ||
- name: 'Save build output' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
|
||
test: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Restore build output' | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
- name: 'Run node' | ||
run: pnpm test | ||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: coverage-artifacts | ||
path: coverage/ | ||
|
||
report-coverage: | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
persist-credentials: false | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: coverage-artifacts | ||
path: coverage | ||
# - name: Merge Code Coverage | ||
# run: npx nyc merge coverage/ coverage/coverage-final.json | ||
# TODO: include once we have codecov token setup | ||
# - uses: codecov/codecov-action@v3 | ||
# with: | ||
# token: ${{ secrets.CODECOV_TOKEN }} | ||
# fail_ci_if_error: false | ||
|
||
# lint: | ||
# needs: build | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: pnpm/action-setup@v3 | ||
# with: | ||
# version: 8 | ||
# - run: pnpm add -g pnpm | ||
# - name: 'Restore build output' | ||
# uses: actions/cache/restore@v4 | ||
# with: | ||
# path: ${{ github.workspace }} | ||
# key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
# restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
# fail-on-cache-miss: true | ||
# - name: 'Setup Node.js with pnpm cache' | ||
# uses: actions/setup-node@v4 | ||
# with: | ||
# node-version: 20 | ||
# cache: 'pnpm' | ||
# - name: 'Run lint' | ||
# run: pnpm run lint | ||
|
||
# Only run this job when the push is on main, next or unstable | ||
publish: | ||
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/next' || github.ref == 'refs/heads/unstable') | ||
needs: | ||
- build | ||
- test | ||
# - lint | ||
env: | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} | ||
GH_TOKEN: ${{secrets.GH_TOKEN}} | ||
GITHUB_TOKEN: ${{secrets.GH_TOKEN}} | ||
GH_USER: ${{secrets.GH_USER}} | ||
GH_EMAIL: ${{secrets.GH_EMAIL}} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{secrets.GH_TOKEN}} | ||
- uses: pnpm/action-setup@v3 | ||
with: | ||
version: 8 | ||
- run: pnpm add -g pnpm | ||
- name: 'Setup Node.js with pnpm cache' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: 'pnpm' | ||
|
||
- name: 'Restore build output' | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: ${{ github.workspace }} | ||
key: ${{ runner.os }}-build-${{ github.sha }}-${{ github.run_id }} | ||
restore-keys: ${{ runner.os }}-build-${{ github.sha }} | ||
fail-on-cache-miss: true | ||
|
||
- name: 'Setup git coordinates' | ||
run: | | ||
git remote set-url origin https://${{secrets.GH_USER}}:${{secrets.GH_TOKEN}}@github.com/${{ github.repository }}.git | ||
git config user.name $GH_USER | ||
git config user.email $GH_EMAIL | ||
|
||
- name: 'Setup npm registry' | ||
run: | | ||
echo "@veramo:registry=https://registry.npmjs.org/" > .npmrc | ||
echo "registry=https://registry.npmjs.org/" >> .npmrc | ||
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc | ||
npm whoami | ||
|
||
- name: 'Publish @latest when on main' | ||
if: github.ref == 'refs/heads/main' | ||
run: pnpm publish:latest | ||
|
||
- name: 'Publish @next when on next' | ||
if: github.ref == 'refs/heads/next' | ||
run: pnpm publish:next | ||
|
||
- name: 'Publish @unstable when on unstable branch' | ||
if: github.ref == 'refs/heads/unstable' | ||
run: pnpm publish:unstable |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ node_modules | |
dist | ||
|
||
.vscode | ||
coverage | ||
coverage | ||
.npmrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Change Log | ||
|
||
All notable changes to this project will be documented in this file. | ||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. | ||
|
||
## [2.0.3](https://github.com/openwallet-foundation-labs/sd-jwt-js/compare/v2.0.2...v2.0.3) (2024-02-20) | ||
|
||
|
||
### Bug Fixes | ||
|
||
* update versioning ([058a562](https://github.com/openwallet-foundation-labs/sd-jwt-js/commit/058a5623e9fad3ef37fd3b1a0627a98fa7b3d59e)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# 0.x version Documentation | ||
|
||
## Contents | ||
|
||
- [sdjwt Instance & config](./sdjwt-instance.md) | ||
- [Disclosure Frame](./disclosureframe.md) | ||
- [Issue API](./issue.md) | ||
- [Present API](./present.md) | ||
- [Validation API](./validate.md) | ||
- [Verify API](./verify.md) | ||
- [Encode & Decode](./encode-decode.md) | ||
- [Get Claims](./claims.md) | ||
- [Key Binding](./keybinding.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
## Claims | ||
|
||
You can get claims by using `getCliams` method | ||
|
||
```ts | ||
const claims = sdjwt.getClaims(encodedSdjwt); | ||
``` |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that this changelog generated automatically, is it right?
It might be needed to fix manually as we discuss in #44. To 0.x
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should remove the generated one from this PR. As mentioned above, I don't know what's the best way to generate the changelog that should be part of the github repo. It should be relatively easy to use the release mechanism of github
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cre8 I think we might need to reset all the tags in this repo when we deploy to @sd-jwt/*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess release mechanism of github is easiest way :D.