-
Notifications
You must be signed in to change notification settings - Fork 101
feat(stacks-utils): new @stackoverflow/stacks-utils package #2124
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
Conversation
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stacks-svelte ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🦋 Changeset detectedLatest commit: d4589a9 The changes in this PR will be included in the next version bump. 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 |
| { | ||
| "name": "@stackoverflow/stacks-utils", | ||
| "description": "Stack Overflow utility functions for formatting and data manipulation", | ||
| "version": "0.0.1", |
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.
I opted to go with 0.0.1 as the starting version in case we need to push hotfix versions since this is a new package and everything might not work smoothly. This way we don't end up with a version like 1.0.4 right off the bat. But open to suggestions; I can put 1.0.0 and hope for the best.
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.
I think we can leave 0.0.1 but given we are in a prerelease mode branch let's mark the changeset as major instead of patch so that the first release will be 1.0.0-beta.0 and then 1.0.0-beta.1 and so on. The version 1.0.0 will only be released once we merge this beta branch back in develop.
| "lint:fix": "eslint . --fix" | ||
| }, | ||
| "dependencies": { | ||
| "dayjs": "^1.11.19" |
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.
I checked and dayjs seems like it's kept up-to-date and used actively.
… into sal/SPARK-121
giamir
left a comment
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.
Great work @mukunku. 🚀
I have left only minor comments to address/clarify.
Apart from that I think we are good to merge.
| { | ||
| "name": "@stackoverflow/stacks-utils", | ||
| "description": "Stack Overflow utility functions for formatting and data manipulation", | ||
| "version": "0.0.1", |
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.
I think we can leave 0.0.1 but given we are in a prerelease mode branch let's mark the changeset as major instead of patch so that the first release will be 1.0.0-beta.0 and then 1.0.0-beta.1 and so on. The version 1.0.0 will only be released once we merge this beta branch back in develop.
|
Thanks for the review @giamir I believe I addressed all your comments, can you kindly take a look again? |
giamir
left a comment
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.
Thanks @mukunku. Let's ship it 🚀
Summary
This PR creates a new workspace and npm package
stacks-utils. This name is available to us on https://npmjs.org and should get published once we merge this PR.The new package exposes 1:1 clones of the following functions:
formatCount(count: number)because we intend to use this for reputation and votes.How to Test
Not much to test for the new package itself, the github workflow already ran the new tests.
For the vote component the before and after can be compared: