diff --git a/.changeset/nervous-dodos-deny.md b/.changeset/nervous-dodos-deny.md
deleted file mode 100644
index c7c16ad6a..000000000
--- a/.changeset/nervous-dodos-deny.md
+++ /dev/null
@@ -1,5 +0,0 @@
----
-"@solid-primitives/storage": minor
----
-
-Bugfix for newly introduced sync api. Now BroadcastChannel for `messageSync` should also work as expected.
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index 35181e08e..000000000
--- a/.eslintrc
+++ /dev/null
@@ -1,39 +0,0 @@
-{
- "root": true,
- "parser": "@typescript-eslint/parser",
- "plugins": ["@typescript-eslint", "no-only-tests", "eslint-comments"],
- "ignorePatterns": ["packages/*/dist/**", "packages/*/dev/**", "**/*/__snapshots__/**"],
- "parserOptions": {
- "project": "./tsconfig.json",
- "tsconfigRootDir": ".",
- "sourceType": "module"
- },
- "rules": {
- /*
- forgot to remove/implement
- */
- "no-console": "warn",
- "no-debugger": "warn",
- "prefer-const": "warn",
- "@typescript-eslint/no-unused-vars": [
- "warn",
- {
- "argsIgnorePattern": "^_",
- "varsIgnorePattern": "^_",
- "caughtErrorsIgnorePattern": "^_"
- }
- ],
- "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
- "@typescript-eslint/no-unnecessary-condition": "warn",
- "@typescript-eslint/no-unnecessary-qualifier": "warn",
- "@typescript-eslint/no-unnecessary-type-arguments": "warn",
- "@typescript-eslint/no-unnecessary-type-assertion": "warn",
- "@typescript-eslint/no-unnecessary-type-constraint": "warn",
- "@typescript-eslint/no-useless-empty-export": "warn",
- "eslint-comments/no-unused-disable": "warn",
- /*
- tests
- */
- "no-only-tests/no-only-tests": "warn"
- }
-}
diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml
index 8a2412f06..e0e90bcb8 100644
--- a/.github/workflows/format.yml
+++ b/.github/workflows/format.yml
@@ -9,21 +9,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2.2.4
+ - uses: pnpm/action-setup@v4
- name: Setup Node.js environment
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Setup prettier cache
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: node_modules/.cache/prettier
key: prettier-${{ github.sha }}
@@ -34,7 +34,7 @@ jobs:
run: pnpm run format
- name: Add, Commit and Push
- uses: stefanzweifel/git-auto-commit-action@v4
+ uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Format"
@@ -42,7 +42,7 @@ jobs:
run: pnpm run update-readme
- name: Add, Commit and Push
- uses: stefanzweifel/git-auto-commit-action@v4
+ uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Update Readme"
file_pattern: README.md
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 2432dd13f..58cbb7919 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -10,21 +10,21 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2.2.4
+ - uses: pnpm/action-setup@v4
- name: Setup Node.js environment
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
cache: pnpm
- name: Install Dependencies
run: pnpm i
- name: Cache turbo build setup
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.sha }}
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index bf2758fd1..10deb9d9e 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -11,21 +11,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- - uses: pnpm/action-setup@v2.2.4
+ - uses: pnpm/action-setup@v4
- name: Setup Node.js environment
- uses: actions/setup-node@v3
+ uses: actions/setup-node@v4
with:
- node-version: 18
+ node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Cache turbo build setup
- uses: actions/cache@v3
+ uses: actions/cache@v4
with:
path: node_modules/.cache/turbo
key: turbo-${{ github.sha }}
diff --git a/.gitignore b/.gitignore
index fdfced3d7..879b66d6f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -74,6 +74,7 @@ node_modules/
jspm_packages/
dist/
+
# TypeScript v1 declaration files
typings/
@@ -153,6 +154,7 @@ dist/
# vscode settings
.vscode/settings.json
+.vscode/launch.json
# Temporary folders
tmp/
diff --git a/.nvmrc b/.nvmrc
deleted file mode 100644
index 6d80269a4..000000000
--- a/.nvmrc
+++ /dev/null
@@ -1 +0,0 @@
-18.16.0
diff --git a/README.md b/README.md
index d8258b643..311855f70 100644
--- a/README.md
+++ b/README.md
@@ -6,7 +6,7 @@
[![pnpm](https://img.shields.io/badge/maintained%20with-pnpm-cc00ff.svg?style=for-the-badge&logo=pnpm)](https://pnpm.io/)
[![turborepo](https://img.shields.io/badge/built%20with-turborepo-cc00ff.svg?style=for-the-badge&logo=turborepo)](https://turborepo.org/)
-[![combined-downloads](https://img.shields.io/endpoint?style=for-the-badge&url=https://combined-npm-downloads.deno.dev/@solid-primitives/utils,@solid-primitives/broadcast-channel,@solid-primitives/context,@solid-primitives/devices,@solid-primitives/event-dispatcher,@solid-primitives/event-props,@solid-primitives/fetch,@solid-primitives/filesystem,@solid-primitives/flux-store,@solid-primitives/fullscreen,@solid-primitives/i18n,@solid-primitives/idle,@solid-primitives/input-mask,@solid-primitives/keyed,@solid-primitives/lifecycle,@solid-primitives/list,@solid-primitives/marker,@solid-primitives/mutable,@solid-primitives/permission,@solid-primitives/platform,@solid-primitives/resource,@solid-primitives/scheduled,@solid-primitives/script-loader,@solid-primitives/selection,@solid-primitives/share,@solid-primitives/start,@solid-primitives/state-machine,@solid-primitives/timer,@solid-primitives/transition-group,@solid-primitives/tween,@solid-primitives/websocket,@solid-primitives/workers)](https://dash.deno.com/playground/combined-npm-downloads)
+[![combined-downloads](https://img.shields.io/endpoint?style=for-the-badge&url=https://combined-npm-downloads.deno.dev/@solid-primitives/utils,@solid-primitives/broadcast-channel,@solid-primitives/context,@solid-primitives/cookies,@solid-primitives/devices,@solid-primitives/event-dispatcher,@solid-primitives/event-props,@solid-primitives/fetch,@solid-primitives/filesystem,@solid-primitives/flux-store,@solid-primitives/i18n,@solid-primitives/idle,@solid-primitives/input-mask,@solid-primitives/keyed,@solid-primitives/lifecycle,@solid-primitives/list,@solid-primitives/marker,@solid-primitives/mutable,@solid-primitives/permission,@solid-primitives/platform,@solid-primitives/resource,@solid-primitives/scheduled,@solid-primitives/script-loader,@solid-primitives/selection,@solid-primitives/share,@solid-primitives/spring,@solid-primitives/state-machine,@solid-primitives/timer,@solid-primitives/transition-group,@solid-primitives/tween,@solid-primitives/websocket,@solid-primitives/workers)](https://dash.deno.com/playground/combined-npm-downloads)
A project that strives to develop high-quality, community contributed Solid primitives. All utilities are well tested and continuously maintained. Every contribution to the repository is checked for quality and maintained to the highest degree of excellence. The ultimate goal is to extend Solid's primary and secondary primitives with a set of tertiary primitives.
@@ -51,12 +51,13 @@ The goal of Solid Primitives is to wrap client and server side functionality to
|[geolocation](https://github.com/solidjs-community/solid-primitives/tree/main/packages/geolocation#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createGeolocation](https://github.com/solidjs-community/solid-primitives/tree/main/packages/geolocation#creategeolocation)
[createGeolocationWatcher](https://github.com/solidjs-community/solid-primitives/tree/main/packages/geolocation#creategeolocationwatcher)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/geolocation?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/geolocation)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/geolocation?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/geolocation)|
|[mutation-observer](https://github.com/solidjs-community/solid-primitives/tree/main/packages/mutation-observer#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createMutationObserver](https://github.com/solidjs-community/solid-primitives/tree/main/packages/mutation-observer#createmutationobserver)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/mutation-observer?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/mutation-observer)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/mutation-observer?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/mutation-observer)|
|[permission](https://github.com/solidjs-community/solid-primitives/tree/main/packages/permission#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createPermission](https://github.com/solidjs-community/solid-primitives/tree/main/packages/permission#createpermission)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/permission?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/permission)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/permission?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/permission)|
-|[storage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[makePersisted](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#makepersisted)
[cookieStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#cookiestorage)
[multiplexStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#multiplexstorage)
[storageSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#storagesync)
[messageSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#messagesync)
[wsSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#wssync)
[multiplexSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#multiplexsync)
[addClearMethod](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#addclearmethod)
[addWithOptionsMethod](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#addwithoptionsmethod)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/storage?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/storage)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/storage?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/storage)|
+|[storage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[makePersisted](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#makepersisted)
[cookieStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#cookiestorage)
[tauriStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#tauristorage)
[multiplexStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#multiplexstorage)
[storageSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#storagesync)
[messageSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#messagesync)
[wsSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#wssync)
[multiplexSync](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#multiplexsync)
[addClearMethod](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#addclearmethod)
[addWithOptionsMethod](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#addwithoptionsmethod)
[makeObjectStorage](https://github.com/solidjs-community/solid-primitives/tree/main/packages/storage#makeobjectstorage)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/storage?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/storage)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/storage?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/storage)|
|[timer](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[makeTimer](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#maketimer)
[createTimer](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#createtimer)
[createTimeoutLoop](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#createtimeoutloop)
[createPolled](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#createpolled)
[createIntervalCounter](https://github.com/solidjs-community/solid-primitives/tree/main/packages/timer#createintervalcounter)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/timer?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/timer)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/timer?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/timer)|
|[upload](https://github.com/solidjs-community/solid-primitives/tree/main/packages/upload#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createFileUploader](https://github.com/solidjs-community/solid-primitives/tree/main/packages/upload#createfileuploader)
[createDropzone](https://github.com/solidjs-community/solid-primitives/tree/main/packages/upload#createdropzone)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/upload?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/upload)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/upload?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/upload)|
|[workers](https://github.com/solidjs-community/solid-primitives/tree/main/packages/workers#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createWorker](https://github.com/solidjs-community/solid-primitives/tree/main/packages/workers#createworker)
[createWorkerPool](https://github.com/solidjs-community/solid-primitives/tree/main/packages/workers#createworkerpool)
[createSignaledWorker](https://github.com/solidjs-community/solid-primitives/tree/main/packages/workers#createsignaledworker)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/workers?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/workers)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/workers?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/workers)|
|
*Network*
|
|[connectivity](https://github.com/solidjs-community/solid-primitives/tree/main/packages/connectivity#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createConnectivitySignal](https://github.com/solidjs-community/solid-primitives/tree/main/packages/connectivity#createconnectivitysignal)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/connectivity?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/connectivity)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/connectivity?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/connectivity)|
+|[cookies](https://github.com/solidjs-community/solid-primitives/tree/main/packages/cookies#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createServerCookie](https://github.com/solidjs-community/solid-primitives/tree/main/packages/cookies#createservercookie)
[createUserTheme](https://github.com/solidjs-community/solid-primitives/tree/main/packages/cookies#createusertheme)
[getCookiesString](https://github.com/solidjs-community/solid-primitives/tree/main/packages/cookies#getcookiesstring)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/cookies?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/cookies)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/cookies?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/cookies)|
|[fetch](https://github.com/solidjs-community/solid-primitives/tree/main/packages/fetch#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createFetch](https://github.com/solidjs-community/solid-primitives/tree/main/packages/fetch#createfetch)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/fetch?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/fetch)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/fetch?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/fetch)|
|[graphql](https://github.com/solidjs-community/solid-primitives/tree/main/packages/graphql#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createGraphQLClient](https://github.com/solidjs-community/solid-primitives/tree/main/packages/graphql#creategraphqlclient)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/graphql?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/graphql)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/graphql?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/graphql)|
|[stream](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createStream](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#createstream)
[createAmplitudeStream](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#createamplitudestream)
[createMediaPermissionRequest](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#createmediapermissionrequest)
[createAmplitudeFromStream](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#createamplitudefromstream)
[createScreen](https://github.com/solidjs-community/solid-primitives/tree/main/packages/stream#createscreen)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/stream?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/stream)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/stream?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/stream)|
@@ -91,7 +92,7 @@ The goal of Solid Primitives is to wrap client and server side functionality to
|[map](https://github.com/solidjs-community/solid-primitives/tree/main/packages/map#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[ReactiveMap](https://github.com/solidjs-community/solid-primitives/tree/main/packages/map#reactivemap)
[ReactiveWeakMap](https://github.com/solidjs-community/solid-primitives/tree/main/packages/map#reactiveweakmap)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/map?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/map)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/map?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/map)|
|[memo](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createLatest](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createlatest)
[createLatestMany](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createlatestmany)
[createWritableMemo](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createwritablememo)
[createLazyMemo](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createlazymemo)
[createPureReaction](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createpurereaction)
[createMemoCache](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#creatememocache)
[createReducer](https://github.com/solidjs-community/solid-primitives/tree/main/packages/memo#createreducer)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/memo?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/memo)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/memo?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/memo)|
|[mutable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/mutable#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createMutable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/mutable#createmutable)
[modifyMutable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/mutable#modifymutable)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/mutable?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/mutable)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/mutable?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/mutable)|
-|[resource](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createAggregated](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#createaggregated)
[createDeepSignal](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#createdeepsignal)
[makeAbortable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makeabortable)
[makeCache](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makecache)
[makeRetrying](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makeretrying)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/resource?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/resource)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/resource?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/resource)|
+|[resource](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createAggregated](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#createaggregated)
[createDeepSignal](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#createdeepsignal)
[makeAbortable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makeabortable)
[createAbortable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#createabortable)
[makeCache](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makecache)
[makeRetrying](https://github.com/solidjs-community/solid-primitives/tree/main/packages/resource#makeretrying)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/resource?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/resource)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/resource?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/resource)|
|[rootless](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createSubRoot](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createsubroot)
[createCallback](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createcallback)
[createDisposable](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createdisposable)
[createSharedRoot](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createsharedroot)
[createRootPool](https://github.com/solidjs-community/solid-primitives/tree/main/packages/rootless#createrootpool)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/rootless?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/rootless)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/rootless?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/rootless)|
|[set](https://github.com/solidjs-community/solid-primitives/tree/main/packages/set#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[ReactiveSet](https://github.com/solidjs-community/solid-primitives/tree/main/packages/set#reactiveset)
[ReactiveWeakSet](https://github.com/solidjs-community/solid-primitives/tree/main/packages/set#reactiveweakset)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/set?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/set)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/set?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/set)|
|[signal-builders](https://github.com/solidjs-community/solid-primitives/tree/main/packages/signal-builders#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[List of builders](https://github.com/solidjs-community/solid-primitives/tree/main/packages/signal-builders#list-of-builders)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/signal-builders?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/signal-builders)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/signal-builders?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/signal-builders)|
@@ -102,12 +103,12 @@ The goal of Solid Primitives is to wrap client and server side functionality to
|[marker](https://github.com/solidjs-community/solid-primitives/tree/main/packages/marker#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-1.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createMarker](https://github.com/solidjs-community/solid-primitives/tree/main/packages/marker#createmarker)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/marker?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/marker)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/marker?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/marker)|
|[masonry](https://github.com/solidjs-community/solid-primitives/tree/main/packages/masonry#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createMasonry](https://github.com/solidjs-community/solid-primitives/tree/main/packages/masonry#createmasonry)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/masonry?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/masonry)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/masonry?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/masonry)|
|[pagination](https://github.com/solidjs-community/solid-primitives/tree/main/packages/pagination#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createPagination](https://github.com/solidjs-community/solid-primitives/tree/main/packages/pagination#createpagination)
[createInfiniteScroll](https://github.com/solidjs-community/solid-primitives/tree/main/packages/pagination#createinfinitescroll)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/pagination?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/pagination)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/pagination?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/pagination)|
+|[virtual](https://github.com/solidjs-community/solid-primitives/tree/main/packages/virtual#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createVirutalList](https://github.com/solidjs-community/solid-primitives/tree/main/packages/virtual#createvirutallist)
[VirtualList](https://github.com/solidjs-community/solid-primitives/tree/main/packages/virtual#virtuallist)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/virtual?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/virtual)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/virtual?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/virtual)|
|*Animation*
|
|[presence](https://github.com/solidjs-community/solid-primitives/tree/main/packages/presence#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createPresence](https://github.com/solidjs-community/solid-primitives/tree/main/packages/presence#createpresence)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/presence?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/presence)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/presence?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/presence)|
-|[raf](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createRAF](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#createraf)
[targetFPS](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#targetfps)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/raf?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/raf)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/raf?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/raf)|
+|[raf](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createRAF](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#createraf)
[createMs](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#createms)
[targetFPS](https://github.com/solidjs-community/solid-primitives/tree/main/packages/raf#targetfps)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/raf?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/raf)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/raf?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/raf)|
+|[spring](https://github.com/solidjs-community/solid-primitives/tree/main/packages/spring#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createSpring](https://github.com/solidjs-community/solid-primitives/tree/main/packages/spring#createspring)
[createDerivedSpring](https://github.com/solidjs-community/solid-primitives/tree/main/packages/spring#createderivedspring)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/spring?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/spring)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/spring?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/spring)|
|[transition-group](https://github.com/solidjs-community/solid-primitives/tree/main/packages/transition-group#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-2.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createSwitchTransition](https://github.com/solidjs-community/solid-primitives/tree/main/packages/transition-group#createswitchtransition)
[createListTransition](https://github.com/solidjs-community/solid-primitives/tree/main/packages/transition-group#createlisttransition)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/transition-group?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/transition-group)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/transition-group?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/transition-group)|
|[tween](https://github.com/solidjs-community/solid-primitives/tree/main/packages/tween#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-3.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createTween](https://github.com/solidjs-community/solid-primitives/tree/main/packages/tween#createtween)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/tween?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/tween)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/tween?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/tween)|
-|*Solid Start*
|
-|[start](https://github.com/solidjs-community/solid-primitives/tree/main/packages/start#readme)|[![STAGE](https://img.shields.io/endpoint?style=for-the-badge&label=&url=https%3A%2F%2Fraw.githubusercontent.com%2Fsolidjs-community%2Fsolid-primitives%2Fmain%2Fassets%2Fbadges%2Fstage-0.json)](https://github.com/solidjs-community/solid-primitives/blob/main/CONTRIBUTING.md#contribution-process)|[createServerCookie](https://github.com/solidjs-community/solid-primitives/tree/main/packages/start#createservercookie)
[createUserTheme](https://github.com/solidjs-community/solid-primitives/tree/main/packages/start#createusertheme)|[![SIZE](https://img.shields.io/bundlephobia/minzip/@solid-primitives/start?style=for-the-badge&label=)](https://bundlephobia.com/package/@solid-primitives/start)|[![VERSION](https://img.shields.io/npm/v/@solid-primitives/start?style=for-the-badge&label=)](https://www.npmjs.com/package/@solid-primitives/start)|
diff --git a/configs/vitest.config.ts b/configs/vitest.config.ts
index 1209de2fe..4cf8cc03b 100644
--- a/configs/vitest.config.ts
+++ b/configs/vitest.config.ts
@@ -1,7 +1,16 @@
import { defineConfig } from "vitest/config";
import solidPlugin from "vite-plugin-solid";
+import * as utils from "../scripts/utils/index.js"
-const fromRoot = process.env.CI === "true";
+const package_name = utils.getPackageNameFromCWD()
+
+if (package_name == null) {
+ utils.logLine("Testing ALL packages...")
+} else {
+ utils.logLine("Testing "+package_name+" package...")
+}
+
+const from_root = package_name == null
export default defineConfig(({ mode }) => {
// test in server environment
@@ -25,7 +34,7 @@ export default defineConfig(({ mode }) => {
transformMode: {
web: [/\.[jt]sx$/],
},
- ...(fromRoot
+ ...(from_root
? // Testing all packages from root
{
...(testSSR && { include: ["packages/*/test/server.test.{ts,tsx}"] }),
diff --git a/eslint.config.mjs b/eslint.config.mjs
new file mode 100644
index 000000000..ecb337067
--- /dev/null
+++ b/eslint.config.mjs
@@ -0,0 +1,50 @@
+import typescriptEslint from "@typescript-eslint/eslint-plugin";
+import noOnlyTests from "eslint-plugin-no-only-tests";
+import eslintComments from "eslint-plugin-eslint-comments";
+import tsParser from "@typescript-eslint/parser";
+
+/** @type {import("eslint").Linter.Config} */
+export default {
+
+ files: ["**/*.{js,mjs,jsx,ts,tsx}"],
+ ignores: ["**/{dist,node_modules,__snapshots__}/**/*", "packages/*/dev/**/*", "site/**/*"],
+
+ plugins: {
+ "@typescript-eslint": typescriptEslint,
+ "no-only-tests": noOnlyTests,
+ "eslint-comments": eslintComments,
+ },
+
+ languageOptions: {
+ parser: tsParser,
+ ecmaVersion: 5,
+ sourceType: "module",
+
+ parserOptions: {
+ project: "./tsconfig.json",
+ tsconfigRootDir: ".",
+ },
+ },
+
+ rules: {
+ "no-console": "warn",
+ "no-debugger": "warn",
+ "prefer-const": "warn",
+
+ "@typescript-eslint/no-unused-vars": ["warn", {
+ argsIgnorePattern: "^_",
+ varsIgnorePattern: "^_",
+ caughtErrorsIgnorePattern: "^_",
+ }],
+
+ "@typescript-eslint/no-unnecessary-boolean-literal-compare": "warn",
+ "@typescript-eslint/no-unnecessary-condition": "warn",
+ "@typescript-eslint/no-unnecessary-qualifier": "warn",
+ "@typescript-eslint/no-unnecessary-type-arguments": "warn",
+ "@typescript-eslint/no-unnecessary-type-assertion": "warn",
+ "@typescript-eslint/no-unnecessary-type-constraint": "warn",
+ "@typescript-eslint/no-useless-empty-export": "warn",
+ "eslint-comments/no-unused-disable": "warn",
+ "no-only-tests/no-only-tests": "warn",
+ },
+};
diff --git a/netlify.toml b/netlify.toml
index 61d6cd7cf..4ca2d4997 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -1,4 +1,4 @@
[build]
base = "/"
- publish = "site/dist/public"
+ publish = "site/dist"
command = "pnpm build && pnpm -dir site run deploy"
diff --git a/package.json b/package.json
index f6e9f246c..e50ce3611 100644
--- a/package.json
+++ b/package.json
@@ -13,10 +13,10 @@
"scripts": {
"dev": "pnpm -dir site run dev",
"format": "prettier --cache -w {site,packages,scripts,template}/**/*.{js,ts,json,css,tsx,jsx,md,html} --ignore-path .gitignore",
- "lint:packages": "eslint --ignore-path .gitignore --max-warnings 0 packages/*/src/**/*",
- "lint:tests": "eslint --ignore-path .gitignore packages/*/test/** --quiet --rule \"no-only-tests/no-only-tests: error\"",
- "lint": "concurrently pnpm:lint:*",
- "test:client": "cross-env CI=true vitest -c ./configs/vitest.config.ts",
+ "lint:packages": "eslint --max-warnings 0 \"packages/*/src/**/*\"",
+ "lint:tests": "eslint \"packages/*/test/**\" --rule \"no-only-tests/no-only-tests: error\"",
+ "lint": "pnpm run \"/^lint:.*/\"",
+ "test:client": "vitest -c ./configs/vitest.config.ts",
"test:ssr": "pnpm run test:client --mode ssr",
"test": "pnpm run test:client && pnpm run test:ssr",
"build:ci": "turbo run build --filter='./packages/*'",
@@ -28,42 +28,36 @@
"release": "pnpm build && changeset publish"
},
"devDependencies": {
- "@changesets/cli": "^2.27.1",
- "@solidjs/testing-library": "^0.8.5",
- "@types/fs-extra": "^11.0.4",
- "@types/jsdom": "^21.1.6",
- "@types/node": "^20.10.5",
- "@typescript-eslint/eslint-plugin": "^6.15.0",
- "@typescript-eslint/parser": "^6.15.0",
- "concurrently": "^8.2.2",
- "cross-env": "^7.0.3",
+ "@changesets/cli": "^2.27.8",
+ "@types/jsdom": "^21.1.7",
+ "@types/node": "^22.5.4",
+ "@typescript-eslint/eslint-plugin": "^8.5.0",
+ "@typescript-eslint/parser": "^8.5.0",
"esbuild": "^0.19.11",
- "eslint": "^8.56.0",
+ "eslint": "^9.10.0",
"eslint-plugin-eslint-comments": "^3.2.0",
- "eslint-plugin-no-only-tests": "^3.1.0",
- "fs-extra": "^11.2.0",
- "gzip-size": "^7.0.0",
- "jsdom": "^22.1.0",
+ "eslint-plugin-no-only-tests": "^3.3.0",
+ "jsdom": "^25.0.0",
"json-to-markdown-table": "^1.0.0",
- "prettier": "^3.1.1",
- "prettier-plugin-tailwindcss": "^0.5.9",
+ "prettier": "^3.3.3",
+ "prettier-plugin-tailwindcss": "^0.6.6",
"rehype-autolink-headings": "^7.1.0",
"rehype-highlight": "^7.0.0",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.0",
- "solid-devtools": "^0.29.2",
- "solid-js": "^1.8.7",
- "solid-start": "^0.3.10",
- "tsup": "^7.2.0",
+ "solid-js": "^1.8.22",
+ "@solidjs/start": "^1.0.6",
+ "tsup": "^8.2.4",
"tsup-preset-solid": "^2.2.0",
- "tsx": "^4.7.0",
- "turbo": "^1.11.2",
- "typescript": "~5.2.2",
+ "tsx": "^4.19.1",
+ "turbo": "^1.12.5",
+ "vinxi": "^0.4.2",
+ "vite-plugin-solid": "^2.10.2",
+ "typescript": "~5.6.2",
"valibot": "^0.20.1",
- "vite": "^4.5.1",
- "vite-plugin-solid": "^2.8.0",
- "vitest": "^0.34.6"
+ "vite": "5.4.4",
+ "vitest": "^2.1.0"
},
- "packageManager": "pnpm@8.15.6+sha256.01c01eeb990e379b31ef19c03e9d06a14afa5250b82e81303f88721c99ff2e6f",
- "engines": {"node": ">=18.0.0"}
+ "packageManager": "pnpm@9.9.0",
+ "engines": {"node": ">=20.0.0"}
}
diff --git a/packages/active-element/README.md b/packages/active-element/README.md
index dc90a2f8f..68e0fdb5f 100644
--- a/packages/active-element/README.md
+++ b/packages/active-element/README.md
@@ -11,13 +11,13 @@
##### Non-reactive primitives:
-- [`makeActiveElementListener`](#makeActiveElementListener) - Listen for changes to the `document.activeElement`.
-- [`makeFocusListener`](#makeFocusListener) - Attaches "blur" and "focus" event listeners to the element.
+- [`makeActiveElementListener`](#makeactiveelementlistener) - Listen for changes to the `document.activeElement`.
+- [`makeFocusListener`](#makefocuslistener) - Attaches "blur" and "focus" event listeners to the element.
##### Reactive primitives:
-- [`createActiveElement`](#createActiveElement) - Provides reactive signal of `document.activeElement`.
-- [`createFocusSignal`](#createFocusSignal) - Provides a signal representing element's focus state.
+- [`createActiveElement`](#createactiveelement) - Provides reactive signal of `document.activeElement`.
+- [`createFocusSignal`](#createfocussignal) - Provides a signal representing element's focus state.
##### Directives:
diff --git a/packages/active-element/test/index.test.ts b/packages/active-element/test/index.test.ts
index 73a5566cc..de3e574ac 100644
--- a/packages/active-element/test/index.test.ts
+++ b/packages/active-element/test/index.test.ts
@@ -1,4 +1,3 @@
-import { fireEvent, createEvent } from "@solidjs/testing-library";
import { createRoot } from "solid-js";
import { describe, test, expect } from "vitest";
import {
@@ -9,8 +8,12 @@ import {
focus,
} from "../src/index.js";
-const dispatchFocusEvent = (target: Element | Window = window, event: "focus" | "blur" = "focus") =>
- fireEvent(target, createEvent(event, window));
+const dispatchFocusEvent = (
+ target: Element | Window = window,
+ event: "focus" | "blur" = "focus",
+) => {
+ target.dispatchEvent(new FocusEvent(event));
+};
describe("makeActiveElementListener", () => {
test("works properly", () =>
diff --git a/packages/audio/CHANGELOG.md b/packages/audio/CHANGELOG.md
index 84cdf61b4..efd2fac53 100644
--- a/packages/audio/CHANGELOG.md
+++ b/packages/audio/CHANGELOG.md
@@ -1,5 +1,13 @@
# @solid-primitives/audio
+## 1.3.18
+
+### Patch Changes
+
+- b993fff: Set "COMPLETE" state on "ended"
+
+ Improved ssr support by setting the initial duration and volume to zero for `createAudio` to match the server state.
+
## 1.3.17
### Patch Changes
diff --git a/packages/audio/dev/index.tsx b/packages/audio/dev/index.tsx
index 253a0a838..2b190a709 100644
--- a/packages/audio/dev/index.tsx
+++ b/packages/audio/dev/index.tsx
@@ -1,9 +1,67 @@
-import { Component, For, Show, createSignal } from "solid-js";
+import { Component, For, JSX, Show, createSignal, splitProps } from "solid-js";
import { createAudio, AudioState } from "../src/index.js";
-import { Icon } from "solid-heroicons";
-import { play, pause } from "solid-heroicons/solid";
-import { speakerWave } from "solid-heroicons/outline";
+// import { Icon } from "solid-heroicons";
+// import { play, pause } from "solid-heroicons/solid";
+// import { speakerWave } from "solid-heroicons/outline";
+
+type IconPath = { path: () => JSX.Element; outline?: boolean; mini?: boolean };
+type IconProps = JSX.SvgSVGAttributes & { path: IconPath };
+
+const Icon = (props: IconProps) => {
+ const [internal, external] = splitProps(props, ["path"]);
+ return (
+
+ );
+};
+
+const play: IconPath = {
+ path: () => (
+ <>
+
+ >
+ ),
+ outline: false,
+ mini: false,
+};
+const pause: IconPath = {
+ path: () => (
+ <>
+
+ >
+ ),
+ outline: false,
+ mini: false,
+};
+const speakerWave: IconPath = {
+ path: () => (
+ <>
+
+ >
+ ),
+ outline: true,
+ mini: false,
+};
const formatTime = (time: number) => new Date(time * 1000).toISOString().substr(14, 8);
@@ -12,6 +70,7 @@ const App: Component = () => {
const [playing, setPlaying] = createSignal(false);
const [volume, setVolume] = createSignal(1);
const [audio, { seek }] = createAudio(source, playing, volume);
+
return (
@@ -38,7 +97,7 @@ const App: Component = () => {
step="0.1"
max={audio.duration}
value={audio.currentTime}
- class="form-range w-40 cursor-pointer appearance-none rounded-3xl bg-gray-200 transition hover:bg-gray-300 focus:outline-none focus:ring-0 "
+ class="form-range w-40 cursor-pointer appearance-none rounded-3xl bg-gray-200 transition hover:bg-gray-300 focus:outline-none focus:ring-0"
/>
diff --git a/packages/audio/package.json b/packages/audio/package.json
index 308590745..4395cad7c 100644
--- a/packages/audio/package.json
+++ b/packages/audio/package.json
@@ -1,6 +1,6 @@
{
"name": "@solid-primitives/audio",
- "version": "1.3.17",
+ "version": "1.3.18",
"description": "Primitives to manage audio and single sounds.",
"author": "David Di Biase
",
"license": "MIT",
@@ -54,7 +54,6 @@
"primitives"
],
"devDependencies": {
- "solid-heroicons": "^3.2.4",
"solid-js": "^1.8.7"
},
"dependencies": {
diff --git a/packages/audio/src/index.ts b/packages/audio/src/index.ts
index 6bf07fb0f..e50759289 100644
--- a/packages/audio/src/index.ts
+++ b/packages/audio/src/index.ts
@@ -27,16 +27,18 @@ export type AudioEventHandlers = {
// Helper for producing the audio source
const unwrapSource = (src: AudioSource) => {
- let player: HTMLAudioElement;
if (src instanceof HTMLAudioElement) {
- player = src;
- } else {
- player = new Audio();
- player[typeof src === "string" ? "src" : "srcObject"] = src as string & MediaSource;
+ return src;
}
+ const player = new Audio();
+ setAudioSrc(player, src);
return player;
};
+function setAudioSrc(el: HTMLAudioElement, src: AudioSource) {
+ el[typeof src === "string" ? "src" : "srcObject"] = src as string & MediaSource;
+}
+
/**
* Generates a basic audio instance with limited functionality.
*
@@ -51,20 +53,21 @@ export const makeAudio = (
if (isServer) {
return {} as HTMLAudioElement;
}
+
const player = unwrapSource(src);
- const listeners = (enabled: boolean) => {
- Object.entries(handlers).forEach(([evt, handler]) =>
- player[enabled ? "addEventListener" : "removeEventListener"](
- evt,
- handler as EventListenerOrEventListenerObject,
- ),
- );
- };
- onMount(() => listeners(true));
+
+ onMount(() => {
+ for (const [name, handler] of Object.entries(handlers)) {
+ player.addEventListener(name, handler as any);
+ }
+ });
onCleanup(() => {
player.pause();
- listeners(false);
+ for (const [name, handler] of Object.entries(handlers)) {
+ player.removeEventListener(name, handler as any);
+ }
});
+
return player;
};
@@ -82,7 +85,7 @@ export const makeAudio = (
*
* @example
* ```ts
- * const { start, seek } = makeAudioPlayer('./example1.mp3);
+ * const { start, seek } = makeAudioPlayer('./example1.mp3');
* ```
*/
export const makeAudioPlayer = (
@@ -105,13 +108,16 @@ export const makeAudioPlayer = (
};
}
const player = makeAudio(src, handlers);
- const play = () => player.play();
- const pause = () => player.pause();
- const seek = (time: number) =>
+ return {
+ player,
+ play: () => player.play(),
+ pause: () => player.pause(),
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
- player.fastSeek ? player.fastSeek(time) : (player.currentTime = time);
- const setVolume = (volume: number) => (player.volume = volume);
- return { play, pause, seek, setVolume, player };
+ seek: player.fastSeek
+ ? (time: number) => player.fastSeek(time)
+ : (time: number) => (player.currentTime = time),
+ setVolume: (volume: number) => (player.volume = volume),
+ };
};
/**
@@ -177,19 +183,23 @@ export const createAudio = (
},
];
}
+
const player = unwrapSource(access(src));
+
const [store, setStore] = createStaticStore({
state: AudioState.LOADING,
player,
currentTime: 0,
- get duration() {
- return this.player.duration;
- },
- get volume() {
- return this.player.volume;
- },
+ duration: 0,
+ volume: 0,
});
- const { play, pause, setVolume, seek } = makeAudioPlayer(store.player, {
+
+ const {
+ play,
+ pause,
+ setVolume: _setVolume,
+ seek,
+ } = makeAudioPlayer(store.player, {
loadeddata: () => {
setStore({
state: AudioState.READY,
@@ -208,20 +218,27 @@ export const createAudio = (
playing: () => setStore("state", AudioState.PLAYING),
pause: () => setStore("state", AudioState.PAUSED),
error: () => setStore("state", AudioState.ERROR),
+ ended: () => setStore("state", AudioState.COMPLETE),
});
+
+ const setVolume = (volume: number) => {
+ setStore("volume", volume);
+ _setVolume(volume);
+ };
+
// Bind reactive properties as needed
if (src instanceof Function) {
createEffect(() => {
- const newSrc = access(src);
+ const newSrc = src();
if (newSrc instanceof HTMLAudioElement) {
- setStore("player", () => newSrc);
+ setStore("player", newSrc);
} else {
- store.player[typeof newSrc === "string" ? "src" : "srcObject"] = newSrc as string &
- MediaSource;
+ setAudioSrc(store.player, newSrc);
}
seek(0);
});
}
+
if (playing) {
createEffect(() => (playing() ? play() : pause()));
}
@@ -229,5 +246,6 @@ export const createAudio = (
createEffect(() => setVolume(volume()));
setVolume(volume());
}
+
return [store, { seek, play, pause, setVolume }];
};
diff --git a/packages/audio/test/index.test.ts b/packages/audio/test/index.test.ts
index 8d59685b3..c8e4fede9 100644
--- a/packages/audio/test/index.test.ts
+++ b/packages/audio/test/index.test.ts
@@ -1,7 +1,7 @@
import "./setup";
import { createRoot, createSignal } from "solid-js";
import { describe, expect, it } from "vitest";
-import { makeAudio, makeAudioPlayer, createAudio } from "../src/index.js";
+import { makeAudio, makeAudioPlayer, createAudio, AudioState } from "../src/index.js";
const testPath =
"https://github.com/solidjs-community/solid-primitives/blob/audio/packages/audio/dev/sample1.mp3?raw=true";
@@ -47,7 +47,7 @@ describe("makeAudioPlayer", () => {
}));
});
-describe("createAudioPlayer", () => {
+describe("createAudio", () => {
it("test srcObject value path", () =>
createRoot(dispose => {
const media = {} as MediaSource;
@@ -72,4 +72,14 @@ describe("createAudioPlayer", () => {
expect(audio.player.volume).toBe(0.5);
dispose();
}));
+
+ it("should set the COMPLETE state when audio ends", () => {
+ const [[audio], dispose] = createRoot(dispose => [createAudio({} as MediaSource), dispose]);
+ expect(audio.state).toBe(AudioState.LOADING);
+
+ audio.player.dispatchEvent(new Event("ended"));
+ expect(audio.state).toBe(AudioState.COMPLETE);
+
+ dispose();
+ });
});
diff --git a/packages/autofocus/README.md b/packages/autofocus/README.md
index e7375ac65..55e2bc9ec 100644
--- a/packages/autofocus/README.md
+++ b/packages/autofocus/README.md
@@ -14,7 +14,7 @@ Primitives for autofocusing HTML elements.
The native autofocus attribute only works on page load, which makes it incompatible with SolidJS. These primitives run on render, allowing autofocus on initial render as well as dynamically added components.
- [`autofocus`](#autofocus) - Directive to autofocus an element on render.
-- [`createAutofocus`](#createAutofocus) - Reactive primitive to autofocus an element on render.
+- [`createAutofocus`](#createautofocus) - Reactive primitive to autofocus an element on render.
## Installation
diff --git a/packages/bounds/CHANGELOG.md b/packages/bounds/CHANGELOG.md
index b781394b2..48d084152 100644
--- a/packages/bounds/CHANGELOG.md
+++ b/packages/bounds/CHANGELOG.md
@@ -1,5 +1,12 @@
# @solid-primitives/bounds
+## 0.0.122
+
+### Patch Changes
+
+- Updated dependencies [a7338e7]
+ - @solid-primitives/resize-observer@2.0.26
+
## 0.0.121
### Patch Changes
diff --git a/packages/bounds/README.md b/packages/bounds/README.md
index 1e878a75d..5254a5566 100644
--- a/packages/bounds/README.md
+++ b/packages/bounds/README.md
@@ -11,7 +11,7 @@
Primitives for tracking HTML element size and position on screen as it changes.
-- [`createElementBounds`](#createElementBounds) - Creates a reactive store-like object of current element bounds — position on the screen, and size dimensions.
+- [`createElementBounds`](#createelementbounds) - Creates a reactive store-like object of current element bounds — position on the screen, and size dimensions.
## Installation
diff --git a/packages/bounds/package.json b/packages/bounds/package.json
index c142bef8f..9228d440b 100644
--- a/packages/bounds/package.json
+++ b/packages/bounds/package.json
@@ -1,6 +1,6 @@
{
"name": "@solid-primitives/bounds",
- "version": "0.0.121",
+ "version": "0.0.122",
"description": "Primitives for tracking HTML element size and position on screen as it changes.",
"author": "Damian Tarnawski ",
"contributors": [],
diff --git a/packages/broadcast-channel/README.md b/packages/broadcast-channel/README.md
index 6f1c0061a..a0a0a3cf6 100644
--- a/packages/broadcast-channel/README.md
+++ b/packages/broadcast-channel/README.md
@@ -23,8 +23,8 @@ pnpm add @solid-primitives/broadcast-channel
## Available primitives
-- [`makeBroadcastChannel`](#makeBroadcastChannel)
-- [`createBroadcastChannel`](#createBroadcastChannel)
+- [`makeBroadcastChannel`](#makebroadcastchannel)
+- [`createBroadcastChannel`](#createbroadcastchannel)
### `makeBroadcastChannel`
@@ -97,7 +97,7 @@ const App = () => {
### `createBroadcastChannel`
-Provedes the same functionality as [`makeBroadcastChannel`](#makeBroadcastChannel) but instead of returning `onMessage` function, it returns a `message` signal accessor that updates when postMessage is fired from other contexts.
+Provedes the same functionality as [`makeBroadcastChannel`](#makebroadcastchannel) but instead of returning `onMessage` function, it returns a `message` signal accessor that updates when postMessage is fired from other contexts.
```ts
const { postMessage } = createBroadcastChannel("test_channel");
diff --git a/packages/broadcast-channel/dev/index.tsx b/packages/broadcast-channel/dev/index.tsx
index 6882ae44b..4ff11d0c6 100644
--- a/packages/broadcast-channel/dev/index.tsx
+++ b/packages/broadcast-channel/dev/index.tsx
@@ -50,7 +50,7 @@ const Content = (props: { page: TPage; channelName: string }) => {
BroadcastChannel name: {props.channelName}