diff --git a/.gitignore b/.gitignore index d0f4085..b4ddf72 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ typescript/dist/ typescript/*.tsbuildinfo typescript/.nyc_output/ typescript/coverage/ -typescript/package.json +typescript/package-lock.json # Rust target/ diff --git a/typescript/package.json b/typescript/package.json index 5a782ca..3853a92 100644 --- a/typescript/package.json +++ b/typescript/package.json @@ -1,12 +1,27 @@ { "name": "@peoplesgrocers/lseq", - "version": "0.99.1", + "version": "0.99.2", "description": "L-SEQ algorithm implementation for fractional indexing and list CRDTs", - "main": "dist/index.js", + "sideEffects": false, + "type": "module", + "main": "dist/index.cjs", + "module": "dist/index.js", "types": "dist/index.d.ts", + "exports": { + ".": { + "import": { + "types": "./dist/index.d.ts", + "default": "./dist/index.js" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } + } + }, "homepage": "https://peoplesgrocers.com/code/oss/lseq", "scripts": { - "build": "tsc", + "build": "tsup src/index.ts --format cjs,esm --dts", "test": "uvu -r tsx src \\.test\\.ts$", "prepublishOnly": "npm run build" }, @@ -23,9 +38,10 @@ ], "license": "AGPL-3.0", "devDependencies": { + "tsup": "^8.5.1", + "tsx": "^4.7.0", "typescript": "^5.0.0", - "uvu": "^0.5.6", - "tsx": "^4.7.0" + "uvu": "^0.5.6" }, "files": [ "dist/**/*", @@ -40,4 +56,4 @@ "publishConfig": { "access": "public" } -} +}