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

Conver to TS, use DB http-client, newest bnid. #22

Merged
merged 4 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
14 changes: 14 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
module.exports = {
overrides: [
{
files: ['*.js', '*.jsx', '*.ts', '*.tsx'],
extends: 'standard-with-typescript',
parserOptions: {
project: './tsconfig.json'
},
rules: {
'@typescript-eslint/strict-boolean-expressions': 'off'
}
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
node-version: [18.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -32,4 +32,4 @@ jobs:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run Standard.js linter
run: npm run standard
run: npm run lint
20 changes: 16 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*

package-lock.json
yarn.lock

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

Expand All @@ -23,7 +26,8 @@ coverage
*.lcov

# nyc test coverage
.nyc_output
/.nyc_output
/coverage

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
Expand All @@ -42,7 +46,7 @@ node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/
types/

# TypeScript cache
*.tsbuildinfo
Expand Down Expand Up @@ -80,7 +84,6 @@ typings/

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
Expand All @@ -103,4 +106,13 @@ dist
# TernJS port file
.tern-port

package-lock.json
# Editor files
*~
*.sw[nop]
/.vscode

# Output
dist

# MacOS
.DS_Store
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodejs 18.16.0
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# did-web-driver ChangeLog

## 4.0.0 -
Note: API and usage should remain the same.

### Changed
- **BREAKING**: Convert to Typescript.
- **BREAKING**: Switch back to Digital Bazaar's `http-client` fork.
- **BREAKING**: Use DCC `bnid` v3 (which uses base-x instead of base58-universal).

## 3.0.1 - 2022-12-05

### Changed
Expand Down
14 changes: 0 additions & 14 deletions build-dist.sh

This file was deleted.

104 changes: 46 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,92 +14,80 @@
"homepage": "https://github.com/interop-alliance/did-web-driver",
"bugs": "https://github.com/interop-alliance/did-web-driver/issues",
"scripts": {
"rollup": "rollup -c rollup.config.js",
"build": "npm run clear && npm run rollup && ./build-dist.sh",
"clear": "rimraf dist/ && mkdir dist",
"build": "npm run clear && tsc -d && tsc -p tsconfig.esm.json",
"clear": "rimraf dist/*",
"lint": "ts-standard --fix --project tsconfig.spec.json",
"prepare": "npm run build",
"rebuild": "npm run clear && npm run build",
"test": "npm run standard && npm run test-node",
"test-node": "cross-env NODE_ENV=test mocha -r esm --preserve-symlinks -t 10000 test/**/*.spec.js",
"test-karma": "karma start test/karma.conf.js",
"nyc": "cross-env NODE_ENV=test nyc npm run test-node",
"standard": "standard --fix"
"test": "npm run lint && npm run test-node",
"test-node": "cross-env NODE_ENV=test TS_NODE_PROJECT=tsconfig.spec.json TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\" }' mocha -r ts-node/register --project tsconfig.spec.json 'test/*.ts'"
},
"files": [
"dist",
"src",
"rollup.config.js",
"build-dist.sh",
"README.md",
"LICENSE"
],
"main": "dist/index.js",
"main": "dist/src/index.js",
"module": "dist/esm/index.js",
"exports": {
".": {
"require": "./dist/index.js",
"import": "./dist/esm/index.js"
},
"./package.json": "./package.json"
},
"browser": "dist/esm/index.js",
"types": "dist/esm/index.d.ts",
"dependencies": {
"@digitalcredentials/bnid": "^2.1.1",
"@digitalbazaar/http-client": "digitalcredentials/http-client#react-native",
"@digitalcredentials/bnid": "^3.0.1",
"@digitalcredentials/did-io": "^1.0.2",
"@digitalcredentials/http-client": "^1.2.2",
"did-context": "^3.1.1",
"ed25519-signature-2020-context": "^1.1.0",
"whatwg-url": "^11.0.0",
"whatwg-url": "^14.0.0",
"x25519-key-agreement-2020-context": "^1.0.0"
},
"resolutions": {
"@typescript-eslint/typescript-estree": "^6.1.6"
},
"devDependencies": {
"@babel/core": "^7.16.7",
"@babel/plugin-transform-modules-commonjs": "^7.16.7",
"@babel/plugin-transform-runtime": "^7.16.7",
"@babel/preset-env": "^7.16.7",
"@babel/runtime": "^7.16.7",
"@digitalcredentials/ed25519-verification-key-2020": "^3.2.2",
"@digitalcredentials/x25519-key-agreement-key-2020": "^2.0.2",
"babel-loader": "^8.2.3",
"chai": "^4.3.4",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^20.4.6",
"@typescript-eslint/eslint-plugin": "^5.0.0",
"@typescript-eslint/parser": "^5.0.0",
"chai": "^4.3.7",
"cross-env": "^7.0.3",
"crypto-ld": "^6.0.0",
"dirty-chai": "^2.0.1",
"esm": "^3.2.25",
"karma": "^6.3.9",
"karma-babel-preprocessor": "^8.0.1",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.3.8",
"karma-webpack": "^5.0.0",
"mocha": "^8.4.0",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"rollup": "^2.62.0",
"sinon": "^12.0.1",
"standard": "^16.0.4",
"webpack": "^5.65.0"
"eslint": "^8.46.0",
"mocha": "^10.2.0",
"rimraf": "^5.0.1",
"ts-node": "^10.9.1",
"ts-standard": "^12.0.2",
"typescript": "5.2.2"
},
"publishConfig": {
"access": "public"
},
"nyc": {
"reporter": [
"html",
"text-summary"
"mocha": {
"require": "ts-node/register",
"extension": [
"ts"
],
"cache": true
"spec": "test/**/*.ts"
},
"standard": {
"ts-standard": {
"ignore": [
"dist"
],
"globals": [
"after",
"afterEach",
"before",
"beforeEach",
"describe",
"it",
"require"
"describe",
"beforeEach"
]
},
"engines": {
"node": ">=12.0"
"node": ">=18.0"
},
"standard": {
"globals": [
"it"
]
}
}
15 changes: 0 additions & 15 deletions rollup.config.js

This file was deleted.

Loading
Loading