-
Notifications
You must be signed in to change notification settings - Fork 12
Add @ni/unit-format library
#2787
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
base: main
Are you sure you want to change the base?
Conversation
|
@jattasNI ready for review, won't bypass since it's a breaking change and to review the public api export names (i.e. biggest thing to focus on is the nimble-components and nimble-angular imports of |
jattasNI
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.
What an absolute unit of a PR!
| { | ||
| "name": "@ni/unit-format", | ||
| "version": "0.0.1", | ||
| "description": "Utilities to write parameterized jasmine tests", |
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.
Copy-pasted description could use an update
| "version": "0.0.1", | ||
| "description": "Utilities to write parameterized jasmine tests", | ||
| "keywords": [ | ||
|
|
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.
nit: could populate keywords (some suggestions: units, formatting, nimble, engineering, metric, si, volts, degrees, bytes) or just delete the empty array.
| @@ -0,0 +1,20 @@ | |||
| // Note: This file should be kept in sync with other copies of global-type-extensions.d.ts in the monorepo | |||
|
|
|||
| // This file has modifications to global types used for nimble-components builds: | |||
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.
Double checking: it's intentional that this is a new copy of the file and not a rename of the one in nimble-components?
Also, it looks like this might have been fixed so maybe we can delete these soon. I didn't track down whether we've uptaken that version yet. If you don't feel like it either, could you at least file a tech debt issue?
https://github.com/search?q=repo%3Amicrosoft%2FTypeScript%20roundingpriority&type=code
| { | ||
| "type": "major", | ||
| "comment": "First release of `@ni/unit-format` π", | ||
| "packageName": "@ni/unit-format", |
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.
If any Skyline packages end up depending on this directly, reminder to add it to the npm Renovate config. I'm guessing they won't though, since nimble-angular should be re-exporting everything they need.
Pull Request
π€¨ Rationale
Moves
UnitFormatto a standalone npm library and modifies it to be usable from both browser and node applications.π©βπ» Implementation
@ni/unit-formatusing node esm compliant import paths\w+unitformatand\w+unitscalewhich are the primary uses of the public api for missed renamesπ§ͺ Testing
β Checklist