Skip to content

Commit

Permalink
chore(logs): encourage svelte5 users to update from vps3 to vps4 (#964)
Browse files Browse the repository at this point in the history
* chore(logs): encourage svelte5 users to update from vps3 to vps4

* chore(deps): bump deps to please audit

* Update packages/vite-plugin-svelte/src/utils/log.js

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>

* Update packages/vite-plugin-svelte/src/utils/log.js

Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
  • Loading branch information
3 people committed Aug 22, 2024
1 parent 9515421 commit 4f95193
Show file tree
Hide file tree
Showing 5 changed files with 4,410 additions and 3,501 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-glasses-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/vite-plugin-svelte': patch
---

add warning for svelte5 users to update to vite-plugin-svelte@4
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
aggregate-output=true
reporter=append-only
dedupe-injected-deps=false # needed for _test_dependencies
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@
"prettier --cache --ignore-path .gitignore --ignore-unknown --write"
]
},
"packageManager": "pnpm@8.15.7",
"packageManager": "pnpm@9.6.0",
"engines": {
"pnpm": "^8.6.3",
"pnpm": "^9.6.0",
"node": "^18.0.0 || >=20"
},
"pnpm": {
Expand All @@ -70,8 +70,7 @@
"@sveltejs/vite-plugin-svelte": "workspace:^",
"@sveltejs/vite-plugin-svelte-inspector": "workspace:^",
"svelte": "$svelte",
"vite": "$vite",
"@types/node@<=20.12.0": "20.11.5"
"vite": "$vite"
}
}
}
9 changes: 6 additions & 3 deletions packages/vite-plugin-svelte/src/utils/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ export function isDebugNamespaceEnabled(namespace) {
}

export function logSvelte5Warning() {
const notice = `You are using Svelte ${VERSION}. Svelte 5 support is experimental, breaking changes can occur in any release until this notice is removed.`;
const wip = ['svelte-inspector is disabled until dev mode implements node to code mapping'];
log.warn(`${notice}\nwork in progress:\n - ${wip.join('\n - ')}\n`);
log.warn(
`You are using Svelte ${VERSION} with vite-plugin-svelte@3. Active Svelte 5 support has moved to vite-plugin-svelte@4.
To receive bug fixes and new features update your devDependencies to "@sveltejs/vite-plugin-svelte": "^4.0.0-next.6" and install.
For framework integrations that depend on it, you might have to add an override:
"overrides": {"@sveltejs/vite-plugin-svelte": "^4.0.0-next.6"}`.replace(/\n\s*/gm, '\n\t')
);
}
Loading

0 comments on commit 4f95193

Please sign in to comment.