-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make commit information opt-in #107
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: ea299ea The changes in this PR will be included in the next version bump. This PR includes changesets to release 27 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
!pr extract |
@jfer-siteimprove FYI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍🏼
Previously, we were automatically running
simple-git
to extract some commit information, and send it (with possible opt-out).This causes a major problem that
simple-git
relies on running in a Node environment, thus simply trying to bundleSIP.ts
(which greedily bundlessimple-git
) for a browser environment with Webpack or the likes was causing the bundler to crash at build time.There was a minor inconvenience that the naming was tied to git, even if it represents nearly 90% of usage, that was a bit exclusive of other versioning systems.
With this PR, the commit information is optional and has to be provided by the caller. This should make
SIP.upload
usable in more environments. AgetCommitInformation
helper is still provided for git, but now has to be explicitly included by the user, thus not crashing the bundling in unexpected and hard-to-track ways.CommitInformation.GitOrigin
has also been renamedCommitInformation.Origin
for better compatibility.