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

Chore(web-react): Web package is direct dependency #1288

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

literat
Copy link
Collaborator

@literat literat commented Feb 20, 2024

Description

  • we cannot use web-react without web and icons package
  • it also tells lerna how to manage builds and in what order

Additional context

Issue reference


Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Follow the PR Title/Commit Message Convention.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@literat literat requested review from pavelklibani and a team as code owners February 20, 2024 14:05
@github-actions github-actions bot added the maintenance Changes to the build process or auxilary tools and libraries or other maintenance label Feb 20, 2024
Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for spirit-design-system-react ready!

Name Link
🔨 Latest commit 2cf1b61
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-react/deploys/65d4b1bcccbec100083ba374
😎 Deploy Preview https://deploy-preview-1288--spirit-design-system-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 20, 2024

Deploy Preview for spirit-design-system-demo ready!

Name Link
🔨 Latest commit 2cf1b61
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-demo/deploys/65d4b1bc43967e00089bc8e0
😎 Deploy Preview https://deploy-preview-1288--spirit-design-system-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

Coverage Status

coverage: 71.217% (-25.2%) from 96.371%
when pulling 2cf1b61 on chore/icon-web-dependency
into a78af4f on chore/DS-1162-sass-optional-dependency.

Base automatically changed from chore/DS-1162-sass-optional-dependency to main February 20, 2024 14:28
@@ -18,6 +18,8 @@
"types": "./index.d.ts",
"dependencies": {
"@floating-ui/react": "^0.26.5",
"@lmc-eu/spirit-web": "^1.10.0",
"@lmc-eu/spirit-icons": "^1.1.1",
Copy link
Member

Choose a reason for hiding this comment

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

Does this mean Jobs will now install our icons too? Even when they don't use them because they use their own icons package (the same as they use their own design tokens package).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think you are right. I have been thinking about the Icons and move them to optionalDependencies. But spirit-web seems to me that is the direct dependency that is needed always.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In the same manner, I am also thinking about design-tokens and icons in a web package. They both can be used or replaced by the package with the product design system definitions. So should we make them peer dependency optional?

Copy link
Contributor

Choose a reason for hiding this comment

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

@crishpeen Good point 👍🏻

Just for the record, I was thinking the optionalDependencies property would describe it better:

"optionalDependencies": {
  "@lmc-eu/spirit-web": "^1.10.0",
  "@lmc-eu/spirit-icons": "^1.1.1",
}

But, as noted in the npm docs, we should check if any design tokens and icons package are installed and throw an error if they are not. No, I don't know how to do that 🙂. And, more importantly, it does not do what we want it to do: unreachable optional dependencies just do not cause the installation to fail, that's all.


So, having come this far, I think optional peerDependencies is fine. But a check for tokens and icons from our side (instead of a broken build) would still be a nice DX improvement.

  * we cannot use web-react without web and icons package
  * it also tells lerna how to manage builds and in what order
Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for spirit-design-system ready!

Name Link
🔨 Latest commit 154ca20
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system/deploys/660fb658daaa890008e6e008
😎 Deploy Preview https://deploy-preview-1288--spirit-design-system.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for spirit-design-system-storybook ready!

Name Link
🔨 Latest commit 154ca20
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-storybook/deploys/660fb6585bb8e90008bc6735
😎 Deploy Preview https://deploy-preview-1288--spirit-design-system-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Apr 5, 2024

Deploy Preview for spirit-design-system-validations canceled.

Name Link
🔨 Latest commit 154ca20
🔍 Latest deploy log https://app.netlify.com/sites/spirit-design-system-validations/deploys/660fb658a1adc9000866c621

@literat literat changed the title Chore(web-react): Icon and web package are direct dependencies Chore(web-react): Web package is direct dependency Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Changes to the build process or auxilary tools and libraries or other maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants