prepare for depoyment

This commit is contained in:
2025-11-22 21:12:02 -05:00
parent d2d654dfda
commit d0db8e5076
7 changed files with 51 additions and 32 deletions

View File

@@ -179,7 +179,7 @@ This implementation adheres to all five SOLID principles:
## Architecture
```
```text
src/
├── core/
│ └── HashMap.ts # Main HashMap implementation

View File

@@ -12,11 +12,10 @@
"ci-build": "bash scripts/ci-build.sh",
"ci-deploy:ga": "bash scripts/ci-deploy.sh --beta false",
"ci-deploy:beta": "bash scripts/ci-deploy.sh --beta true",
"format": "bun run prettier --write ./src/**/*.ts",
"lint": "eslint",
"prelint:fix": "bun run format",
"lint:fix": "eslint --fix",
"test": "bun test",
"test:watch": "bun test --watch",
"build:node:debug": "bun build ./src/index.ts --target=node --sourcemap=none --format=esm --sourcemap=inline --outdir=dist/node",
"build:browser:debug": "bun build ./src/index.ts --target=browser --sourcemap=none --format=esm --sourcemap=inline --outdir=dist/browser",
"build:node": "bun build ./src/index.ts --target=node --sourcemap=none --format=esm --splitting --minify --outdir=dist/node",
@@ -36,16 +35,7 @@
"author": "Techniker.me",
"license": "MIT",
"devDependencies": {
"@eslint/css": "0.14.1",
"@eslint/js": "9.39.1",
"@eslint/json": "0.14.0",
"@eslint/markdown": "7.5.1",
"@types/bun": "latest",
"eslint": "9.39.1",
"globals": "16.5.0",
"jiti": "2.6.1",
"prettier": "3.6.2",
"typescript-eslint": "8.47.0"
"@types/bun": "latest"
},
"peerDependencies": {
"typescript": "^5"

View File

@@ -4,6 +4,8 @@ set -o errexit
set -o nounset
set -o pipefail
xtrace="false"
debug="false"
distDirectory=${DIST_DIRECTORY:-"dist"}
if [[ ! -z "${distDirectory}" ]]; then
@@ -12,6 +14,19 @@ if [[ ! -z "${distDirectory}" ]]; then
rm -rf ${distDirectory}
fi
while [[ $# -gt 0 ]]; do
case $1 in
--xtrace|-x)
xtrace="true"
shift
;;
--debug|-d)
debug="true"
shift
;;
esac
done
bun run lint
bun run build:node
bun run build:browser
@@ -24,8 +39,8 @@ cp .npmrc ./${distDirectory}
echo "Copying [.nvmrc] to [${distDirectory}]"
cp .nvmrc ./${distDirectory}
echo "Copying [README.md] to [${distDirectory}]"
cp README ./${distDirectory}
# echo "Copying [README.md] to [${distDirectory}]"
# cp README ./${distDirectory}
ls ${distDirectory}

View File

@@ -87,7 +87,7 @@ describe("DefaultHashFunction", () => {
});
it("should handle circular references gracefully", () => {
const circular: any = { name: "test" };
const circular: { name: string; self?: unknown } = { name: "test" };
circular.self = circular; // Create circular reference
// Should not throw, should fall back to Object.prototype.toString

26
tsconfig.d.json Normal file
View File

@@ -0,0 +1,26 @@
{
"compilerOptions": {
"lib": ["esnext", "dom"],
"target": "es6",
"module": "esnext",
"moduleResolution": "bundler",
"esModuleInterop": true,
"allowImportingTsExtensions": true,
"allowArbitraryExtensions": true,
"isolatedModules": true,
"declaration": true,
"emitDeclarationOnly": true,
"declarationDir": "dist/types",
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noPropertyAccessFromIndexSignature": false
},
"include": ["src"],
"exclude": ["dist", "test"]
}

View File

@@ -1,28 +1,21 @@
{
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "Preserve",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": false,
"emitDeclarationOnly": true,
// Best practices
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false

View File

@@ -1,27 +1,22 @@
{
"compilerOptions": {
// Environment setup & latest features
"lib": ["ESNext"],
"target": "ESNext",
"module": "Preserve",
"outDir": "dist",
"moduleDetection": "force",
"jsx": "react-jsx",
"allowJs": true,
// Bundler mode
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"noEmit": true,
// Best practices
"noEmit": false,
"emitDeclarationOnly": false,
"strict": true,
"skipLibCheck": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedIndexedAccess": true,
"noImplicitOverride": true,
// Some stricter flags (disabled by default)
"noUnusedLocals": false,
"noUnusedParameters": false,
"noPropertyAccessFromIndexSignature": false