Skip to content

Commit

Permalink
feat: use tsup as a bundler (#62)
Browse files Browse the repository at this point in the history
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Co-authored-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
Signed-off-by: Mirko Mollik <mirko.mollik@fit.fraunhofer.de>
  • Loading branch information
cre8 and cre8 committed Mar 8, 2024
1 parent 3692498 commit dc61be9
Show file tree
Hide file tree
Showing 15 changed files with 1,372 additions and 1,551 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/test-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
run: npm install -g pnpm
- name: Install Dependencies
run: pnpm install
- name: Run Tests(Unit)
- name: Run Tests(Browser)
run: pnpm test:browser
- name: Run Tests(Node)
run: pnpm test
- name: Run Tests(E2E)
- name: Run E2E Tests
run: pnpm test:e2e
44 changes: 31 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,20 @@
"version": "2.0.1",
"description": "sd-jwt draft 7 implementation in typescript",
"main": "dist/index.js",
"browser": {
"./dist/crypto.js": "./dist/crypto-browser.js"
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"exports": {
".": {
"import": "./dist/index.mjs",
"require": "./dist/index.js"
}
},
"scripts": {
"build": "rm -rf dist && tsc",
"test": "jest ./src/test/*.spec.ts",
"test:e2e": "jest ./test/*.spec.ts",
"test:cov": "jest ./src/test/*.spec.ts ./test/*.spec.ts --coverage"
"build": "tsup",
"test": "vitest ./src/test/*.spec.ts",
"test:browser": "vitest ./src/test/*.spec.ts --environment jsdom",
"test:e2e": "vitest ./test/*e2e.spec.ts --environment node",
"test:cov": "vitest run --coverage"
},
"keywords": [
"verifiable-credentials",
Expand All @@ -30,16 +36,28 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "^20.10.2",
"jest": "^29.7.0",
"jose": "^5.1.3",
"ts-jest": "^29.1.1",
"@vitest/coverage-v8": "^1.2.2",
"jsdom": "^24.0.0",
"ts-node": "^10.9.1",
"typescript": "^5.3.2"
},
"dependencies": {
"tsup": "^8.0.2",
"typescript": "^5.3.2",
"vite": "^5.1.1",
"vitest": "^1.2.2",
"@noble/hashes": "1.0.0",
"js-base64": "^3.7.6"
},
"tsup": {
"entry": [
"./src/index.ts"
],
"sourceMap": true,
"splitting": false,
"clean": true,
"dts": true,
"format": [
"cjs",
"esm"
]
}
}
Loading

0 comments on commit dc61be9

Please sign in to comment.