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

Major version bump #59

Draft
wants to merge 14 commits into
base: main
Choose a base branch
from
Draft

Major version bump #59

wants to merge 14 commits into from

Conversation

oscarleonnogales
Copy link
Contributor

@oscarleonnogales oscarleonnogales commented Aug 29, 2023

JIRA

Summary

  • Setup the base config to support vitest
  • Update to node v18
  • Update to latest major version of TypeScript (5)
  • Other dev dependency updates
  • Removed jest support
  • Changed import and export statements into ES6 syntax inside the /src directory.
  • Created index.ts file as the entry point to the library. This is a breaking change, and the import statements to use our modules will now change: import { isChrome, isSafari } from @braintree/browser-detection
  • Removed necessary files so we are not referencing the dist directory directly from the source code.

Why Vitest

Vitest is a "blazingly fast" unit test framework, and allows us to leave the test suite running in a watch-mode environment while we continue to make changes to our code. Only the necessary tests will re-run depending on what files were changed, making it much quicker to make changes without having to wait for the entire test suite to re-run.

Vitest has also been designed with a Jest compatible API, in order to make the migration from Jest as simple as possible. The API is essentially the same as Jest with some very minor differences.

Why Create index.ts as the entry point

  • Removes the risk of circular dependencies (we currently have some modules that rely on others)
  • Easier to add or remove additional imports
  • Allows us to remove any references to the dist folder from the source code
  • Consistency across some of our other repositories

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

@oscarleonnogales
Copy link
Contributor Author

Question for the team: We've talked about potentially deprecating support for Internet Explorer. Given that we have 4 modules testing for different versions, should we:

  1. Completely remove all IE modules and tests from this library
  2. Consolidate the existing IE modules and create a single isInternetExplorer module
  3. Leave the existing IE modules as they are.

@jplukarski
Copy link
Contributor

Question for the team: We've talked about potentially deprecating support for Internet Explorer. Given that we have 4 modules testing for different versions, should we:

  1. Completely remove all IE modules and tests from this library
  2. Consolidate the existing IE modules and create a single isInternetExplorer module
  3. Leave the existing IE modules as they are.

I think we can leave them as-is since someone else might be able to find those useful.

Copy link
Contributor

@jplukarski jplukarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge in main and resolve the conflicts? Also, how close is this draft PR to being ready for review?

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.

3 participants