Skip to content

Upgrade to Svelte 5.45.8 and migrate from Snowpack to Vite - #4

Merged
caged merged 17 commits into
mainfrom
copilot/upgrade-to-latest-svelte
Dec 12, 2025
Merged

Upgrade to Svelte 5.45.8 and migrate from Snowpack to Vite#4
caged merged 17 commits into
mainfrom
copilot/upgrade-to-latest-svelte

Conversation

Copilot AI commented Dec 11, 2025

Copy link
Copy Markdown
Contributor

Upgrades from Svelte 3.46.4 to 5.45.8. Snowpack is deprecated and incompatible with Svelte 5, requiring migration to Vite.

Changes

  • Build system: Snowpack → Vite 6.0.11

    • Created vite.config.js
    • Moved index.html to root
    • Converted postcss.config.js and tailwind.config.js to ES modules
  • Dependencies:

    • svelte: 3.46.4 → 5.45.8
    • svelte-select: 3.17.0 → 5.8.3
    • Added @sveltejs/vite-plugin-svelte@5.0.4
    • Removed svelte-preprocess, @snowpack/* packages
  • Testing libraries (updated to latest versions):

    • @web/test-runner: 0.12.17 → 0.20.2
    • chai: 4.2.0 → 6.2.1
    • mocha: 9.2.2 → 11.7.5
    • Added playwright@1.49.1, @web/test-runner-playwright@0.11.1
  • CI/CD:

    • Updated GitHub Actions workflow to use Playwright for browser testing
    • Simplified CI configuration with npx playwright install --with-deps chromium
    • Deploy step runs on main branch and copilot/upgrade-to-latest-svelte branch pushes
  • Code updates:

    • Updated component instantiation to Svelte 5 API:
      // Before
      let app = new App({ target: document.body });
      
      // After
      import { mount } from "svelte";
      const app = mount(App, { target: document.body });

Screenshot

Application running on Svelte 5:

Notes

  • Svelte components use backward-compatible APIs (createEventDispatcher, on: directives) which work in Svelte 5
  • Build warnings about accessibility are pre-existing
  • All 12 tests passing with Playwright Chromium
  • CI build and tests configured to run successfully on GitHub Actions
  • GitHub Pages deployment enabled for this branch to preview changes before merging

> [!WARNING]
>
>

Original prompt

Upgrade this project to use the latest svelte version.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 11, 2025 15:14
Co-authored-by: caged <25+caged@users.noreply.github.com>
Co-authored-by: caged <25+caged@users.noreply.github.com>
Copilot AI changed the title [WIP] Update project to use the latest Svelte version Upgrade to Svelte 5.45.8 and migrate from Snowpack to Vite Dec 11, 2025
Copilot AI requested a review from caged December 11, 2025 15:25
@caged

caged commented Dec 12, 2025

Copy link
Copy Markdown
Owner

@copilot update the testing libraries like puppeteer and related code.

- @web/test-runner: 0.12.17 → 0.20.2
- chai: 4.2.0 → 6.2.1
- mocha: 9.2.2 → 11.7.5

All tests passing with updated versions.

Co-authored-by: caged <25+caged@users.noreply.github.com>

Copilot AI commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

@copilot update the testing libraries like puppeteer and related code.

Updated testing libraries to latest versions in commit 9811d1c:

  • @web/test-runner: 0.12.17 → 0.20.2
  • chai: 4.2.0 → 6.2.1
  • mocha: 9.2.2 → 11.7.5

All 12 tests passing with the updated versions.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • accounts.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3543 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-bIYLgv --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9678276692897935353,14320042909369428898,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=PaintHolding,TranslateUI --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome-stable --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3929 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-lNi2g7 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6187394557927837224,7594370874217403009,262144 --enable-features=PdfOopif --disable-features=AcceptCHFrame,IsolateSandboxedIframes,MediaRouter,OptimizationHints,PaintHolding,ProcessPerSiteUpToMainFrameThreshold,RenderDocument,Translate --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • clients2.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3543 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-bIYLgv --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9678276692897935353,14320042909369428898,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=PaintHolding,TranslateUI --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome-stable --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3929 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-lNi2g7 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6187394557927837224,7594370874217403009,262144 --enable-features=PdfOopif --disable-features=AcceptCHFrame,IsolateSandboxedIframes,MediaRouter,OptimizationHints,PaintHolding,ProcessPerSiteUpToMainFrameThreshold,RenderDocument,Translate --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • safebrowsingohttpgateway.googleapis.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3543 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-bIYLgv --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9678276692897935353,14320042909369428898,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=PaintHolding,TranslateUI --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome-stable --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3929 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-lNi2g7 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6187394557927837224,7594370874217403009,262144 --enable-features=PdfOopif --disable-features=AcceptCHFrame,IsolateSandboxedIframes,MediaRouter,OptimizationHints,PaintHolding,ProcessPerSiteUpToMainFrameThreshold,RenderDocument,Translate --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
  • www.google.com
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3543 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-bIYLgv --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9678276692897935353,14320042909369428898,262144 --enable-features=NetworkService,NetworkServiceInProcess --disable-features=PaintHolding,TranslateUI --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)
    • Triggering command: /opt/google/chrome/chrome /usr/bin/google-chrome-stable --disable-REDACTED-networking --enable-features=NetworkService,NetworkServiceInProcess --disable-REDACTED-timer-throttling --disable-REDACTEDing-occluded-windows --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-REDACTED-pages --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=TranslateUI --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-REDACTEDing --disable-sync --force-color-profile=srgb --metrics-recording-only (dns block)
    • Triggering command: /proc/self/exe /proc/self/exe --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --disable-dev-shm-usage --use-angle=swiftshader-webgl --mute-audio --crashpad-handler-pid=3929 --enable-crash-reporter=, --noerrdialogs --user-data-dir=/tmp/puppeteer_dev_chrome_profile-lNi2g7 --change-stack-guard-on-fork=enable --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,6187394557927837224,7594370874217403009,262144 --enable-features=PdfOopif --disable-features=AcceptCHFrame,IsolateSandboxedIframes,MediaRouter,OptimizationHints,PaintHolding,ProcessPerSiteUpToMainFrameThreshold,RenderDocument,Translate --variations-seed-version --trace-process-track-uuid=3190708989122997041 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@caged

caged commented Dec 12, 2025

Copy link
Copy Markdown
Owner

@copilot update the github actions and ci code until the build succeeds and the tests pass.

- Replace puppeteer with playwright for better CI reliability
- Update @web/test-runner config to use playwrightLauncher
- Simplify CI workflow: remove manual system dependencies
- Use `npx playwright install --with-deps chromium`
- Only deploy on main branch pushes
- Update package.json:
  - Remove: puppeteer, @web/test-runner-puppeteer
  - Add: playwright@1.49.1, @web/test-runner-playwright@0.11.1

Build and all tests passing locally with Playwright.

Co-authored-by: caged <25+caged@users.noreply.github.com>

Copilot AI commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

@copilot update the github actions and ci code until the build succeeds and the tests pass.

Fixed GitHub Actions CI configuration in commit 0c0706b:

Changes made:

  • Replaced puppeteer with playwright for better CI reliability
  • Updated test runner config to use playwrightLauncher
  • Simplified CI workflow by removing manual system dependency installation
  • Added npx playwright install --with-deps chromium step
  • Deploy now only runs on main branch pushes

Testing:

  • ✅ Build: Successful (vite build)
  • ✅ Tests: All 12 tests passing with Playwright Chromium

The CI should now build and test successfully on GitHub Actions.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • esm.ubuntu.com
    • Triggering command: /usr/lib/apt/methods/https /usr/lib/apt/methods/https (dns block)
  • googlechromelabs.github.io
    • Triggering command: /usr/local/bin/node node install.mjs (dns block)
  • https://storage.googleapis.com/chrome-for-testing-public/143.0.7499.42/linux64/chrome-headless-shell-linux64.zip
    • Triggering command: /usr/local/bin/node node install.mjs (http block)

If you need me to access, download, or install something from one of these locations, you can either:

@caged

caged commented Dec 12, 2025

Copy link
Copy Markdown
Owner

@copilot deploy this branch to github pages.

Modified GitHub Actions workflow to deploy from copilot/upgrade-to-latest-svelte branch in addition to main branch. This allows testing the deployment before merging to main.

Co-authored-by: caged <25+caged@users.noreply.github.com>

Copilot AI commented Dec 12, 2025

Copy link
Copy Markdown
Contributor Author

@copilot deploy this branch to github pages.

Enabled GitHub Pages deployment from this branch in commit b7f5d77.

The GitHub Actions workflow will now automatically deploy to GitHub Pages when you push to this branch. The workflow will:

  1. Build the Vite project
  2. Run all tests with Playwright
  3. Deploy the build/ folder to the gh-pages branch

The deployment should start automatically with the latest push. You can monitor the progress in the Actions tab of the repository.

@caged
caged marked this pull request as ready for review December 12, 2025 03:59
@caged
caged merged commit d0d2c83 into main Dec 12, 2025
2 checks passed
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