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

v4: modernize (ES & ESM), overhaul code generation #134

Merged
merged 11 commits into from
Jul 8, 2024
Merged

v4: modernize (ES & ESM), overhaul code generation #134

merged 11 commits into from
Jul 8, 2024

Conversation

mourner
Copy link
Member

@mourner mourner commented Jul 4, 2024

A thorough overhaul of the library to bring it to modern standards and make it easier to use in 2024.

  • Rewrite the codebase to use modern ES syntax.
  • Expose the library as a ES module, dropping CommonJS support.
  • Make code generation generate ESM modules by default, with CommonJS available through --legacy mode.
  • Overhaul code generation to write simpler code that's more compact and more susceptible to efficient minimization — instead of nested objects, the generated code has flat exports of read and write functions (see readme and test fixtures).
  • Add TypeScript type check & first-class typings via JSDoc comments.
  • Remove dependency on ieee754 package and use native DataView instead, which is faster and universally supported.
  • Modernize dev tools (use Rollup instead of Browserify for UMD builds, ESLint 9+; in addition to an earlier switch from Tap to native Node test runner and coverage and to GitHub Actions from Travis).

Closes #127. Closes #97.

mourner and others added 2 commits July 5, 2024 11:39
* Write default values to oneof field anyway

* update oneof test fixture

---------

Co-authored-by: farwayer <[email protected]>
@mourner mourner merged commit 288210e into main Jul 8, 2024
4 checks passed
@mourner mourner deleted the modernize branch July 8, 2024 08:42
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.

ESM Support --module flag output module instead of self things
1 participant