Skip to content

feat: modernize examples (PROVCON-5981) - #3004

Merged
darekplawecki merged 4 commits into
mainfrom
feature/provcon-5981--modernize-examples
Oct 21, 2026
Merged

darekplawecki merged 4 commits into
mainfrom
feature/provcon-5981--modernize-examples

Conversation

@darekplawecki

@darekplawecki darekplawecki commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The examples were outdated: Angular 12, Create React App with React 17, Bootstrap 4, and Express 4. They pulled in large dependency trees, so we needed many resolutions entries in package.json to patch
vulnerabilities. This ticket rewrites them as minimal starters on current versions.

Changes

  • angular: Upgraded to Angular 21 with standalone components, no NgModules, zone.js, polyfills or environments. It uses the @angular/build:application builder and serve for the built output. Angular 22 was skipped because its CLI needs a newer Node than the CI image (cypress/base:22.21.0) has.
  • react-cra → react-vite: The example was renamed and moved to Vite 8 with React 19. It uses react-router-dom v6, because Elements doesn't support v7, and vite-plugin-node-polyfills. The App class became a function component, and the Create React App leftovers were deleted.
  • bootstrap: Upgraded from Bootstrap 4.5.2 to 5.3.8 via jsDelivr, with data-bs-* attributes and no jQuery-era CSS. Custom elements now have explicit closing tags.
  • static-html: Removed Express. serve-files.js is now a zero-dependency node:http server with the same routes on port 4200.
  • elements-dev-portal: DevPortalProvider is now typed with React.PropsWithChildren, so it accepts children under React 18/19 types.
  • CI and scripts:
    • In .github/workflows/test-and-release.yml, e2e-react-cra is now e2e-react-vite (job, artifact and release.needs). The --openssl-legacy-provider flag is removed from the Vite and Angular jobs.
    • The root package.json scripts are renamed react-cra → react-vite.
    • Root lint is limited to packages/*/src.
    • The ignore rules for the example lockfiles were removed, so the new lockfiles are tracked.
  • Docs: Updated the README Examples section, CONTRIBUTING.md, the example READMEs, and the Angular and React getting-started pages (Elements and Dev Portal). The React pages now have a Vite polyfills section.

Security

  • The old resolutions were reduced to the entries whose packages are still in each example's dependency tree. Most of the old entries went away along with the old dependency trees.
  • yarn audit still reports advisories that the old pins don't cover:
    • react-vite: the brace-expansion, @remix-run/router and pbkdf2 pins are now below the patched versions.
    • angular: compression (via serve) and lodash are flagged.
    • angular and static-html: lodash is flagged.
    • all three: uuid, @faker-js/faker, @sentry/browser and react-router 6.x are flagged. react-router has no fix on 6.x, and elliptic has no patch at all.

@darekplawecki
darekplawecki requested a review from a team as a code owner October 21, 2026 08:28
@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for stoplight-elements ready!

Name Link
🔨 Latest commit fee8eea
🔍 Latest deploy log https://app.netlify.com/projects/stoplight-elements/deploys/6ad8b1dfb7702e1109557111
😎 Deploy Preview https://deploy-preview-3004--stoplight-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for stoplight-elements-demo ready!

Name Link
🔨 Latest commit fee8eea
🔍 Latest deploy log https://app.netlify.com/projects/stoplight-elements-demo/deploys/6ad8b1df16cba8dbbb843e92
😎 Deploy Preview https://deploy-preview-3004--stoplight-elements-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@darekplawecki
darekplawecki merged commit a9bb5f0 into main Oct 21, 2026
7 checks passed
@darekplawecki
darekplawecki deleted the feature/provcon-5981--modernize-examples branch October 21, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants