Repository navigation
chore: update side effect annotations to use standardized format - #13839
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.
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
createDevtoolsComponentHookis 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 buildcore/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