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

@adonisjs/redis

Package Overview
Dependencies
Maintainers
2
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@adonisjs/redis - npm Package Compare versions

Comparing version 2.0.7 to 3.0.0

build/adonis-typings/redis.d.ts

121

package.json
{
"name": "@adonisjs/redis",
"version": "2.0.7",
"description": "AdonisJs official redis provider to make working with redis fun and simple.",
"dependencies": {
"@adonisjs/generic-exceptions": "^2.0.1",
"debug": "^3.1.0",
"ioredis": "^3.2.2",
"lodash": "^4.17.10"
},
"devDependencies": {
"@adonisjs/fold": "^4.0.8",
"@adonisjs/sink": "^1.0.16",
"coveralls": "^3.0.1",
"cz-conventional-changelog": "^2.1.0",
"japa": "^1.0.6",
"japa-cli": "^1.0.1",
"nyc": "^12.0.1",
"semver": "^5.5.0",
"standard": "^11.0.1"
},
"version": "3.0.0",
"description": "AdonisJs addon for Redis",
"main": "build/index.js",
"files": [
"build/src",
"build/adonis-typings",
"build/providers"
],
"types": "build/adonis-typings/index.d.ts",
"scripts": {
"lint": "standard",
"mrm": "mrm --preset=@adonisjs/mrm-preset",
"pretest": "npm run lint",
"posttest": "npm run coverage",
"test:local": "FORCE_COLOR=true node bin/index.js --local",
"test": "nyc npm run test:local",
"test:win": "set FORCE_COLOR=true && node bin/index.js --win",
"coverage": "nyc report --reporter=text-lcov | coveralls"
"test": "docker-compose build && docker-compose run --rm tests",
"lint": "tslint --project tsconfig.json",
"clean": "del build",
"compile": "npm run lint && npm run clean && tsc",
"build": "npm run compile",
"commit": "git-cz",
"release": "np",
"version": "npm run build"
},
"standard": {
"globals": [
"use",
"make"
]
},
"author": "virk",
"license": "MIT",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"nyc": {
"exclude": [
"bin"
]
},
"directories": {
"test": "test"
},
"repository": {

@@ -58,11 +30,60 @@ "type": "git",

"redis",
"adonisjs",
"adonis",
"adonis-redis",
"ioredis"
],
"author": "virk,adonisjs",
"license": "MIT",
"bugs": {
"url": "https://github.com/adonisjs/adonis-redis/issues"
},
"homepage": "https://github.com/adonisjs/adonis-redis#readme"
"homepage": "https://github.com/adonisjs/adonis-redis#readme",
"publishConfig": {
"access": "public",
"tag": "next"
},
"devDependencies": {
"@adonisjs/fold": "^6.0.3",
"@adonisjs/mrm-preset": "^2.0.3",
"@types/node": "^12.0.10",
"commitizen": "^3.1.1",
"cz-conventional-changelog": "^2.1.0",
"del-cli": "^2.0.0",
"doctoc": "^1.4.0",
"husky": "^2.5.0",
"japa": "^2.0.10",
"mrm": "^1.2.2",
"np": "^5.0.3",
"ts-node": "^8.3.0",
"tslint": "^5.18.0",
"tslint-eslint-rules": "^5.4.0",
"typescript": "^3.5.2"
},
"nyc": {
"exclude": [
"test"
],
"extension": [
".ts"
]
},
"husky": {
"hooks": {
"pre-commit": "doctoc README.md --title='## Table of contents' && git add README.md",
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js"
}
},
"config": {
"commitizen": {
"path": "cz-conventional-changelog"
}
},
"np": {
"contents": ".",
"anyBranch": false
},
"dependencies": {
"@poppinss/utils": "^1.0.3",
"@types/ioredis": "^4.0.12",
"emittery": "^0.4.1",
"ioredis": "^4.10.0"
}
}

@@ -1,85 +0,47 @@

# AdonisJs Redis 🚀
> Provider to run redis commands from your Adonis app
<div align="center">
<img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1558612869/adonis-readme_zscycu.jpg" width="600px">
</div>
[![NPM Version][npm-image]][npm-url]
[![Build Status][travis-image]][travis-url]
[![Appveyor][appveyor-image]][appveyor-url]
[![Coveralls][coveralls-image]][coveralls-url]
# Adonis Redis
> Redis provider for AdonisJs with support for multiple redis connections, cluster, pub/sub and much more.
Adonis redis is a wrapper on top of [IoRedis](https://github.com/luin/ioredis) to run redis commands from your Adonisjs app.
[![circleci-image]][circleci-url] [![npm-image]][npm-url] ![][typescript-image] [![license-image]][license-url]
<img src="http://res.cloudinary.com/adonisjs/image/upload/q_100/v1497112678/adonis-purple_pzkmzt.svg" width="200px" align="right" hspace="30px" vspace="100px">
This is a first party addon to add support for using Redis server with AdonisJs. In a nutshell:
## Features
1. It allows having multiple redis connections by defining them inside `start/redis(.js|.ts)` file.
2. Eases the API for pub/sub.
3. Support for cluster and sentinel.
1. Support for cluser.
2. Run redis commands using `async/await` syntax.
3. Intutive pub/sub API.
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of contents
- [Testing](#testing)
- [Maintainers](#maintainers)
## Node/OS Target
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
This repo/branch is supposed to run fine on all major OS platforms and targets `Node.js >=7.0`
## Testing
The tests are executed inside a Docker container, since setting up a redis cluster can be painful. Just make sure to have the Docker client running on your OS.
## Development
Run the following commands to build and run tests.
Great! If you are planning to contribute to the framework, make sure to adhere to following conventions, since a consistent code-base is always joy to work with.
Run the following command to see list of available npm scripts.
```sh
docker-compose build
docker-compose run --rm tests
```
npm run
```
### Tests & Linting
## Maintainers
[Harminder virk](https://github.com/thetutlage)
1. Lint your code using standardJs. Run `npm run lint` command to check if there are any linting errors.
2. Make sure you write tests for all the changes/bug fixes.
3. Also you can write **regression tests**, which shows that something is failing but doesn't breaks the build. Which is actually a nice way to show that something fails. Regression tests are written using `test.failing()` method.
4. Make sure all the tests are passing on `travis` and `appveyor`.
[circleci-image]: https://img.shields.io/circleci/project/github/adonisjs/adonis-redis/master.svg?style=for-the-badge&logo=appveyor
[circleci-url]: https://circleci.com/gh/adonisjs/adonis-redis "circleci"
### General Practices
[npm-image]: https://img.shields.io/npm/v/@adonisjs/redis.svg?style=for-the-badge&logo=npm
[npm-url]: https://npmjs.org/package/@adonisjs/redis "npm"
Since Es6 is in, you should strive to use latest features. For example:
[typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
1. Use `Spread` over `arguments` keyword.
2. Never use `bind` or `call`. After calling these methods, we cannot guarantee the scope of any methods and in AdonisJs codebase we do not override the methods scope.
3. Make sure to write proper docblock.
## Issues & PR
It is always helpful if we try to follow certain practices when creating issues or PR's, since it will save everyone's time.
1. Always try creating regression tests when you find a bug (if possible).
2. Share some context on what you are trying to do, with enough code to reproduce the issue.
3. For general questions, please create a forum thread.
4. When creating a PR for a feature, make sure to create a parallel PR for docs too.
## Regression Tests
Regression tests are tests, which shows how a piece of code fails under certain circumstance, but the beauty is even after the failure, the test suite will never fail. Actually is a nice way to notify about bugs, but making sure everything is green.
The regression tests are created using
```
test.failing('2 + 2 is always 4, but add method returns 6', (assert) => {
assert.true(add(2, 2), 4)
})
```
Now since the `add` method has a bug, it will return `6` instead of `4`. But the build will pass.
[appveyor-image]: https://img.shields.io/appveyor/ci/thetutlage/adonis-redis/master.svg?style=flat-square
[appveyor-url]: https://ci.appveyor.com/project/thetutlage/adonis-redis
[npm-image]: https://img.shields.io/npm/v/@adonisjs/redis.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@adonisjs/redis
[travis-image]: https://img.shields.io/travis/adonisjs/adonis-redis/master.svg?style=flat-square
[travis-url]: https://travis-ci.org/adonisjs/adonis-redis
[coveralls-image]: https://img.shields.io/coveralls/adonisjs/adonis-redis/develop.svg?style=flat-square
[coveralls-url]: https://coveralls.io/github/adonisjs/adonis-redis
[license-url]: LICENSE.md
[license-image]: https://img.shields.io/aur/license/pac.svg?style=for-the-badge
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