Skip to content

Commit

Permalink
peer deps & publish
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Dec 25, 2023
1 parent 17362cc commit 6d43558
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Package to NPM

on:
release:
types: [published]

jobs:
publish:
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
with:
node-version: "20"
registry-url: "https://registry.npmjs.org"

- run: yarn
- run: yarn build
- uses: JS-DevTools/npm-publish@v3
id: publish
with:
token: ${{ secrets.NPM_TOKEN }}

- if: ${{ steps.publish.outputs.type }}
run: echo "$PCKG_ID published to $PCKG_TAG, old version was [$OLD_VER]"
env:
OLD_VER: ${{ steps.publish.outputs.old-version }}
PCKG_ID: ${{ steps.publish.outputs.id }}
PCKG_TAG: ${{ steps.publish.outputs.tag }}
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "warp-contracts-redis",
"version": "0.3.4",
"version": "0.4.0",
"description": "Redis implementation for Warp Contracts",
"types": "./lib/types/index.d.ts",
"main": "./lib/cjs/index.js",
Expand Down Expand Up @@ -51,9 +51,11 @@
"LICENSE"
],
"dependencies": {
"ioredis": "^5.3.2",
"safe-stable-stringify": "^2.4.3",
"warp-contracts": "^1.4.2"
"safe-stable-stringify": "^2.4.3"
},
"peerDependencies": {
"warp-contracts": "^1.4.2",
"ioredis": "^5.3.2"
},
"devDependencies": {
"@types/jest": "^28.1.6",
Expand Down
7 changes: 4 additions & 3 deletions src/redisCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import stringify from "safe-stable-stringify";
import { luaScripts } from "./luaScripts";
import type { RedisOptions } from "./types/redisCache";

/** A deleted value placeholder is to differentiate a `null` result that
* may belong to a deleted key or a non-existent key. This is required due to
* SortKeyCache logic.
/**
* A deleted value placeholder is to differentiate a `null` result
* that may belong to a deleted key or a non-existent key.
* This is required due to SortKeyCache logic.
*/
const DELETED_VALUE_PLACEHOLDER = "";

Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"outDir": "./lib/cjs",
"isolatedModules": false,
"esModuleInterop": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true,
"baseUrl": "./src",
Expand Down

0 comments on commit 6d43558

Please sign in to comment.