@solid-primitives/rootless
Advanced tools
Comparing version 1.3.0 to 1.3.1
import { getOwner, createRoot, runWithOwner, onCleanup, sharedConfig } from 'solid-js'; | ||
import { isServer } from 'solid-js/web'; | ||
import { asArray, access } from '@solid-primitives/utils'; | ||
@@ -46,5 +47,5 @@ | ||
const singleton = createSingletonRoot(factory, owner); | ||
return () => sharedConfig.context ? createRoot(factory, owner) : singleton(); | ||
return () => isServer || sharedConfig.context ? createRoot(factory, owner) : singleton(); | ||
} | ||
export { createBranch, createCallback, createDisposable, createHydratableSingletonRoot, createSharedRoot, createSingletonRoot, createSubRoot }; |
{ | ||
"name": "@solid-primitives/rootless", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "A collection of helpers that aim to simplify using reactive primitives outside of reactive roots, and managing disposal of reactive roots.", | ||
@@ -29,38 +29,7 @@ "author": "Damian Tarnawski @thetarnav <gthetarnav@gmail.com>", | ||
"type": "module", | ||
"main": "./dist/server.cjs", | ||
"module": "./dist/server.js", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"browser": { | ||
"./dist/server.js": "./dist/index.js", | ||
"./dist/server.cjs": "./dist/index.cjs" | ||
}, | ||
"browser": {}, | ||
"exports": { | ||
"worker": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"browser": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": "./dist/index.cjs" | ||
}, | ||
"deno": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"node": { | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/server.js" | ||
}, | ||
"require": "./dist/server.cjs" | ||
}, | ||
"import": { | ||
@@ -78,10 +47,10 @@ "types": "./dist/index.d.ts", | ||
"dependencies": { | ||
"@solid-primitives/utils": "^5.5.0" | ||
"@solid-primitives/utils": "^5.5.1" | ||
}, | ||
"peerDependencies": { | ||
"solid-js": "^1.6.11" | ||
"solid-js": "^1.6.12" | ||
}, | ||
"typesVersions": {}, | ||
"scripts": { | ||
"build": "jiti ../../scripts/build.ts --ssr", | ||
"build": "jiti ../../scripts/build.ts", | ||
"test": "vitest -c ../../configs/vitest.config.ts", | ||
@@ -88,0 +57,0 @@ "test:ssr": "pnpm run test --mode ssr" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16147
6
187