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

fix: use cjs for exports #44

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

achingbrain
Copy link

This is rather a big changeset so I'll understand if you don't want to merge this, but I've found problems using dirty-chai with modern bundlers like esbuild due to the way this module tries to support script tags, cjs and amd all from one file.

I think just supporting cjs is fine given most people are using webpack/rollup/esbuild/parcel/browserify/etc and they can all handle cjs.

  • Only export cjs code and let bundlers figure the rest out
  • Removes old bower/grunt toolchain
  • Adds standard for linting
  • Fixes all linting errors
  • Updates all deps
  • Removes peer deps since they get installed by default with npm7
  • Replaces travis CI with github actions
  • Removes require-uncached as it doesn't bundle due to needing node internals and the tests pass without it?

Refs: evanw/esbuild#1202

- Only export cjs code and let bundlers figure the rest out
- Removes old bower/grunt toolchain
- Adds standard for linting
- Fixes all linting errors
- Updates all deps
- Removes peer deps since they get installed by default with npm7
- Replaces travis CI with github actions
- Removes require-uncached as it doesn't bundle due to needing node internals
  and the tests pass without it?
@achingbrain
Copy link
Author

I've PRd this against my own fork so you can see the GH actions running - achingbrain#1

They won't run here until this PR is merged.

@joshperry
Copy link
Contributor

joshperry commented May 10, 2021

Very awesome @achingbrain!

I'm down to make these changes; just 2 things. Would you mind splitting this into two PRs? One for toolchain changes and one with the CJS changes (are the tooling changes compatible with the universal module format)?

Finally, I actually do not have maintainer access to this repo anymore so I'm moving this project to my personal repo at joshperry/dirty-chai. Would you mind opening a PR there instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants