Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

Commit 6cab704

Browse files
committed
Prep multipart parser for release
1 parent 832df78 commit 6cab704

File tree

5 files changed

+43
-40
lines changed

5 files changed

+43
-40
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Ignore test files within the src directory
2+
src/**/*.test.ts

packages/multipart-parser/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
This is the changelog for [`multipart-parser`](https://github.com/mjackson/remix-the-web/tree/main/packages/multipart-parser). It follows [semantic versioning](https://semver.org/).
44

5+
## HEAD
6+
7+
- Add `/src` to npm package, so "go to definition" goes to the actual source
8+
- Use one set of types for all built files, instead of separate types for ESM and CJS
9+
- Build using esbuild directly instead of tsup
10+
511
## v0.8.2 (2025-02-04)
612

713
- Add `Promise<void>` to `MultipartPartHandler` return type

packages/multipart-parser/package.json

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -11,49 +11,27 @@
1111
"homepage": "https://github.com/mjackson/remix-the-web/tree/main/packages/multipart-parser#readme",
1212
"license": "MIT",
1313
"files": [
14-
"dist",
1514
"LICENSE",
16-
"README.md"
15+
"README.md",
16+
"dist",
17+
"src"
1718
],
1819
"type": "module",
1920
"types": "./dist/multipart-parser.d.ts",
20-
"main": "./dist/multipart-parser.js",
21+
"module": "./dist/multipart-parser.js",
22+
"main": "./dist/multipart-parser.cjs",
2123
"exports": {
2224
".": {
23-
"module-sync": {
24-
"types": "./dist/multipart-parser.d.ts",
25-
"default": "./dist/multipart-parser.js"
26-
},
27-
"import": {
28-
"types": "./dist/multipart-parser.d.ts",
29-
"default": "./dist/multipart-parser.js"
30-
},
31-
"require": {
32-
"types": "./dist/multipart-parser.d.cts",
33-
"default": "./dist/multipart-parser.cjs"
34-
},
35-
"default": {
36-
"types": "./dist/multipart-parser.d.ts",
37-
"default": "./dist/multipart-parser.js"
38-
}
25+
"types": "./dist/multipart-parser.d.ts",
26+
"import": "./dist/multipart-parser.js",
27+
"require": "./dist/multipart-parser.cjs",
28+
"default": "./dist/multipart-parser.js"
3929
},
4030
"./node": {
41-
"module-sync": {
42-
"types": "./dist/multipart-parser.node.d.ts",
43-
"default": "./dist/multipart-parser.node.js"
44-
},
45-
"import": {
46-
"types": "./dist/multipart-parser.node.d.ts",
47-
"default": "./dist/multipart-parser.node.js"
48-
},
49-
"require": {
50-
"types": "./dist/multipart-parser.node.d.cts",
51-
"default": "./dist/multipart-parser.node.cjs"
52-
},
53-
"default": {
54-
"types": "./dist/multipart-parser.node.d.ts",
55-
"default": "./dist/multipart-parser.node.js"
56-
}
31+
"types": "./dist/multipart-parser.node.d.ts",
32+
"import": "./dist/multipart-parser.node.js",
33+
"require": "./dist/multipart-parser.node.cjs",
34+
"default": "./dist/multipart-parser.node.js"
5735
},
5836
"./package.json": "./package.json"
5937
},
@@ -62,14 +40,20 @@
6240
},
6341
"devDependencies": {
6442
"@types/node": "^20.14.10",
65-
"tsup": "^8.3.5"
43+
"esbuild": "^0.25.5"
6644
},
6745
"scripts": {
6846
"bench": "pnpm run bench:node && pnpm run bench:bun && pnpm run bench:deno",
6947
"bench:bun": "bun run ./bench/runner.ts",
7048
"bench:deno": "deno --unstable-byonm --unstable-sloppy-imports run --allow-sys ./bench/runner.ts",
7149
"bench:node": "node --experimental-strip-types --disable-warning=ExperimentalWarning ./bench/runner.ts",
72-
"build": "tsup",
50+
"build:types": "tsc --project tsconfig.build.json",
51+
"build:esm": "esbuild src/multipart-parser.ts --bundle --outfile=dist/multipart-parser.js --format=esm --platform=neutral --sourcemap",
52+
"build:cjs": "esbuild src/multipart-parser.ts --bundle --outfile=dist/multipart-parser.cjs --format=cjs --platform=node --sourcemap",
53+
"build:esm:node": "esbuild src/multipart-parser.node.ts --bundle --outfile=dist/multipart-parser.node.js --format=esm --platform=node --sourcemap",
54+
"build:cjs:node": "esbuild src/multipart-parser.node.ts --bundle --outfile=dist/multipart-parser.node.cjs --format=cjs --platform=node --sourcemap",
55+
"build": "pnpm run clean && pnpm run build:types && pnpm run build:esm && pnpm run build:cjs && pnpm run build:esm:node && pnpm run build:cjs:node",
56+
"clean": "rm -rf dist",
7357
"test": "node --experimental-strip-types --disable-warning=ExperimentalWarning --test ./src/**/*.test.ts",
7458
"prepublishOnly": "pnpm run build"
7559
},
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"compilerOptions": {
4+
"declaration": true,
5+
"emitDeclarationOnly": true,
6+
"declarationMap": true,
7+
"outDir": "./dist"
8+
},
9+
"include": ["src"],
10+
"exclude": ["src/**/*.test.ts"]
11+
}

pnpm-lock.yaml

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)