Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unctx

Package Overview
Dependencies
Maintainers
2
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unctx - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

14

dist/index.d.ts

@@ -21,3 +21,3 @@ interface UseContext<T> {

*/
call: <R>(instance: T, cb: () => R) => R;
call: <R>(instance: T, callback: () => R) => R;
/**

@@ -27,3 +27,3 @@ * Exclude an asynchronous function with the provided context.

*/
callAsync: <R>(instance: T, cb: () => R | Promise<R>) => Promise<R>;
callAsync: <R>(instance: T, callback: () => R | Promise<R>) => Promise<R>;
}

@@ -34,4 +34,4 @@ declare function createContext<T = any>(): UseContext<T>;

}
declare function createNamespace(): {
get(key: any): UseContext<any>;
declare function createNamespace<T = any>(): {
get(key: any): UseContext<T>;
};

@@ -41,6 +41,6 @@ declare const defaultNamespace: ContextNamespace;

declare const useContext: <T>(key: string) => () => T;
declare type AsyncFn<T> = () => Promise<T>;
declare function executeAsync<T>(fn: AsyncFn<T>): [Promise<T>, () => void];
declare function withAsyncContext<T = any>(fn: AsyncFn<T>, transformed?: boolean): AsyncFn<T>;
declare type AsyncFunction<T> = () => Promise<T>;
declare function executeAsync<T>(function_: AsyncFunction<T>): [Promise<T>, () => void];
declare function withAsyncContext<T = any>(function_: AsyncFunction<T>, transformed?: boolean): AsyncFunction<T>;
export { ContextNamespace, UseContext, createContext, createNamespace, defaultNamespace, executeAsync, getContext, useContext, withAsyncContext };

@@ -8,4 +8,4 @@ import * as unplugin from 'unplugin';

}
declare const unctxPlugin: unplugin.UnpluginInstance<UnctxPluginOptions>;
declare const unctxPlugin: unplugin.UnpluginInstance<UnctxPluginOptions, false>;
export { UnctxPluginOptions, unctxPlugin };

@@ -20,3 +20,3 @@ import MagicString from 'magic-string';

declare function createTransformer(options?: TransformerOptions): {
transform: (code: string, opts?: {
transform: (code: string, options_?: {
force?: false;

@@ -23,0 +23,0 @@ }) => {

{
"name": "unctx",
"version": "2.0.2",
"version": "2.1.0",
"description": "Composition-api in Vanilla js",

@@ -38,22 +38,21 @@ "repository": "unjs/unctx",

"dependencies": {
"acorn": "^8.8.0",
"acorn": "^8.8.1",
"estree-walker": "^3.0.1",
"magic-string": "^0.26.2",
"unplugin": "^0.9.5"
"magic-string": "^0.26.7",
"unplugin": "^1.0.0"
},
"devDependencies": {
"@nuxtjs/eslint-config-typescript": "latest",
"@types/estree": "latest",
"@types/jest": "latest",
"@types/node": "latest",
"@vitest/coverage-c8": "^0.22.1",
"c8": "latest",
"eslint": "latest",
"jiti": "^1.14.0",
"standard-version": "latest",
"typescript": "latest",
"unbuild": "latest",
"vitest": "latest"
"@types/estree": "^1.0.0",
"@types/jest": "^29.2.2",
"@types/node": "^18.11.9",
"@vitest/coverage-c8": "^0.25.2",
"eslint": "^8.27.0",
"eslint-config-unjs": "^0.0.2",
"jiti": "^1.16.0",
"standard-version": "^9.5.0",
"typescript": "^4.8.4",
"unbuild": "^0.9.4",
"vitest": "^0.25.2"
},
"packageManager": "pnpm@7.9.5",
"packageManager": "pnpm@7.16.0",
"scripts": {

@@ -60,0 +59,0 @@ "build": "unbuild",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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