Skip to content

Commit

Permalink
Fix CJS interop (#9)
Browse files Browse the repository at this point in the history
* Fix CJS interop

* changeset

* Update wet-queens-work.md

Try to get github actions to work.

* Update build.yml

Try to fix github actions.

* Update wet-queens-work.md

fix lint.

---------

Co-authored-by: Joseph Phelan <[email protected]>
  • Loading branch information
mskelton and joephela authored Aug 15, 2024
1 parent 73fe871 commit cbcd18e
Show file tree
Hide file tree
Showing 4 changed files with 482 additions and 256 deletions.
8 changes: 8 additions & 0 deletions .changeset/wet-queens-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
'axe-reporter-html': major
---

Fix CJS interop. This change generally shouldn't be breaking, but in case it is,
it's being marked as a major change. The result of this change is that ESM and
CJS should both work as intended without needing to do `require().default`
tricks.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Build
on: [push]
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test": "playwright test",
"ts": "tsc",
"format": "prettier --write .",
"build": "tsup ./src/index.ts --format cjs,esm --dts --shims",
"build": "tsup ./src/index.ts --format cjs,esm --dts --shims --cjsInterop --splitting",
"release": "yarn build && yarn changeset publish"
},
"devDependencies": {
Expand All @@ -50,7 +50,7 @@
"eslint-plugin-sort": "^3.0.2",
"eslint-plugin-widen": "^2.0.0",
"prettier": "^3.2.5",
"tsup": "^7.3.0",
"tsup": "^8.2.4",
"typescript": "^5.4.5"
},
"dependencies": {
Expand Down
Loading

0 comments on commit cbcd18e

Please sign in to comment.