Comparing version 5.0.0 to 5.0.1
{ | ||
"name": "keyv", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "Simple key-value storage with support for multiple backends", | ||
"main": "dist/cjs/index.js", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/esm/index.d.ts", | ||
"type": "module", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/cjs/index.js", | ||
"import": "./dist/esm/index.js" | ||
"require": "./dist/index.cjs", | ||
"import": "./dist/index.js" | ||
} | ||
}, | ||
"scripts": { | ||
"build": "rm -rf dist && tsc --project tsconfig.cjs.json && tsc --project tsconfig.esm.json", | ||
"build": "rm -rf dist && tsup src/index.ts --format cjs,esm --dts --clean", | ||
"prepare": "yarn build", | ||
@@ -23,2 +24,3 @@ "test": "xo --fix && vitest run --coverage", | ||
"rules": { | ||
"import/no-named-as-default": "off", | ||
"unicorn/prefer-module": "off", | ||
@@ -25,0 +27,0 @@ "unicorn/prefer-node-protocol": "off", |
@@ -153,7 +153,7 @@ [<img width="100" align="right" src="https://jaredwray.com/images/keyv-symbol.svg" alt="keyv">](https://github.com/jaredwra/keyv) | ||
const keyv = new Keyv(); | ||
keyv.hooks.addListener(KeyvHooks.PRE_SET, (key, value) => console.log(`Setting key ${key} to ${value}`)); | ||
keyv.hooks.addHandler(KeyvHooks.PRE_SET, (key, value) => console.log(`Setting key ${key} to ${value}`)); | ||
//POST_SET hook | ||
const keyv = new Keyv(); | ||
keyv.hooks.addListener(KeyvHooks.POST_SET, (key, value) => console.log(`Set key ${key} to ${value}`)); | ||
keyv.hooks.addHandler(KeyvHooks.POST_SET, (key, value) => console.log(`Set key ${key} to ${value}`)); | ||
``` | ||
@@ -165,3 +165,3 @@ | ||
const keyv = new Keyv(); | ||
keyv.hooks.addListener(KeyvHooks.PRE_SET, (key, value) => { | ||
keyv.hooks.addHandler(KeyvHooks.PRE_SET, (key, value) => { | ||
console.log(`Setting key ${key} to ${value}`); | ||
@@ -168,0 +168,0 @@ key = `prefix-${key}`; |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
Yes
55992
7
1006
1