Skip to content

Commit

Permalink
[Major] Svelte 5 Upgrade (#4)
Browse files Browse the repository at this point in the history
* Update to svelte 5

* Fix legacy add changeset

* fix tests

* another fix

---------

Co-authored-by: Bert Bengtson <[email protected]>
  • Loading branch information
bertybot and bertybot2 authored Nov 22, 2024
1 parent caa4a0a commit 52d5038
Show file tree
Hide file tree
Showing 62 changed files with 2,941 additions and 1,490 deletions.
10 changes: 10 additions & 0 deletions .changeset/chatty-camels-boil.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'rich-text-svelte-renderer': major
---

# Svelte 5 Upgrade

Updated to use Svelte 5 Runes.

- You can now pass in valid HTMLTags instead of SvelteComponents for Renderers
- Removed Slug prop. Hoping Svelte 5 fixes the bug that made it necessary but may revert soon.
15 changes: 0 additions & 15 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.cjs

This file was deleted.

13 changes: 2 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
.DS_Store
node_modules
/build
/.svelte-kit
/package
.env
.env.*
!.env.example

# Ignore files for PNPM, NPM and YARN
pnpm-lock.yaml
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
10 changes: 8 additions & 2 deletions .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte"],
"pluginSearchDirs": ["."],
"overrides": [{ "files": "*.svelte", "options": { "parser": "svelte" } }]
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
]
}
39 changes: 39 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import prettier from 'eslint-config-prettier';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import ts from 'typescript-eslint';

export default ts.config(
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
{
languageOptions: {
globals: {
...globals.browser,
...globals.node
}
}
},
{
files: ['**/*.svelte'],

languageOptions: {
parserOptions: {
parser: ts.parser
}
}
},
{
ignores: ['build/', '.svelte-kit/', 'dist/']
},
{
rules: {
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/no-explicit-any': ['off']
}
}
);
32 changes: 18 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,34 +34,38 @@
"!dist/**/*.test.*"
],
"peerDependencies": {
"svelte": "^3.58.0 || ^4.0.0"
"svelte": "^5.0.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/bertybot/svelte-renderer.git"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.27.2",
"@sveltejs/package": "^2.2.2",
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.5.27",
"@sveltejs/package": "^2.3.7",
"@sveltejs/vite-plugin-svelte": "^4.0.0",
"@testing-library/svelte": "^4.0.4",
"@types/eslint": "^9.6.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-svelte": "^2.34.0",
"eslint": "^9.7.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0",
"happy-dom": "^8.9.0",
"jsdom": "^21.1.2",
"prettier": "^2.8.8",
"prettier-plugin-svelte": "^2.10.1",
"prettier": "^3.3.2",
"prettier-plugin-svelte": "^3.2.6",
"publint": "^0.2.5",
"svelte": "^4.2.2",
"svelte-check": "^3.5.2",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.5.0",
"vitest": "^0.34.6"
"typescript": "^5.5.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.4.4",
"vitest": "^1.0.0"
},
"type": "module",
"dependencies": {
Expand Down
Loading

0 comments on commit 52d5038

Please sign in to comment.