Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tsconfig.json uses module=NodeNext, and package.json supports being imported #95

Merged
merged 16 commits into from
Dec 13, 2023
Merged
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,25 @@
"name": "freeway",
"version": "2.13.1",
"description": "An IPFS gateway for accessing UnixFS data via CAR CIDs",
"main": "index.js",
"main": "src/index.js",
"types": "dist/src/index.d.ts",
"type": "module",
"exports": {
".": {
"import": "./src/index.js",
"types": "./src/index.d.ts"
},
"./blockstore": {
"import": "./src/lib/blockstore.js",
"types": "./dist/src/lib/blockstore.d.ts"
}
},
"scripts": {
"start": "npm run dev",
"dev": "npm run build:debug && miniflare dist/worker.mjs --watch --debug -m --r2-persist --global-async-io --global-timers",
"build": "esbuild --bundle src/index.js --format=esm --sourcemap --minify --outfile=dist/worker.mjs",
"build": "esbuild --bundle src/index.js --format=esm --sourcemap --minify --outfile=dist/worker.mjs && npm run build:tsc",
"build:debug": "esbuild --bundle src/index.js --format=esm --outfile=dist/worker.mjs",
"build:tsc": "tsc --build",
"test": "npm run build:debug && node --test --experimental-vm-modules",
"lint": "standard"
},
Expand All @@ -28,7 +40,7 @@
"@ipld/dag-json": "^10.0.1",
"@ipld/dag-pb": "^4.0.2",
"@web3-storage/content-claims": "^3.1.0",
"@web3-storage/gateway-lib": "^3.5.1",
"@web3-storage/gateway-lib": "[email protected]:web3-storage/gateway-lib.git#tsconfignodenext",
gobengo marked this conversation as resolved.
Show resolved Hide resolved
"cardex": "^2.3.1",
"chardet": "^1.5.0",
"dagula": "^7.2.2",
Expand Down
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"checkJs": true,
"strict": true,
"esModuleInterop": true,
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"skipLibCheck": true,
"resolveJsonModule": true,
"lib": ["ES2022", "DOM"],
"target": "ES2022",
"module": "es2020",
"target": "ES2022"
}
}