New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@raythurnevoid/svelte-context-enhanced

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@raythurnevoid/svelte-context-enhanced - npm Package Compare versions

Comparing version 1.0.4 to 2.0.0

8

index.d.ts

@@ -1,4 +0,4 @@

export { createContextStore, createContextWritableStore, createContextDerivedStore, } from "./store.js";
export { createContext } from "./basic.js";
export { setContext, getContext } from "./svelte-typed-context.js";
export type { ContextKey } from "./svelte-typed-context.js";
import type { ContextKey } from './svelte-typed-context.js';
export declare function createContext<T>(key?: ContextKey<T>): readonly [(context: T) => T, () => T | undefined];
export { setContext, getContext } from './svelte-typed-context.js';
export type { ContextKey } from './svelte-typed-context.js';

@@ -1,3 +0,12 @@

export { createContextStore, createContextWritableStore, createContextDerivedStore, } from "./store.js";
export { createContext } from "./basic.js";
export { setContext, getContext } from "./svelte-typed-context.js";
import { getContext, setContext } from './svelte-typed-context.js';
export function createContext(key = {}) {
function setContextValue(context) {
setContext(key, context);
return context;
}
function getContextValue() {
return getContext(key);
}
return [setContextValue, getContextValue];
}
export { setContext, getContext } from './svelte-typed-context.js';
{
"name": "@raythurnevoid/svelte-context-enhanced",
"version": "1.0.4",
"description": "",
"version": "2.0.0",
"description": "Enhances Svelte's Context API with TypeScript type checking for a more robust development experience.",
"scripts": {
"clean-lib": "del-cli lib/*",
"copy:package:cjs": "copyfiles --up 1 cjs/* lib/cjs",
"copy:package": "copyfiles package.json lib",
"copy:src": "copyfiles --up 2 src/lib/**/* lib/src",
"copy:cjs": "copyfiles --up 2 \"src/lib/**/*.!(ts|test)\" lib/cjs",
"copy": "copyfiles --up 2 \"src/lib/**/*.!(ts|test)\" lib",
"tsc": "tsc -p tsconfig.lib.json",
"tsc:cjs": "tsc -p tsconfig.lib.cjs.json",
"build": "npm-run-all --parallel copy:package copy:package:cjs copy copy:cjs copy:src tsc tsc:cjs",
"lib": "npm run clean-lib && npm run build",
"dev": "npm run clean-lib && nodemon --watch src -e ts --exec \"npm run build\"",
"package": "npm run lib && npm publish ./lib",
"test": "echo \"Error: no test specified\" && exit 1"
"dev": "vite dev",
"dev:inspect": "node --inspect-brk ./node_modules/vite/bin/vite.js",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"package": "svelte-kit sync && svelte-package --input src/lib/package && copyfiles ./package.json dist && publint ./dist",
"lint": "prettier --plugin-search-dir . --check .",
"format": "prettier --plugin-search-dir . --write ."
},

@@ -23,11 +19,24 @@ "type": "module",

".": {
"import": "./index.js",
"require": "./cjs/index.js"
},
"./package.json": "./package.json",
"./cjs/*": "./cjs/*"
"types": "./index.d.ts",
"import": "./index.js"
}
},
"browserslist": [
"> 5%"
"files": [
"./*"
],
"publishConfig": {
"access": "public"
},
"workspaces": [
"./websitev2"
],
"keywords": [
"svelte",
"svelte context",
"typescript",
"library",
"type checking",
"typing",
"type"
],
"repository": {

@@ -37,9 +46,29 @@ "type": "git",

},
"bugs": {
"url": "https://github.com/raythurnevoid/svelte-group-components/issues"
},
"author": "Ray Thurne",
"license": "ISC",
"peerDependencies": {
"svelte": "^3.56.0"
},
"devDependencies": {
"@raythurnevoid/svelte-template": "^0.3.8",
"nodemon": "^2.0.15"
"@sveltejs/kit": "^1.15.0",
"@sveltejs/package": "^2.0.2",
"@types/node": "^18.15.11",
"copyfiles": "^2.4.1",
"prettier": "^2.8.7",
"prettier-plugin-svelte": "^2.10.0",
"svelte-check": "^3.1.4",
"tslib": "^2.5.0",
"typescript": "^5.0.3",
"vite": "^4.2.1",
"vite-node": "^0.29.8",
"vite-plugin-dts": "^2.1.0",
"cross-env": "^7.0.3",
"publint": "^0.1.11"
},
"dependencies": {
"svelte": "^3.47.0"
"svelte": "^3.58.0"
}
}

@@ -9,6 +9,6 @@ /**

}
declare type getContext = <T>(key: ContextKey<T>) => undefined | T;
declare type setContext = <T>(key: ContextKey<T>, context: T) => void;
type getContext = <T>(key: ContextKey<T>) => undefined | T;
type setContext = <T>(key: ContextKey<T>, context: T) => void;
export declare const getContext: getContext;
export declare const setContext: setContext;
export {};

@@ -0,0 +0,0 @@ /**

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc