build(@deephaven/icons): Properly package icons and remove unnecessary files in dist#1437
Merged
mattrunyon merged 5 commits intodeephaven:mainfrom Aug 4, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1437 +/- ##
==========================================
- Coverage 45.71% 45.71% -0.01%
==========================================
Files 511 511
Lines 35070 35073 +3
Branches 8769 8772 +3
==========================================
+ Hits 16033 16034 +1
- Misses 18986 18988 +2
Partials 51 51
Flags with carried forward coverage won't be shown. Click here to find out more. |
mofojed
reviewed
Aug 3, 2023
Member
mofojed
left a comment
There was a problem hiding this comment.
Publish an alpha and make sure Enterprise still works with the published alpha?
| './packages/icons/dist/index.js' | ||
| ), | ||
| '^@deephaven/(.*)$': path.join(__dirname, './packages/$1/src'), | ||
| // All pacakges except icons use src code |
Member
There was a problem hiding this comment.
Suggested change
| // All pacakges except icons use src code | |
| // All packages except icons use src code |
Collaborator
Author
|
Tested with an alpha and enterprise builds/tests/looks correct. I put this as a breaking change mostly as a message to update the DHE community packages paths in Vite and Jest (for using the |
mofojed
approved these changes
Aug 4, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While updating packages consumed in the docs, I noticed our icons
package.jsonwas off. It specified it was a module type (ESM), but exported CJS as.js. This is incorrect as those will be interpreted as ESM by Node. Instead we should be exporting a.cjsfile and a.jsor.mjsas the main file.Added an exports section to the
package.jsonto indicate which file is for ESM and which is for CJS. We still need to distribute CJS for Jest tests.Removed unnecessary files from the distribution. We don't use imports like
import vsTrash from '@deephaven/icons/vsTrash';and the ESM tree shakes, so I removed the individual files exported. They also would have been imported from/icons/distwhich is bad practice. Removed the SVG files from the files for the published package as well since they aren't used by anything in production.BREAKING CHANGE: Any imports/aliasing to
@deephaven/icons/distshould be removed and just read the package contents normally (e.g. DHE jest and vite configs for using community packages locally). See the changes to vite and jest configs in this change for how to update