diff --git a/package-lock.json b/package-lock.json index eba73db9..33f5184c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@cicada-lang/partech": "^0.2.5", "@xieyuheng/command-line": "^0.0.13", "@xieyuheng/ty": "^0.1.26", + "bun": "^1.1.1", "commonmark": "^0.30.0", "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21", @@ -859,6 +860,102 @@ "node": ">= 8" } }, + "node_modules/@oven/bun-darwin-aarch64": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-aarch64/-/bun-darwin-aarch64-1.1.1.tgz", + "integrity": "sha512-RDs5ZMSkcurj4YqPtkcKGYUA46/LDcw7tQ0a4hBI/mtjpYySYmIIYkSeeotl9IJMNcG+ZsHpRc4b7ROFRYhxEw==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64/-/bun-darwin-x64-1.1.1.tgz", + "integrity": "sha512-RiRbhu9htOML4+81AfHIvjgdVU3jsn+EiyvwuUv5j91vgGrZLkNXebGZXt2eGDDutGzHqvQJqW6sxQ+UNJQi7w==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-darwin-x64-baseline": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-darwin-x64-baseline/-/bun-darwin-x64-baseline-1.1.1.tgz", + "integrity": "sha512-sJKZqgT9JSbxTPLULHdcYiKy+F4x2gq114FxDwEqn3YVZnBqSO0X9GCqWOa1CNqUaxGvJnNgn+HDkIQlnXVLiA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@oven/bun-linux-aarch64": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-aarch64/-/bun-linux-aarch64-1.1.1.tgz", + "integrity": "sha512-9twn92P90pAwyvC6PzcWv/3a2B2/01TzdCwslWNaI0LdQ3b+sJR4IvdXG1yQI3N2Ne/ticM7eww2eWma4I0LRQ==", + "cpu": [ + "arm64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64/-/bun-linux-x64-1.1.1.tgz", + "integrity": "sha512-2JPkRTCSXe5w9JvMucx7fgN77yQK+XZ+fY7WlEsZnAR4PjEGImZA12nGNbnxEHM3TmOEivy2PP00nAXeu9LViA==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-linux-x64-baseline": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-linux-x64-baseline/-/bun-linux-x64-baseline-1.1.1.tgz", + "integrity": "sha512-2nXg32DLs0xaZH5GafJ16UqrDr4XGRXTeyZW3PNhplaFY0m3fRDXCqDsXmTvsQoGO/FEtMrEmJSWXbLa7u0B4A==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@oven/bun-windows-x64": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64/-/bun-windows-x64-1.1.1.tgz", + "integrity": "sha512-oolhIph8Kah6K/7kPUjcqgc2N5lS6RD4yruwrG2QYhxcYWTh7m36Ngp709l8+trhLLaUyTnvr4MvuiKPl1cRjQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@oven/bun-windows-x64-baseline": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@oven/bun-windows-x64-baseline/-/bun-windows-x64-baseline-1.1.1.tgz", + "integrity": "sha512-3q/THmrP1yA8/YTJoS29Et5a+AxP2jGX96cYHlOZEjoTj/FBNFSuuPVvvFEpjrRkQ8Oz9iNE/C6ltna8WKSUxQ==", + "cpu": [ + "x64" + ], + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@polka/url": { "version": "1.0.0-next.23", "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.23.tgz", @@ -1244,6 +1341,35 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, + "node_modules/bun": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/bun/-/bun-1.1.1.tgz", + "integrity": "sha512-gV90TkJgHvI50X9BoKQ3zVpPEY6YP0vqOww2uZmsOyckZSRlcFYWhXZwFj6PV8KCFINYs8VZ65m59U2RuFYfWw==", + "cpu": [ + "arm64", + "x64" + ], + "hasInstallScript": true, + "os": [ + "darwin", + "linux", + "win32" + ], + "bin": { + "bun": "bin/bun.exe", + "bunx": "bin/bun.exe" + }, + "optionalDependencies": { + "@oven/bun-darwin-aarch64": "1.1.1", + "@oven/bun-darwin-x64": "1.1.1", + "@oven/bun-darwin-x64-baseline": "1.1.1", + "@oven/bun-linux-aarch64": "1.1.1", + "@oven/bun-linux-x64": "1.1.1", + "@oven/bun-linux-x64-baseline": "1.1.1", + "@oven/bun-windows-x64": "1.1.1", + "@oven/bun-windows-x64-baseline": "1.1.1" + } + }, "node_modules/c8": { "version": "7.14.0", "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", diff --git a/package.json b/package.json index 50b6f55f..0bdc435f 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,8 @@ "scripts": { "build": "tsc", "build:watch": "tsc --watch", - "test:ts": "vitest --dir src --threads false --run", - "test:watch": "vitest --dir src --threads false", - "test:coverage": "vitest --dir src --threads false --run --coverage ", - "test:gui": "vitest --dir src --threads false --ui", + "test:ts": "bun test src", + "test:watch": "bun test src --watch", "test:cic:tests": "test-runner snapshot 'node ./bin/cic.js --no-color' 'tests/**/*.(cic|md)' --exclude 'tests/**/*.(error|todo).(cic|md)'", "test:cic:tests-error": "test-runner snapshot-error 'node ./bin/cic.js --no-color' 'tests/**/*.error.(cic|md)'", "test:cic:std": "test-runner snapshot 'node ./bin/cic.js --no-color' 'std/**/*.(cic|md)' --exclude 'std/**/*.(error|todo).(cic|md)'", @@ -40,15 +38,11 @@ "@types/commonmark": "^0.27.7", "@types/lodash": "^4.14.199", "@types/node": "^20.8.3", - "@vitest/coverage-c8": "^0.33.0", - "@vitest/coverage-istanbul": "^0.34.6", - "@vitest/ui": "^0.34.6", "@xieyuheng/test-runner": "^0.2.10", "prettier": "^3.0.3", "prettier-plugin-organize-imports": "^3.2.3", "typescript": "^5.2.2", - "vite": "^4.4.11", - "vitest": "^0.34.6" + "bun": "^1.1.1" }, "license": "GPL-3.0-or-later" } diff --git a/vite.config.ts b/vite.config.ts deleted file mode 100644 index bb854a47..00000000 --- a/vite.config.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { defineConfig } from "vitest/config" - -export default defineConfig({ - test: { - coverage: { - provider: "istanbul", - // provider: "c8", - }, - }, -})