-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
chore: update side effect annotations to use standardized format #13839
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
fix the following warning during build (!) packages/runtime-dom/src/apiCustomElement.ts (32:0): A comment "/*! #__NO_SIDE_EFFECTS__ */" in "packages/runtime-dom/src/apiCustomElement.ts" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.
WalkthroughReplaced side-effect-free directive comments from /! #NO_SIDE_EFFECTS / to /@NO_SIDE_EFFECTS/ across multiple files. No logic, control flow, or API signatures changed. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Size ReportBundles
Usages
|
@vue/compiler-core
@vue/compiler-dom
@vue/compiler-sfc
@vue/compiler-ssr
@vue/reactivity
@vue/runtime-core
@vue/runtime-dom
@vue/server-renderer
@vue/shared
vue
@vue/compat
commit: |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/runtime-dom/src/apiCustomElement.ts (1)
166-167
: Add CI job to fail on legacy__NO_SIDE_EFFECTS__
annotations
Prevent regressions by scanning the repo in your CI workflow. For example, in GitHub Actions:- name: Check for legacy NO_SIDE_EFFECTS annotations run: | rg -nP '/\*!\s*#?__NO_SIDE_EFFECTS__\s*\*/' -g '!**/dist/**' -S rg -nP '/\*\s*__NO_SIDE_EFFECTS__\s*\*/' -g '!**/dist/**' -S
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (5)
packages/runtime-core/src/apiAsyncComponent.ts
(1 hunks)packages/runtime-core/src/apiDefineComponent.ts
(1 hunks)packages/runtime-core/src/devtools.ts
(1 hunks)packages/runtime-dom/src/apiCustomElement.ts
(2 hunks)packages/shared/src/makeMap.ts
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Redirect rules
- GitHub Check: Header rules
- GitHub Check: Pages changed
🔇 Additional comments (6)
packages/runtime-dom/src/apiCustomElement.ts (2)
166-175
: LGTM: standardized side-effect annotation is correctly placed.
/*@__NO_SIDE_EFFECTS__*/
is immediately before the exported function, which Rollup/Terser can interpret. No functional impact.
187-195
: LGTM: annotation before const function expression is valid.The directive precedes the const assignment to the arrow function; safe for tree-shaking and resolves the warning.
packages/runtime-core/src/devtools.ts (1)
128-132
: LGTM: directive updated to standard form.Placement directly above
createDevtoolsComponentHook
is correct; no runtime changes.packages/runtime-core/src/apiAsyncComponent.ts (1)
46-50
: LGTM: standardized annotation applied to exported factory.Correct location; aligns with other files.
packages/runtime-core/src/apiDefineComponent.ts (1)
304-315
: LGTM: annotation normalized; IIFE remains properly marked PURE.Combines
/*@__NO_SIDE_EFFECTS__*/
on the declaration with the inner/*@__PURE__*/
IIFE—good for tree-shaking.packages/shared/src/makeMap.ts (1)
9-14
: LGTM: annotation placed before export; matches project-wide convention.No behavior changes; aids Rollup in removing unused factories.
Fix the following warning while running
nr build
core/packages/runtime-dom/src/apiCustomElement.ts
Lines 187 to 194 in a28794e
esbuild supports the
/* @__NO_SIDE_EFFECTS__ */
from v.0.18.1. (evanw/esbuild@cf687c9)Summary by CodeRabbit