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

Update the library to use ES6 modules #495

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

daniel-grabowski
Copy link

@daniel-grabowski daniel-grabowski commented Apr 6, 2023

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • run npm run docs and commit changes to API.md
  • update CHANGELOG.md with changes under master heading before merging

Changes:

  • Removed all entries of 'use strict'.
  • Converted require(...) to import.
  • Converted module.exports to export.
  • Added the browserify plugin esmify to allow compatibility between ES6 modules and commonjs modules for debug and unit tests scripts.
  • Upgraded the library sinon to ^15.0.3 to make it compatible with ES6. The tests were failing using the older version.
  • Since there were no functionality changes, no new unit tests were created. All previous unit tests are passing.
  • All three debug scripts are working: debug/index.js, debug/filter.js and debug/nomap.js.

Since using require to load an ES module is not supported, required code will need to change from require(...) to import.

Related to #429

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.

1 participant