Skip to content

Commit

Permalink
Merge pull request #802 from TokenScript/staging
Browse files Browse the repository at this point in the history
Staging
  • Loading branch information
nicktaras authored Aug 18, 2023
2 parents bd516be + 213d4e9 commit 29cae27
Show file tree
Hide file tree
Showing 49 changed files with 4,986 additions and 3,187 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/tn-p1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ jobs:
cat package.json
fi
# make SNAPSHOT-staging package to use @tokenscript/attestation:SNAPSHOT-staging
if [ "${GITHUB_EVENT_NAME}" = "push" -a "${GITHUB_REF_NAME}" = "staging" ]; then
echo "//npm.pkg.github.com/:_authToken=${GPR_KEY}" >> .npmrc
echo "@tokenscript:registry=https://npm.pkg.github.com" >> .npmrc
cat .npmrc
npm i "@tokenscript/attestation@SNAPSHOT-staging"
fi
#if [ "${GITHUB_EVENT_NAME}" = "push" -a "${GITHUB_REF_NAME}" = "staging" ]; then
# echo "//npm.pkg.github.com/:_authToken=${GPR_KEY}" >> .npmrc
# echo "@tokenscript:registry=https://npm.pkg.github.com" >> .npmrc
# cat .npmrc
# npm i "@tokenscript/attestation@SNAPSHOT-staging"
#fi
rm -f .npmrc
env:
ATTESTATION_VER: ${{ inputs.attestation_ver }}
Expand Down Expand Up @@ -77,9 +77,10 @@ jobs:
name: test-report
path: reports/

- uses: actions/upload-pages-artifact@v1
- uses: actions/upload-artifact@v3
if: github.event_name == 'push'
with:
name: token-negotiator-dist
path: token-negotiator-dist/

- name: "Setup registry"
Expand Down
45 changes: 40 additions & 5 deletions .github/workflows/tn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ on:
- main
- staging
- ci-testing
tags:
- "v*"
pull_request:
branches:
- "*"
workflow_dispatch:

jobs:
tn-p1:
Expand All @@ -20,6 +23,8 @@ jobs:
- tn-p1
name: SonarCloud
runs-on: ubuntu-latest
# dependabot created branch has a very long name, which will cause issue for SonarCloud
if: "!startsWith(github.head_ref, 'dependabot/')"
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -40,12 +45,42 @@ jobs:
permissions:
pages: write
id-token: write
environment:
name: gh-pages
url: ${{ steps.deployment.outputs.page_url }}
contents: write
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(fromJson('["main", "ci-testing"]'), github.ref_name)
if: github.event_name == 'push' && (contains(fromJson('["main", "ci-testing"]'), github.ref_name) || github.ref_type == 'tag' )
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: token-negotiator-dist
path: token-negotiator-dist/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Action"
git config --global credential.helper store
echo "https://oauth2:${GITHUB_TOKEN}@github.com" > ~/.git-credentials
TARGET=latest
if [ x"${GITHUB_REF_TYPE}" = x"tag" ]; then
TARGET="${GITHUB_REF_NAME}"
fi
npx -y @koumoul/gh-pages-multi deploy -s token-negotiator-dist/ -t "${TARGET}" --no-history -v
- name: copy latest dir to root dir
run: |
git remote set-branches origin 'gh-pages'
git fetch origin gh-pages
git checkout .
git checkout gh-pages
rm -fr token-negotiator-dist
if [ -d "latest" ]; then
rm -fr theme negotiator*
cp -frv latest/. .
fi
git add .
if ! git diff --quiet HEAD; then
git commit -a --amend --no-edit
git push -f
fi
37 changes: 18 additions & 19 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
module.exports = {
"htmlWhitespaceSensitivity": "ignore",
"pluginSearchDirs": ["."],
"overrides": [
htmlWhitespaceSensitivity: "ignore",
overrides: [
{
"files": "*.ts",
"options": {
"tabWidth": 2,
"useTabs": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 140,
"semi": false
}
files: "*.ts",
options: {
tabWidth: 2,
useTabs: true,
singleQuote: true,
trailingComma: "all",
printWidth: 140,
semi: false,
},
},
{
"files": "*.scss",
"options": {
"printWidth": 140
}
}
]
}
files: "*.scss",
options: {
printWidth: 140,
},
},
],
};
28 changes: 16 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
> Description
This patch release addresses an off chain token management scenario.
This major version of the Token Negotiator provides simplification to the library interface, and new core features including multi-attestation support.

### Upgrade Steps

* Update NPM package to version 2.7.1
- Please refer to the migration from 2x to 3x guide. https://tokenscript.gitbook.io/token-negotiator/migrating-from-version-2x-to-3x

### Breaking Changes

[none]
- Passive Negotiation 'tokens' hook
- Off chain interface changes
- off chain Attestation schema changes (ASN / EAS)

### New Features

[none]
- Support for multi batch EAS & ASN attestation readability and authentication
- Dynamic EAS attestation support
- AlphaWallet provider selection in active UI mode
- Ultra Network support (BETA)
- Removal of Wallet Connect V1
- Migrated this libraries documentation from README to gitbooks https://tokenscript.gitbook.io/token-negotiator/
- Added attestation migration support utility function 'migrateLegacyTokenStorage'

### Bug Fixes

* When off chain tokens are added to the application a fix has been added to stop the 'tokensupdated' event hook from triggering when these tokens already existed.
* Addition of this hook to the README documentation.
- MetaMask support via Wallet Connect V2
- attestation.id modal dimensions updated for mobile and via Windows browsers

### Performance Improvements

[none]

### Other Changes

[none]
- Simplified off chain storage of issuer data

**Full Change log**:

https://github.com/TokenScript/token-negotiator/compare/v2.7.0...v2.7.1
https://github.com/TokenScript/token-negotiator/compare/v2.7.1...v3.0.0
Loading

0 comments on commit 29cae27

Please sign in to comment.