Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ninesunsabiu/redux-saga-cache-channel-helper
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: ninesunsabiu/redux-saga-cache-channel-helper
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 3 commits
  • 5 files changed
  • 1 contributor

Commits on May 25, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    af2e215 View commit details
  2. chore: tsconfig and .npm

    ninesunsabiu committed May 25, 2021
    Copy the full SHA
    028d4b8 View commit details
  3. update: publish v0.1.1

    fix Cannot find module 'channel' error
    ninesunsabiu committed May 25, 2021
    Copy the full SHA
    be1d616 View commit details
Showing with 14 additions and 6 deletions.
  1. +3 −1 .npmignore
  2. +2 −2 package.json
  3. +1 −1 src/channel.ts
  4. +2 −2 src/index.ts
  5. +6 −0 tsconfig.json
4 changes: 3 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.github/
src/__tests__/**
src/__tests__/**
src/
tsconfig.json
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "redux-saga-take-cache",
"version": "0.1.0",
"version": "0.1.1",
"description": "redux-saga cache channel helper",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -26,7 +26,7 @@
"typescript": "^4.2.4"
},
"peerDependencies": {
"redux-saga": "1.1.1"
"redux-saga": "*"
},
"dependencies": {
"@babel/runtime": "^7.14.0"
2 changes: 1 addition & 1 deletion src/channel.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Action } from 'redux';
import type { Channel } from 'redux-saga';
import type { CacheFn } from 'types';
import { channel } from 'redux-saga';
import type { CacheFn } from './types';

type CacheKey = string;
type ExpirationTime = number;
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { ForkEffect, HelperWorkerParameters } from 'redux-saga/effects';
import type { CacheFn } from 'types';
import type { ActionPattern, Channel, ActionMatchingPattern } from '@redux-saga/types';
import type { Action, AnyAction } from 'redux';
import { call, fork, put, takeEvery } from 'redux-saga/effects';
import createCacheChannel from 'channel';
import type { CacheFn } from './types';
import createCacheChannel from './channel';

export function takeCache<P extends ActionPattern>(
cache: CacheFn,
6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -9,5 +9,11 @@
"noUncheckedIndexedAccess": true,
"allowSyntheticDefaultImports": true,
"importsNotUsedAsValues": "error",
"baseUrl": "./src",
"paths": {
"@/*": [
"./*"
]
}
}
}