Skip to content

Commit 8329d3a

Browse files
committed
Svelte 4 compatibility + deps update
1 parent 552b8df commit 8329d3a

File tree

9 files changed

+2493
-9207
lines changed

9 files changed

+2493
-9207
lines changed

.docs/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
"sourceMap": false
1111
},
1212
"stripInternal": true,
13-
"files": ["../src/index.ts"]
13+
"files": ["../src/index.ts", "../src/global.d.ts"]
1414
}

.eslintrc.js renamed to .eslintrc.cjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-env node */
12
module.exports = {
23
env: {
34
browser: true,
@@ -24,13 +25,14 @@ module.exports = {
2425
"import/newline-after-import": ["error"],
2526
"import/no-absolute-path": ["error"],
2627
"@typescript-eslint/no-explicit-any": ["off"],
28+
"import/no-unresolved": ["error", { ignore: ["svelte/store"] }]
2729
},
2830
settings: {
2931
"import/resolver": {
3032
node: {
3133
extensions: [".js", ".ts"],
3234
},
3335
},
34-
"import/extensions": [".js"],
36+
"import/extensions": [".js", ".ts", ".cjs"],
3537
},
3638
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [2.3.1]
10+
11+
### Added
12+
13+
- Add compatibility for Svelte 4 ([PR#47] + [Issue#48])
14+
15+
### Changed
16+
17+
- (dev) Use typedoc again to generate documentation
18+
- (dev) Update all dependencies to the last version
19+
920
## [2.3.0]
1021

1122
### Fixed
@@ -164,6 +175,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
164175
First version
165176

166177
[Unreleased]: https://github.com/MacFJA/svelte-persistent-store/compare/2.2.1...HEAD
178+
[2.3.1]: https://github.com/MacFJA/svelte-persistent-store/compare/2.3.0...2.3.1
179+
[2.3.0]: https://github.com/MacFJA/svelte-persistent-store/compare/2.2.1...2.3.0
167180
[2.2.1]: https://github.com/MacFJA/svelte-persistent-store/compare/2.2.0...2.2.1
168181
[2.2.0]: https://github.com/MacFJA/svelte-persistent-store/compare/2.1.0...2.2.0
169182
[2.1.0]: https://github.com/MacFJA/svelte-persistent-store/compare/2.0.0...2.1.0
@@ -189,7 +202,9 @@ First version
189202
[Issue#31]: https://github.com/MacFJA/svelte-persistent-store/issues/31
190203
[Issue#32]: https://github.com/MacFJA/svelte-persistent-store/issues/32
191204
[Issue#41]: https://github.com/MacFJA/svelte-persistent-store/issues/41
205+
[Issue#48]: https://github.com/MacFJA/svelte-persistent-store/issues/48
192206
[PR#8]: https://github.com/MacFJA/svelte-persistent-store/pull/8
193207
[PR#38]: https://github.com/MacFJA/svelte-persistent-store/pull/38
194208
[PR#39]: https://github.com/MacFJA/svelte-persistent-store/pull/39
195209
[PR#40]: https://github.com/MacFJA/svelte-persistent-store/pull/40
210+
[PR#47]: https://github.com/MacFJA/svelte-persistent-store/pull/47

package-lock.json

Lines changed: 2436 additions & 9175 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@macfja/svelte-persistent-store",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"description": "A Svelte store that keep its value through pages and reloads",
55
"main": "dist/index.js",
66
"module": "dist/index.mjs",
@@ -21,45 +21,44 @@
2121
"dependencies": {
2222
"@macfja/serializer": "^1.1.2",
2323
"browser-cookies": "^1.2.0",
24-
"idb-keyval": "^5.1.3",
24+
"idb-keyval": "^5.1.3 || ^6.2.1",
2525
"sjcl-codec-hex": "^1.0.0",
2626
"sjcl-es": "^2.0.0"
2727
},
2828
"devDependencies": {
29-
"@rollup/plugin-commonjs": "^22.0.0",
30-
"@rollup/plugin-node-resolve": "^13.3.0",
31-
"@rollup/plugin-sucrase": "^4.0.4",
32-
"@rollup/plugin-typescript": "^8.2.5",
33-
"@ts-docs/default-docs-structure": "^0.4.4",
34-
"@ts-docs/ts-docs": "^0.4.4",
35-
"@tsconfig/svelte": "^3.0.0",
29+
"@rollup/plugin-commonjs": "^22.0.0 || ^25.0.2",
30+
"@rollup/plugin-node-resolve": "^13.3.0 || ^15.1.0",
31+
"@rollup/plugin-sucrase": "^4.0.4 || ^5.0.1",
32+
"@rollup/plugin-terser": "^0.4.3",
33+
"@rollup/plugin-typescript": "^8.2.5 || ^11.1.2",
34+
"@tsconfig/svelte": "^3.0.0 || ^5.0.0",
3635
"@typescript-eslint/eslint-plugin": "^5.30.5",
3736
"@typescript-eslint/parser": "^5.30.5",
3837
"eslint": "^8.19.0",
3938
"eslint-config-prettier": "^8.5.0",
4039
"eslint-plugin-import": "^2.24.0",
4140
"prettier": "^2.7.1",
4241
"prettier-plugin-svelte": "^2.7.0",
43-
"rollup": "^2.56.2",
42+
"rollup": "^2.56.2 || ^3.26.0",
4443
"rollup-plugin-svelte": "^7.1.0",
45-
"rollup-plugin-terser": "^7.0.2",
4644
"sirv-cli": "^2.0.2",
47-
"svelte": "^3.42.1",
48-
"svelte-check": "^2.8.0",
49-
"svelte-preprocess": "^4.7.4",
50-
"testcafe": "^1.18.3 <1.20.0",
51-
"tslib": "^2.3.0",
52-
"typescript": "^4.7.4"
45+
"svelte": "^3.42.1 || ^4.0.1",
46+
"svelte-check": "^2.8.0 || 3.4.4",
47+
"svelte-preprocess": "^4.7.4 || ^5.0.4",
48+
"testcafe": "^1.18.3 <1.20.0 || 3.0.1",
49+
"tslib": "^2.3.0 | ^2.6.0",
50+
"typedoc": "^0.24.8",
51+
"typescript": "^4.7.4 || ^5.1.6"
5352
},
5453
"peerDependencies": {
5554
"svelte": "^3.0 || ^4.0"
5655
},
5756
"scripts": {
58-
"doc": "ts-docs src/index.ts",
59-
"lint": "prettier --check ./**/*.{md,js,json,ts,yml} && eslint src/ ./*.js",
57+
"doc": "typedoc",
58+
"lint": "prettier --check ./**/*.{md,js,json,ts,yml} && eslint src/ ./*.cjs ./*.mjs",
6059
"format": "prettier --write ./**/*.{md,js,json,ts,yml}",
61-
"pretest": "rollup -c rollup.test.config.js",
62-
"test": "testcafe all tests/e2e.ts --app 'npx sirv tests --port 5000'",
60+
"pretest": "rollup -c rollup.test.config.mjs",
61+
"test": "testcafe all tests/e2e.ts --app 'npx sirv tests --port 5000 --host 0.0.0.0'",
6362
"prebuild": "tsc",
6463
"build": "rollup -c",
6564
"prepublishOnly": "npm run build"

rollup.config.js renamed to rollup.config.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import commonjs from "@rollup/plugin-commonjs"
22
import resolve from "@rollup/plugin-node-resolve"
33
import sucrase from "@rollup/plugin-sucrase"
4-
import { terser } from "rollup-plugin-terser"
4+
import terser from "@rollup/plugin-terser"
55

6-
import pkg from "./package.json"
6+
import pkg from "./package.json" assert {type: "json"}
77

88
const name = pkg.name
99
.replace(/^(@\S+\/)?(svelte-)?(\S+)/, "$3")

tsdocs.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

typedoc.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"entryPoints": ["src/index.ts"],
3+
"includes": "./.docs/",
4+
"out": "docs",
5+
"tsconfig": ".docs/tsconfig.json",
6+
"excludeInternal": true,
7+
"excludePrivate": true,
8+
"visibilityFilters": {
9+
"protected": false,
10+
"private": false,
11+
"inherited": true,
12+
"external": true,
13+
"@alpha": false,
14+
"@beta": false
15+
}
16+
}

0 commit comments

Comments
 (0)