Skip to content
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

Master release: support for veramo library, yarn 4.3 #293

Merged
merged 39 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
4fd57e2
ci: update node version
theblockstalk Jul 11, 2024
0297fda
build: removed yarn old version dependancy
theblockstalk Jul 18, 2024
62a2685
feat: using new SDK types and removed use of tonomy.css
theblockstalk Jul 18, 2024
273b0ee
ci: check outdated packages
theblockstalk Jul 19, 2024
b194671
feat: upgraded all packages and fixed build type errors
theblockstalk Jul 19, 2024
0940c1c
style: fixed eslint config
theblockstalk Jul 19, 2024
890aa63
style: remove unused eslint packages
theblockstalk Jul 19, 2024
caa109d
feat: remove wharfkit resolution
theblockstalk Jul 21, 2024
8e6b46e
fix: fixed ethr-did-resolver bug
theblockstalk Jul 21, 2024
712891b
feat: installed latest SDK
theblockstalk Jul 26, 2024
312b698
refactor: better tsconfig.json
theblockstalk Jul 26, 2024
0b4b63e
feat: sql.js for veramo test
theblockstalk Jul 29, 2024
5678953
feat: Updated runtime tests
theblockstalk Jul 30, 2024
9037dfe
feat: SDK new version and debug logs
theblockstalk Jul 30, 2024
bc5750d
fix: fixed fetch error
theblockstalk Jul 30, 2024
ce8722d
feat:
theblockstalk Jul 30, 2024
cdd2a01
feat: Upgrade to yarn 4.3.1
theblockstalk Aug 1, 2024
5f249a1
ci: Test on all push, and branch protection
theblockstalk Aug 2, 2024
29a3f72
ci: fixed corepack
theblockstalk Aug 2, 2024
d1342ce
ci: removed lint test
theblockstalk Aug 2, 2024
5e59539
chore: ignored dependancy version type errors
theblockstalk Aug 5, 2024
6fcad3f
style: turn of ts comment warnings
theblockstalk Aug 5, 2024
7226e45
comment test veramo
sadiabbasi Aug 18, 2024
3e9fbfa
build: Upgrade to to latest SDK
theblockstalk Aug 19, 2024
f6ab4fd
Merge pull request #288 from Tonomy-Foundation/feature/336-veramo-upg…
theblockstalk Aug 19, 2024
8b19804
Merge branch 'development' into fix/update-sdk-version
sadiabbasi Sep 20, 2024
115a8cf
update testnet sdk version
sadiabbasi Sep 20, 2024
0d408b6
added node and yarn engine in package json
sadiabbasi Sep 20, 2024
e2cb83f
revert package json changes
sadiabbasi Sep 20, 2024
4f9b8e4
build: engine protection and remove runtime tests
theblockstalk Sep 20, 2024
187c929
Merge branch 'development' into fix/update-sdk-version
theblockstalk Sep 20, 2024
04e0ff8
build: remove engines
theblockstalk Sep 20, 2024
9340735
build: added engines
theblockstalk Sep 20, 2024
553519f
empty commit
theblockstalk Sep 20, 2024
db4f441
Merge pull request #292 from Tonomy-Foundation/fix/update-sdk-version
theblockstalk Sep 20, 2024
bbd9065
Merge pull request #291 from Tonomy-Foundation/development
theblockstalk Sep 20, 2024
e1ba575
feat: updated SDK version
theblockstalk Sep 23, 2024
a5261d7
feat: Added vercel commands
theblockstalk Sep 23, 2024
8bd1adf
Merge pull request #294 from Tonomy-Foundation/release/testnet
theblockstalk Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions .eslintrc.json

This file was deleted.

13 changes: 10 additions & 3 deletions .github/workflows/check-sdk-version.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Test - Check SDK version

on: pull_request
on:
pull_request:
branches:
- master
- testnet
- development

jobs:
check-sdk-version:
Expand All @@ -9,11 +14,13 @@ jobs:
steps:
- name: 🏗 Setup repo
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 📦 Check it is using the latest version of the SDK
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: yarn install --immutable
- run: yarn run updateSdkVersion $GITHUB_BASE_REF check
14 changes: 7 additions & 7 deletions .github/workflows/security-scan.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Run Security Scan with Dastardly and ZAP Full Scan

on: pull_request
on: push

jobs:
security-scan:
Expand All @@ -9,21 +9,22 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 🚀 Build app
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: yarn install --immutable
- run: yarn run build
- run: echo $(id -u) $(id -g) $(whoami)

- name: 🚀 Run accounts website
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: node generate-sitemap.js accounts
- run: yarn run start:prod:accounts &
- run: sleep 8
Expand Down Expand Up @@ -65,8 +66,7 @@ jobs:
- name: 🚀 Run demo website
uses: actions/setup-node@v4
with:
node-version: 18.12.1
- run: corepack enable
node-version: 22.3.0
- run: node generate-sitemap.js demo
- run: yarn run start:prod:demo &
- run: sleep 8
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Test - build, test and lint

on: push

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Enable Corepack before setting up Node
run: corepack enable

- name: 🚀 Build app
uses: actions/setup-node@v4
with:
node-version: 22.3.0
- run: yarn install --immutable
- run: yarn run build
# TODO: fix linting
# - run: yarn run lint

8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@
"cSpell.words": [
"Tonomy",
"tonomy"
]
],
"git.branchPrefix": "feature/",
"git.branchProtection": [
"master",
"main",
"development"
],
}
768 changes: 0 additions & 768 deletions .yarn/releases/yarn-3.1.1.cjs

This file was deleted.

2 changes: 0 additions & 2 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.1.1.cjs
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ Other environment variables override the values in the config file:

## Errors

### Debugging

Uses [debug](https://www.npmjs.com/package/debug) package. Use `export VITE_DEBUG="tonomy*"` to see all debug logs.

### Common errors and how to fix

`Origin not found`
Expand Down
57 changes: 57 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import eslint from "@eslint/js";
import tseslint from "typescript-eslint";
import prettier from "eslint-plugin-prettier/recommended";
import globals from "globals";
import rheslint from "eslint-plugin-react-hooks";

export default [
eslint.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
plugins: {
"react-hooks": rheslint,
},
rules: {
eqeqeq: "error",
"no-console": "warn",
"prettier/prettier": "error",
"@typescript-eslint/ban-ts-comment": "warn",
"react/display-name": "off",
"react/no-children-prop": "off",
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"padding-line-between-statements": [
"warn",
{ blankLine: "always", prev: "block-like", next: "*" },
{ blankLine: "always", prev: "block", next: "*" },
{ blankLine: "always", prev: "*", next: ["block", "block-like"] },
{ blankLine: "always", prev: ["const", "let", "var"], next: "*" },
{
blankLine: "any",
prev: ["const", "let", "var"],
next: ["const", "let", "var"],
},
{ blankLine: "always", prev: ["export", "import"], next: "*" },
{ blankLine: "any", prev: "import", next: "import" },
{ blankLine: "any", prev: "export", next: "export" },
],
},
languageOptions: {
ecmaVersion: 6,
sourceType: "module",
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.jest,
},
},
files: ["**/*.js", "**/*.ts"],
ignores: ["build/**"],
},
];
57 changes: 30 additions & 27 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"lint:ts": "eslint src --ext '[.ts, .tsx]' --resolve-plugins-relative-to .",
"lint:ts": "eslint src",
"lint:styles": "stylelint \"src/**/*.css\"",
"lint": "yarn run lint:ts && yarn run lint:styles",
"lint:fix": "yarn lint --fix",
Expand All @@ -17,50 +17,53 @@
"updateSdkVersion": "./update_sdk_version.sh"
},
"dependencies": {
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
"@mui/icons-material": "^5.11.11",
"@emotion/react": "^11.12.0",
"@emotion/styled": "^11.12.0",
"@mui/icons-material": "^5.16.4",
"@mui/lab": "^5.0.0-alpha.151",
"@mui/material": "^5.14.16",
"@tonomy/tonomy-id-sdk": "0.20.0",
"@wharfkit/antelope": "^0.7.1",
"@mui/material": "^5.16.4",
"@tonomy/tonomy-id-sdk": "0.22.0",
"@wharfkit/antelope": "^1.0.8",
"rc-highlight": "^2.5.6",
"react": "^18.2.0",
"react-bootstrap": "^2.7.4",
"react-dom": "^18.2.0",
"react-prism": "^4.3.2",
"react-pro-sidebar": "^1.0.0",
"react-qr-code": "^2.0.11",
"react-router-dom": "^6.8.1",
"styled-components": "^6.0.0-rc.1",
"web-vitals": "^3.1.1",
"react-router-dom": "^6.25.1",
"sql.js": "^1.10.3",
"styled-components": "^6.1.12",
"web-vitals": "^4.2.2",
"zustand": "^4.3.6"
},
"devDependencies": {
"@rollup/plugin-alias": "^4.0.3",
"@eslint/js": "^9.7.0",
"@rollup/plugin-alias": "^5.1.0",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/node": "^18.14.2",
"@types/node": "^20.14.11",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@vitejs/plugin-react": "^3.1.0",
"eslint": "^8.0.1",
"eslint-config-prettier": "^8.6.0",
"eslint-config-standard-with-typescript": "^34.0.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.32.2",
"@typescript-eslint/eslint-plugin": "^7.16.1",
"@vitejs/plugin-react": "^4.3.1",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react-hooks": "^4.6.0",
"prettier": "^2.8.4",
"globals": "^15.8.0",
"prettier": "^3.3.3",
"serve": "^14.2.0",
"stylelint": "^15.11.0",
"stylelint": "^16.7.0",
"typescript": "*",
"vite": "^4.1.0"
"typescript-eslint": "^7.16.1",
"vite": "^5.3.4"
},
"packageManager": "[email protected]",
"resolutions": {
"@wharfkit/antelope": "0.7.1"
"jsonld": "link:./node_modules/@digitalcredentials/jsonld"
},
"packageManager": "[email protected]",
"engines": {
"node": ">=20.0.0",
"yarn": "^4.3.1"
}
}
4 changes: 2 additions & 2 deletions src/accounts/pages/CallBack.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect } from "react";
import TProgressCircle from "../../common/atoms/TProgressCircle";
import {
api,
ExternalUser,
terminateLoginRequest,
SdkError,
SdkErrors,
Expand All @@ -19,7 +19,7 @@ export default function CallBackPage() {

async function verifyLoginCallback() {
try {
await api.ExternalUser.verifyLoginRequest();
await ExternalUser.verifyLoginRequest();

const { success, error, response } = getLoginRequestResponseFromUrl();

Expand Down
Loading
Loading