@axah/cache
Advanced tools
Comparing version 3.1.1 to 4.0.0
import { createClient } from 'redis'; | ||
import type { Backend } from './types'; | ||
export declare type Options = Parameters<typeof createClient>[0] & { | ||
export type Options = Parameters<typeof createClient>[0] & { | ||
passwordFile?: string | null; | ||
}; | ||
export default function createBackend(opts: Options): Promise<Backend>; |
@@ -1,2 +0,2 @@ | ||
export declare type Backend = { | ||
export type Backend = { | ||
get(key: string): Promise<any>; | ||
@@ -3,0 +3,0 @@ set<T>(key: string, value: T, ttl: number): Promise<T>; |
import type { Logger } from 'pino'; | ||
import type { Backend } from './backend/types'; | ||
import { type Options as RedisCacheOptions } from './backend/redis'; | ||
declare type CacheOptions = { | ||
type CacheOptions = { | ||
type: 'memory'; | ||
@@ -6,0 +6,0 @@ name: string; |
{ | ||
"name": "@axah/cache", | ||
"version": "3.1.1", | ||
"version": "4.0.0", | ||
"description": "Provides a cache either backed by RAM or redis", | ||
@@ -10,40 +10,32 @@ "main": "lib/index.js", | ||
], | ||
"scripts": { | ||
"dev": "ts-node-dev --respawn src/index.ts", | ||
"lint": " tsc --noEmit && eslint .", | ||
"prepublishOnly": "yarn build", | ||
"build": "yarn lint && yarn test && yarn clean && yarn build:typescript", | ||
"build-with-lcov": "yarn lint && yarn test --coverage --coverageReporters lcov && yarn clean && yarn build:typescript", | ||
"clean": "rimraf lib", | ||
"build:typescript": "tsc --build tsconfig.build.json", | ||
"test": "jest", | ||
"ci": "yarn build" | ||
}, | ||
"devDependencies": { | ||
"@axah/log": "^1.0.2", | ||
"@types/jest": "^27.4.0", | ||
"@types/pino": "^6.3.12", | ||
"@typescript-eslint/eslint-plugin": "^5.10.1", | ||
"@typescript-eslint/parser": "^5.10.1", | ||
"eslint": "^8.7.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^8.3.0", | ||
"eslint-plugin-import": "^2.25.4", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^27.4.7", | ||
"npm-run-all": "^4.1.5", | ||
"pino": "^7.11.0", | ||
"pino-pretty": "^5.0.0", | ||
"prettier": "^2.5.1", | ||
"ts-jest": "^27.1.3", | ||
"ts-node-dev": "^1.1.8", | ||
"typescript": "^4.5.5" | ||
"@axah/eslint-config": "^2.0.0", | ||
"@axah/tsconfig": "^1.0.3", | ||
"@changesets/cli": "^2.26.0", | ||
"@types/jest": "^29.2.4", | ||
"@types/node": "^18.11.17", | ||
"eslint": "^8.30.0", | ||
"jest": "^29.3.1", | ||
"node-dev": "^7.4.3", | ||
"pino": "^8.8.0", | ||
"prettier": "^2.8.1", | ||
"rimraf": "^3.0.2", | ||
"ts-jest": "^29.0.3", | ||
"ts-node": "^10.9.1", | ||
"typescript": "^4.9.4" | ||
}, | ||
"peerDependencies": { | ||
"@axah/log": "^1.0.2", | ||
"pino": "^7.x" | ||
"pino": "^8.x" | ||
}, | ||
"dependencies": { | ||
"redis": "^4.0.2" | ||
"redis": "^4.5.1" | ||
}, | ||
"scripts": { | ||
"dev": "node-dev --respawn src/index.ts", | ||
"release": "pnpm build && pnpm changeset publish", | ||
"lint": " tsc --noEmit && eslint .", | ||
"build": "pnpm clean && pnpm lint && pnpm test && tsc --build tsconfig.build.json", | ||
"clean": "rimraf lib", | ||
"test": "jest" | ||
} | ||
} | ||
} |
@@ -10,13 +10,3 @@ # @axah/cache | ||
```sh | ||
yarn add @axah/cache | ||
pnpm add @axah/cache | ||
``` | ||
## Installing a PR build | ||
When a PR is still open and you want to give it a try you can use a build created by Pika CI. Head to the `Checks` tab of your PR and select the `Pika CI` action where you find instructions on how to install the package built out of this PR. | ||
## Creating a release | ||
Create a release on github and name the tag in the format `vMAJOR.MINOR.PATCH` and the github action in `.github/workflows/publish.yml` will take care of publishing the package to npm. | ||
**Note:** As this technique currently updates the npm dist-tag `latest` to whatever release you create you should either not use this technique to cut a prerelease (i.e. using pattern `vMAJOR.MINOR.PATCH-PRERELEASE.NUMBER`) or a patch/minor version of an old major/minor OR fix the npm dist-tag afterwards using `npm dist-tag @axah/cache@<latest version> latest` |
2
14
12195
12
+ Addedabort-controller@3.0.0(transitive)
+ Addedbase64-js@1.5.1(transitive)
+ Addedbuffer@6.0.3(transitive)
+ Addedevent-target-shim@5.0.1(transitive)
+ Addedevents@3.3.0(transitive)
+ Addedieee754@1.2.1(transitive)
+ Addedon-exit-leak-free@2.1.2(transitive)
+ Addedpino@8.21.0(transitive)
+ Addedpino-abstract-transport@1.2.0(transitive)
+ Addedpino-std-serializers@6.2.2(transitive)
+ Addedprocess@0.11.10(transitive)
+ Addedprocess-warning@3.0.0(transitive)
+ Addedreadable-stream@4.7.0(transitive)
+ Addedreal-require@0.2.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsonic-boom@3.8.1(transitive)
+ Addedsplit2@4.2.0(transitive)
+ Addedstring_decoder@1.3.0(transitive)
+ Addedthread-stream@2.7.0(transitive)
- Removed@axah/log@1.1.1(transitive)
- Removedasync-hook-jl@1.7.6(transitive)
- Removedcls-hooked@4.2.2(transitive)
- Removedemitter-listener@1.1.2(transitive)
- Removedfast-safe-stringify@2.1.1(transitive)
- Removedflatstr@1.0.12(transitive)
- Removedon-exit-leak-free@0.2.0(transitive)
- Removedpino@6.14.07.11.0(transitive)
- Removedpino-std-serializers@3.2.04.0.0(transitive)
- Removedprocess-warning@1.0.0(transitive)
- Removedreal-require@0.1.0(transitive)
- Removedsemver@5.7.2(transitive)
- Removedshimmer@1.2.1(transitive)
- Removedsonic-boom@1.4.12.8.0(transitive)
- Removedstack-chain@1.3.7(transitive)
- Removedthread-stream@0.15.2(transitive)
Updatedredis@^4.5.1