-
Notifications
You must be signed in to change notification settings - Fork 16
Update to Stencil 4 #3782
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?
Update to Stencil 4 #3782
Conversation
`TextEditorPlugin` is literally only found here when searching the whole of our GitHub org: https://github.com/search?q=org%3ALundalogik%20TextEditorPlugin&type=code
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughBuild and type-extraction pipeline updated for Stencil 4: dependency bumps, added a JSDoc→TSDoc conversion script that copies Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant DevScript as npm script (api:update / api:verify)
participant Build as Stencil Build
participant FS as File System (dist/types)
participant Fix as fix-tsdoc-tags.cjs
participant TempFS as File System (temp/types)
participant ApiExtractor as API Extractor
rect rgba(200,200,255,0.5)
DevScript->>Build: run build (may run twice if missing)
Build-->>FS: emit .d.ts files to dist/types
end
rect rgba(200,255,200,0.5)
DevScript->>Fix: invoke fix-tsdoc-tags.cjs
Fix->>FS: read *.d.ts
Fix->>Fix: convert `@default`→@defaultValue, `@private`→@internal
Fix->>TempFS: write processed files to temp/types
end
rect rgba(255,200,200,0.5)
DevScript->>ApiExtractor: run api-extractor against temp/types
ApiExtractor->>TempFS: read temp/types/index.d.ts
ApiExtractor-->>DevScript: produce api report / warnings
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Documentation has been published to https://lundalogik.github.io/lime-elements/versions/PR-3782/ |
…ed changes Includes v4 migration changes: - test environment setup with ResizeObserver mock, - SASS plugin configuration updates, and - formatting adjustments.
321d901 to
ea195e7
Compare
|
@coderabbitai Full review |
✅ Actions performedFull review triggered. |
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: 5
🤖 Fix all issues with AI agents
In `@package.json`:
- Around line 19-20: The package.json script "api:verify" uses POSIX-only `test
-f` which fails on Windows; update the "api:verify" script to use the
cross-platform utility already in devDependencies (replace `test -f
src/components.d.ts` with `shx test -f src/components.d.ts`) or alternatively
replace that check with a tiny Node invocation (e.g., `node -e` checking
fs.existsSync('src/components.d.ts')) so the conditional before `npm run build`
works on all platforms; modify the "api:verify" command accordingly while
leaving "api:update" unchanged.
- Around line 46-47: Update package.json to bump the TypeScript devDependency
from ^4.9.5 to ^5.0.0 (or ^5.x) so it meets Stencil v4.36.3's requirement and
ensure any related toolchain constraints in devDependencies (e.g., `@types/`,
tsconfig-related packages) are compatible; also add an "engines" field (e.g.,
"engines": { "node": ">=16" }) to enforce Node.js 16+ for the project toolchain.
Locate the "typescript" entry in devDependencies and replace its version, and
add the top-level "engines" object to package.json to enforce the Node version.
In `@scripts/fix-tsdoc-tags.cjs`:
- Around line 8-11: The script requires the npm package via the statement const
glob = require('glob'); but glob is not declared as a direct dependency,
creating a fragile transitive dependency used during build tasks (api:update,
api:verify); fix this by adding glob to package.json under devDependencies (or
running npm/yarn add --dev glob to update lockfile) so the script reliably
resolves in CI, or alternatively refactor the script to remove the
require('glob') usage and implement directory traversal with built-in fs/path
APIs if you prefer not to add the dependency.
In `@scripts/run-tests.cjs`:
- Around line 46-54: The current exit handling always falls back to 0 when
spawnSync yields a null status, which hides signal-based terminations; update
the termination logic after spawnSync to: if result.status is a number call
process.exit(result.status); else if result.signal is set re-emit the same
signal against the current process (e.g., process.kill(process.pid,
result.signal)) so the node process terminates with the same signal; otherwise
fall back to a non-zero exit (e.g., process.exit(1)). Reference the spawnSync
call, result.status, result.signal and process.exit/process.kill to locate and
implement the change.
In `@src/components/date-picker/flatpickr-adapter/flatpickr-adapter.tsx`:
- Around line 165-167: The optional chaining on (this.container as
any).checkVisibility?.() can return undefined in browsers without
checkVisibility, causing the condition to wrongly bail out; update the check in
the method using this.isOpen and this.container to treat a missing
checkVisibility as "visible" by replacing the expression using optional chaining
with one that uses nullish coalescing (e.g., call checkVisibility() if present
otherwise default to true), so the condition becomes: if (!this.isOpen ||
!((this.container as any).checkVisibility?.() ?? true)) return; — locate this
logic around the flatpickr adapter initialization where this.isOpen and
this.container are referenced.
Converts Stencil-generated JSDoc tags to TSDoc format (@default → @DefaultValue, @Private → @internal) by copying types to `./temp/types` before API extraction. Ensures compatibility with API Extractor's TSDoc requirements
…enabled Adds a test runner wrapper script that automatically enables verbose output when debug logging is enabled. The wrapper detects ACTIONS_STEP_DEBUG, RUNNER_DEBUG, or DEBUG env vars and adds the --verbose flag to the stencil test command.
Work around Stencil v4 e2e test parallelization issues that cause random timeouts in CI but not locally. Changes only apply when CI=true. - Add --disable-gpu browser arg in stencil.config.ts - Add --max-workers=2 in run-tests.cjs See: stenciljs/core#6157
6c3663c to
b10e0df
Compare
Summary by CodeRabbit
Bug Fixes
Chores
Tests
Documentation
✏️ Tip: You can customize this high-level summary in your review settings.
fix: #3653
Review:
Browsers tested:
(Check any that applies, it's ok to leave boxes unchecked if testing something didn't seem relevant.)
Windows:
Linux:
macOS:
Mobile: