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

Bundling CJS in npm build #68

Merged
merged 2 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@

# build
/dist
/cjs
/browser
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
SOURCE_FILES:=$(shell find src/ -type f -name '*.ts')

.PHONY: build
build: dist/build
build: dist/build cjs/index.cjs

.PHONY: clean
clean:
rm -r dist/
rm -r dist/ cjs/

.PHONY: test
test: lint test/httpwg-tests/list.json dist/build
Expand All @@ -32,5 +32,9 @@ dist/build: $(SOURCE_FILES)
@# A fake file to keep track of the last build time
touch dist/build

cjs/index.cjs: ${SOURCE_FILES}
mkdir -p cjs
npx tsup -d cjs --format cjs src/index.ts --dts --sourcemap

test/httpwg-tests/list.json:
git clone https://github.com/httpwg/structured-header-tests test/httpwg-tests
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ ChangeLog

* #66: We now convert from/to ArrayBuffer instead of a custom ByteSequence
object. This is a breaking change.
* Bundling CommonJS for backwards compat.


2.0.0-alpha.1 (2024-02-23)
Expand Down
Loading