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(deps): update rollup #1941

Merged
merged 1 commit into from
Sep 11, 2024
Merged

Conversation

BobbieGoede
Copy link
Member

I was checking to see if updating Rollup would improve build speed 😅 I noticed a bunch of warnings while building due to the PURE comments usage, this is new in Rollup 4 https://rollupjs.org/migration/#general-changes:~:text=Last%2C%20you%20may,can%20help%20you, so likely these comments were not actually being used.

These warnings can be seen in the build step of #1578, I've listed some of them below:

Variable assignments

Function calls

Based on https://rollupjs.org/configuration-options/#pure I'm not entirely sure why the PURE comments before a [] or { [_locale]: {} } are not supposedly incorrect, strictly speaking these also invoke a constructor right?

Copy link

pkg-pr-new bot commented Sep 11, 2024

Open in Stackblitz

@intlify/core

pnpm add https://pkg.pr.new/@intlify/core@1941

@intlify/devtools-types

pnpm add https://pkg.pr.new/@intlify/devtools-types@1941

@intlify/core-base

pnpm add https://pkg.pr.new/@intlify/core-base@1941

@intlify/message-compiler

pnpm add https://pkg.pr.new/@intlify/message-compiler@1941

petite-vue-i18n

pnpm add https://pkg.pr.new/petite-vue-i18n@1941

@intlify/shared

pnpm add https://pkg.pr.new/@intlify/shared@1941

vue-i18n

pnpm add https://pkg.pr.new/vue-i18n@1941

@intlify/vue-i18n-core

pnpm add https://pkg.pr.new/@intlify/vue-i18n-core@1941

commit: c6c9d83

@kazupon
Copy link
Member

kazupon commented Sep 11, 2024

Thanks!

I'm not entirely sure why the PURE comments before a [] or { [_locale]: {} } are not supposedly incorrect, strictly speaking these also invoke a constructor right?

These are primitive literals and constructor syntax sugar internally.
As far as I can remember, that decoration was correct in rollup v1 and v2.
In rollup v4, rollup now outputs a warning if the rollup has incorrect annotation, as in this PR. So I think it is correct to respect the rollup warning!

@kazupon kazupon added the Type: Build A packaging or a building fixes label Sep 11, 2024
@kazupon kazupon merged commit 8b13c36 into intlify:master Sep 11, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Build A packaging or a building fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants