Skip to content

fix: use cjs for exports#44

Open
achingbrain wants to merge 1 commit into
prodatakey:masterfrom
achingbrain:fix/use-cjs-for-exports
Open

fix: use cjs for exports#44
achingbrain wants to merge 1 commit into
prodatakey:masterfrom
achingbrain:fix/use-cjs-for-exports

Conversation

@achingbrain

Copy link
Copy Markdown

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
Copy Markdown
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

joshperry commented May 10, 2021

Copy link
Copy Markdown
Contributor

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