Skip to content

Commit b6307c6

Browse files
author
jarvisjiang
committed
build: update package configs for Vite and Vitest
- Update license to BSD-3-Clause in package.json and jsr.json - Replace Rollup with Vite for bundling - Replace Deno test with Vitest - Add exports field for better ESM/CJS compatibility - Update devDependencies: add vite, vitest, @vitest/coverage-v8, @stylistic/eslint-plugin, vite-plugin-dts - Remove rollup, rollup-plugin-dts, rollup-plugin-esbuild, typedoc-plugin-markdown - Update publish include list in jsr.json
1 parent dc66117 commit b6307c6

3 files changed

Lines changed: 1430 additions & 433 deletions

File tree

jsr.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
{
22
"$schema": "https://jsr.io/schema/config-file.v1.json",
33
"name": "@happy-js/rsa-oaep-encryption",
4+
"license": "BSD-3-Clause",
45
"version": "1.0.1",
56
"exports": "./src/mod.ts",
67
"publish": {
78
"include": [
89
"LICENSE",
910
"README.md",
10-
"package.json",
11-
"jsr.json",
12-
"docs",
11+
"CHANGELOG.md",
1312
"src"
1413
]
1514
}

package.json

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,37 @@
22
"name": "rsa-oaep-encryption",
33
"description": "Pure JavaScript implementation of encryption using the RSA-OAEP algorithm without relying on the Web Crypto API.",
44
"author": "jiang115jie@gmail.com",
5-
"license": "GPL-3.0",
5+
"license": "BSD-3-Clause",
66
"version": "1.0.1",
77
"type": "module",
88
"source": "src/mod.ts",
99
"main": "dist/main.cjs",
1010
"module": "dist/main.mjs",
1111
"types": "dist/types.d.ts",
12+
"exports": {
13+
".": {
14+
"types": "./dist/types.d.ts",
15+
"import": "./dist/main.mjs",
16+
"require": "./dist/main.cjs",
17+
"default": "./dist/main.mjs"
18+
},
19+
"./package.json": "./package.json"
20+
},
1221
"files": [
1322
"LICENSE",
1423
"README.md",
15-
"package.json",
16-
"docs",
17-
"src",
24+
"CHANGELOG.md",
1825
"dist"
1926
],
2027
"sideEffects": false,
2128
"scripts": {
2229
"check": "pnpm exec tsc --noEmit",
2330
"lint": "pnpm exec eslint .",
24-
"prebuild": "pnpm dlx rimraf dist && pnpm run check && pnpm run lint",
25-
"build": "pnpm exec rollup --config rollup.config.mjs",
26-
"test": "deno test --coverage --clean && deno coverage coverage && deno coverage coverage --lcov --output=coverage/cov_profile.lcov",
27-
"test:html": "deno test --coverage --clean && deno coverage coverage && deno coverage coverage --html",
31+
"prebuild": "pnpm run check && pnpm run lint",
32+
"build": "pnpm exec vite build",
33+
"test": "pnpm exec vitest run --coverage",
34+
"test:watch": "pnpm exec vitest",
35+
"test:ui": "pnpm exec vitest --ui",
2836
"predocs": "pnpm dlx rimraf docs",
2937
"docs": "pnpm exec typedoc",
3038
"prepublishOnly": "pnpm run build"
@@ -44,14 +52,15 @@
4452
"sha512"
4553
],
4654
"devDependencies": {
47-
"@eslint/js": "^9.39.1",
48-
"eslint": "^9.39.1",
49-
"rollup": "^4.53.3",
50-
"rollup-plugin-dts": "^6.3.0",
51-
"rollup-plugin-esbuild": "^6.2.1",
52-
"typedoc": "^0.28.14",
53-
"typedoc-plugin-markdown": "^4.9.0",
55+
"@eslint/js": "^9.39.2",
56+
"@stylistic/eslint-plugin": "^5.6.1",
57+
"@vitest/coverage-v8": "^4.0.16",
58+
"eslint": "^9.39.2",
59+
"typedoc": "^0.28.15",
5460
"typescript": "^5.9.3",
55-
"typescript-eslint": "^8.48.0"
61+
"typescript-eslint": "^8.50.0",
62+
"vite": "^7.3.0",
63+
"vite-plugin-dts": "^4.5.4",
64+
"vitest": "^4.0.16"
5665
}
5766
}

0 commit comments

Comments
 (0)