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

fix: NO-JIRA tree-shaking #480

Merged
merged 6 commits into from
Aug 28, 2024
Merged

fix: NO-JIRA tree-shaking #480

merged 6 commits into from
Aug 28, 2024

Conversation

juliodialpad
Copy link
Collaborator

Fix tree-shaking

Obligatory GIF (super important!)

Obligatory GIF

🛠️ Type Of Change

These types will increment the version number on release:

  • Fix

📖 Description

  • Added "sideEffects": false to package's package.json files.
  • Updated dependencies to remove errors/warnings on pnpm install
  • Moved/Added/Removed dependencies to the corresponding packages
  • Updated dialtone-vue2 and dialtone-vue3 vite config to be more readable, precise with external packages and to preserve modules to improve tree-shaking.
  • Added "packageManager": "[email protected]" to root package to set the right package manager we want to use and avoid confusions on which version should be used.
  • Added --skip-nx-cache flag to pnpm prepack to improve the reliability of the pnpm pack command.

💡 Context

We we're having issues with tree-shaking:

import { DtAvatar } from '@dialpad/dialtone/vue3' Wasn't working ❌
import { DtAvatar } from '@dialpad/dialtone/vue3/lib/avatar' Was working ✅

With this fix, both ways of importing should work correctly, at least on Vite, as noted on the README.md

📝 Checklist

For all PRs:

  • I have ensured no private Dialpad links or info are in the code or pull request description (Dialtone is a public repo!).
  • I have reviewed my changes.
  • I have considered the performance impact of my change.

For all Vue changes:

  • I have made my changes in Vue 2 and Vue 3. Note: you may sync your changes from Vue 2 to Vue 3 (or vice versa) using the ./scripts/dialtone-vue-sync.sh script. Read docs here: Dialtone Vue Sync Script

🔮 Next Steps

Merge staging to beta and release a new version to test @ninarepeto DtAvatar changes.

@juliodialpad juliodialpad self-assigned this Aug 28, 2024
@juliodialpad juliodialpad added the no-visual-test Add this tag when the PR does not need visual testing label Aug 28, 2024
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] Transitive: environment, filesystem +22 263 kB sindresorhus
npm/[email protected] None 0 1.41 MB bnjmnt4n
npm/[email protected] None 0 2.05 MB rundevelopment
npm/[email protected] filesystem +2 895 kB linusu
npm/[email protected] Transitive: environment, filesystem +4 3.63 MB antfu, patak, soda, ...2 more

🚮 Removed packages: npm/@semantic-release/[email protected]), npm/@semantic-release/[email protected]), npm/@semantic-release/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@storybook/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tiptap/[email protected]), npm/@tokens-studio/[email protected]), npm/@toycode/[email protected]), npm/@types/[email protected]), npm/@typescript-eslint/[email protected]), npm/@typescript-eslint/[email protected]), npm/[email protected])

View full report↗︎

Copy link
Contributor

@braddialpad braddialpad left a comment

Choose a reason for hiding this comment

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

Looks good thanks!

Copy link

✔️ Deploy previews ready!
😎 Dialtone preview: https://dialtone.dialpad.com/deploy-previews/pr-480/
😎 Dialtone-vue 2 preview: https://dialtone.dialpad.com/vue/deploy-previews/pr-480/
😎 Dialtone-vue 3 the preview: https://dialtone.dialpad.com/vue3/deploy-previews/pr-480/

@juliodialpad juliodialpad merged commit f24eb29 into staging Aug 28, 2024
12 of 15 checks passed
@juliodialpad juliodialpad deleted the fix/tree-shaking branch August 28, 2024 23:14
juliodialpad pushed a commit that referenced this pull request Aug 28, 2024
# [9.71.0-beta.2](dialtone/v9.71.0-beta.1...dialtone/v9.71.0-beta.2) (2024-08-28)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
# [9.71.0](dialtone/v9.70.1...dialtone/v9.71.0) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
## [1.0.8](dialtone-emojis/v1.0.7...dialtone-emojis/v1.0.8) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
## [4.26.6](dialtone-icons/v4.26.5...dialtone-icons/v4.26.6) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
# [1.35.0](dialtone-tokens/v1.34.3...dialtone-tokens/v1.35.0) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
## [2.157.1](dialtone-vue2/v2.157.0...dialtone-vue2/v2.157.1) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
juliodialpad pushed a commit that referenced this pull request Aug 29, 2024
## [3.150.1](dialtone-vue3/v3.150.0...dialtone-vue3/v3.150.1) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
ninamarina pushed a commit that referenced this pull request Sep 2, 2024
# [9.71.0-beta.2](dialtone/v9.71.0-beta.1...dialtone/v9.71.0-beta.2) (2024-08-28)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
# [9.71.0](dialtone/v9.70.1...dialtone/v9.71.0) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
## [4.26.6](dialtone-icons/v4.26.5...dialtone-icons/v4.26.6) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
# [1.35.0](dialtone-tokens/v1.34.3...dialtone-tokens/v1.35.0) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))

### Features

* **Tokens:** DLT-2014 add postcss plugin to transform rem to px ([#479](#479)) ([e496076](e496076))
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
## [2.157.1](dialtone-vue2/v2.157.0...dialtone-vue2/v2.157.1) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
ninamarina pushed a commit that referenced this pull request Sep 3, 2024
## [3.150.1](dialtone-vue3/v3.150.0...dialtone-vue3/v3.150.1) (2024-08-29)

### Bug Fixes

* NO-JIRA tree-shaking ([#480](#480)) ([f24eb29](f24eb29))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-visual-test Add this tag when the PR does not need visual testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants