From f212a56924875b2d5246e10d206c08ed64f15b28 Mon Sep 17 00:00:00 2001 From: Aditya Raj Singh Date: Mon, 30 Jan 2023 15:54:30 +0530 Subject: [PATCH 1/2] branding-changes --- .travis.yml | 1 + InstanceComposer.js | 4 ++-- README.md | 8 ++++---- config/cache.js | 2 +- index.js | 4 ++-- lib/existingInstance.js | 2 +- lib/formatter/response.js | 2 +- lib/implementer/InMemory.js | 2 +- lib/implementer/Memcached.js | 2 +- lib/implementer/Redis.js | 2 +- lib/logger/customConsoleLogger.js | 2 +- package.json | 4 ++-- services/CacheInstance.js | 2 +- 13 files changed, 19 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5150ba5..1a1c254 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,6 +9,7 @@ branches: notifications: email: recipients: + # Todo: change this - kedar@plgworks.com on_success: always on_failure: always diff --git a/InstanceComposer.js b/InstanceComposer.js index fce4e1f..28f2dd5 100644 --- a/InstanceComposer.js +++ b/InstanceComposer.js @@ -1,9 +1,9 @@ /** - * Instance Composer from @plgworks/base + * Instance Composer from @TrueSparrowSystems/base * * @module instance_composer */ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); module.exports = Base.InstanceComposer; diff --git a/README.md b/README.md index a326747..15769d3 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ ![UniCache logo Dark](https://user-images.githubusercontent.com/7627517/195535780-47906a3b-c302-4c59-bb1e-d171914ff1bd.png) -[![Latest version](https://img.shields.io/npm/v/@plgworks/unicache.svg?maxAge=3600)][npm] +[![Latest version](https://img.shields.io/npm/v/@truesparrow/unicache.svg?maxAge=3600)][npm] -[npm]: https://www.npmjs.com/package/@plgworks/unicache +[npm]: https://www.npmjs.com/package/@truesparrow/unicache UniCache is an open-source NPM package that provides unified / singleton interface and behavior for [Memcached](https://memcached.org/), [Redis](https://redis.io/docs/) and In-memory caching. Easily interact or switch between them in minutes! @@ -29,7 +29,7 @@ Follow the installation guides to get the caching engines of your choice, up and ## Install NPM ```shell script -npm install @plgworks/unicache --save +npm install @truesparrow/unicache --save ``` ## Initialize @@ -39,7 +39,7 @@ Example snippet for the UniCache singleton object initialization is given below. ```js // Include the following snippet in a separate file, which can be required all accross the code to get unicache instance. // If using different caching engines simultaneously in a single codebase, have different files for each. -const UniCache = require('@plgworks/unicache'); +const UniCache = require('@truesparrow/unicache'); const configStrategy = { engine: "none/redis/memcached", diff --git a/config/cache.js b/config/cache.js index a2174d0..328fbd7 100644 --- a/config/cache.js +++ b/config/cache.js @@ -1,4 +1,4 @@ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); const rootPrefix = '..', coreConstants = require(rootPrefix + '/config/coreConstant'); diff --git a/index.js b/index.js index 228bbe5..df79aec 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ /** - * Index File for @plgworks/cache + * Index File for @TrueSparrowSystems/cache */ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); const rootPrefix = '.', version = require(rootPrefix + '/package.json').version, diff --git a/lib/existingInstance.js b/lib/existingInstance.js index 65e8180..3917391 100644 --- a/lib/existingInstance.js +++ b/lib/existingInstance.js @@ -1,3 +1,3 @@ -// This is to share the instance map between multiple @plgworks/cache objects. +// This is to share the instance map between multiple @TrueSparrowSystems/cache objects. module.exports = {}; diff --git a/lib/formatter/response.js b/lib/formatter/response.js index c7cbd5c..7aedf03 100644 --- a/lib/formatter/response.js +++ b/lib/formatter/response.js @@ -1,4 +1,4 @@ -const Base = require('@plgworks/base'), +const Base = require('@TrueSparrowSystems/base'), responseHelper = new Base.responseHelper({ moduleName: 'CustomCache' }); module.exports = responseHelper; diff --git a/lib/implementer/InMemory.js b/lib/implementer/InMemory.js index f301683..6f98a75 100644 --- a/lib/implementer/InMemory.js +++ b/lib/implementer/InMemory.js @@ -6,7 +6,7 @@ * @module lib/implementer/InMemory */ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); const rootPrefix = '../..', cacheHelper = require(rootPrefix + '/lib/helper'), diff --git a/lib/implementer/Memcached.js b/lib/implementer/Memcached.js index 493bfcd..a19fdbc 100644 --- a/lib/implementer/Memcached.js +++ b/lib/implementer/Memcached.js @@ -5,7 +5,7 @@ */ const Memcached = require('memcached'), - Base = require('@plgworks/base'); + Base = require('@TrueSparrowSystems/base'); const rootPrefix = '../..', cacheHelper = require(rootPrefix + '/lib/helper'), diff --git a/lib/implementer/Redis.js b/lib/implementer/Redis.js index defbf74..0ef7cb8 100644 --- a/lib/implementer/Redis.js +++ b/lib/implementer/Redis.js @@ -5,7 +5,7 @@ * @module lib/implementer/Redis */ -const Base = require('@plgworks/base'), +const Base = require('@TrueSparrowSystems/base'), redis = require('redis'); const rootPrefix = '../..', diff --git a/lib/logger/customConsoleLogger.js b/lib/logger/customConsoleLogger.js index 75787f7..48f72be 100644 --- a/lib/logger/customConsoleLogger.js +++ b/lib/logger/customConsoleLogger.js @@ -1,4 +1,4 @@ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); const rootPrefix = '../..', coreConstants = require(rootPrefix + '/config/coreConstant'); diff --git a/package.json b/package.json index 63efe45..fc28bb1 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "@plgworks/unicache", + "name": "@TrueSparrowSystems/unicache", "version": "1.0.0", "description": "UniCache is an NPM package that provides singleton interface and behavior for Memcached, Redis and In-memory caching. Easily interact or switch between them in minutes!", "main": "index.js", @@ -30,7 +30,7 @@ "dependencies": { "memcached": "2.2.2", "redis": "3.1.1", - "@plgworks/base": "^1.0.0" + "@TrueSparrowSystems/base": "^1.0.0" }, "devDependencies": { "chai": "4.3.0", diff --git a/services/CacheInstance.js b/services/CacheInstance.js index b8bda7f..906651b 100644 --- a/services/CacheInstance.js +++ b/services/CacheInstance.js @@ -10,7 +10,7 @@ * @module services/CacheInstance */ -const Base = require('@plgworks/base'); +const Base = require('@TrueSparrowSystems/base'); const rootPrefix = '..', coreConstants = require(rootPrefix + '/config/coreConstant'), From a5d05c84f5ad9b2f606bb3f46b6dc02409da6a2c Mon Sep 17 00:00:00 2001 From: Aditya Raj Singh Date: Mon, 30 Jan 2023 16:38:28 +0530 Subject: [PATCH 2/2] changes --- .travis.yml | 38 ------------------------------- CHANGELOG.md | 3 +++ CONTRIBUTING.md | 2 +- InstanceComposer.js | 4 ++-- LICENSE | 2 +- README.md | 2 +- VERSION | 2 +- config/cache.js | 2 +- index.js | 4 ++-- lib/existingInstance.js | 2 +- lib/formatter/response.js | 2 +- lib/implementer/InMemory.js | 2 +- lib/implementer/Memcached.js | 4 ++-- lib/implementer/Redis.js | 2 +- lib/logger/customConsoleLogger.js | 2 +- package.json | 14 ++++++------ services/CacheInstance.js | 2 +- 17 files changed, 27 insertions(+), 62 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1a1c254..0000000 --- a/.travis.yml +++ /dev/null @@ -1,38 +0,0 @@ -dist: bionic -language: node_js -sudo: required -branches: - only: - - master - - prep_for_ph_launch - - /^release-.*/ -notifications: - email: - recipients: - # Todo: change this - - kedar@plgworks.com - on_success: always - on_failure: always -node_js: - - "18" - - "16" -services: - - "memcached" -before_install: - - sudo apt-get update - - sudo apt-get install nodejs - - sudo apt-get install npm -install: - - npm install -before_script: - - memcached -p 11212 -d - - memcached -p 11213 -d - - memcached -p 11214 -d - - memcached -p 11215 -d - - sudo redis-server /etc/redis/redis.conf --port 6380 --requirepass 'my-secret' - - sudo redis-server /etc/redis/redis.conf --port 6381 --requirepass 'my-secret' - - ps aux | grep 'memcached' - - ps aux | grep 'redis-server' -script: - - npm run test -after_script: "skip" diff --git a/CHANGELOG.md b/CHANGELOG.md index 305814c..2288b39 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## UniCache v2.0.0 +- Republished package under @truesparrow + ## UniCache v1.0.0 - First release of UniCache having support for 3 caching engines - Memcached, Redis and In-memory Cache - Test case coverage improved to 95%. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22da51c..4fdfe48 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Helping hands are always welcome to contribute with bug fixes and enhancements t which you observe while integrating UniCache in your project. ## How to Report Issues -To report an issue, please use the [Github issues tracker](https://github.com/PLG-Works/UniCache/issues). When reporting issues, +To report an issue, please use the [Github issues tracker](https://github.com/TrueSparrowSystems/UniCache/issues). When reporting issues, please mention the following details, whichever applicable: - Steps to reproduce with sample snippets. - Actual vs. expected behaviour. diff --git a/InstanceComposer.js b/InstanceComposer.js index 28f2dd5..6b53639 100644 --- a/InstanceComposer.js +++ b/InstanceComposer.js @@ -1,9 +1,9 @@ /** - * Instance Composer from @TrueSparrowSystems/base + * Instance Composer from @truesparrow/base * * @module instance_composer */ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); module.exports = Base.InstanceComposer; diff --git a/LICENSE b/LICENSE index ed6eef0..c79d6b8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,5 @@ The MIT License (MIT) -Copyright © 2022 PLG Works +Copyright © 2022 True Sparrow Systems Pvt. Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/README.md b/README.md index 15769d3..f97fa3b 100644 --- a/README.md +++ b/README.md @@ -211,4 +211,4 @@ npm run test ## Contribution We welcome more helping hands to make UniCache better. Feel free to report issues, raise PRs for fixes & enhancements. -

Built with :heart: by PLG Works

+

Built with :heart: by True Sparrow

diff --git a/VERSION b/VERSION index 3eefcb9..227cea2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +2.0.0 diff --git a/config/cache.js b/config/cache.js index 328fbd7..e5277e1 100644 --- a/config/cache.js +++ b/config/cache.js @@ -1,4 +1,4 @@ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); const rootPrefix = '..', coreConstants = require(rootPrefix + '/config/coreConstant'); diff --git a/index.js b/index.js index df79aec..bc6d2b7 100644 --- a/index.js +++ b/index.js @@ -1,8 +1,8 @@ /** - * Index File for @TrueSparrowSystems/cache + * Index File for @truesparrow/cache */ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); const rootPrefix = '.', version = require(rootPrefix + '/package.json').version, diff --git a/lib/existingInstance.js b/lib/existingInstance.js index 3917391..94409e2 100644 --- a/lib/existingInstance.js +++ b/lib/existingInstance.js @@ -1,3 +1,3 @@ -// This is to share the instance map between multiple @TrueSparrowSystems/cache objects. +// This is to share the instance map between multiple @truesparrow/cache objects. module.exports = {}; diff --git a/lib/formatter/response.js b/lib/formatter/response.js index 7aedf03..dae20e3 100644 --- a/lib/formatter/response.js +++ b/lib/formatter/response.js @@ -1,4 +1,4 @@ -const Base = require('@TrueSparrowSystems/base'), +const Base = require('@truesparrow/base'), responseHelper = new Base.responseHelper({ moduleName: 'CustomCache' }); module.exports = responseHelper; diff --git a/lib/implementer/InMemory.js b/lib/implementer/InMemory.js index 6f98a75..69b3b4a 100644 --- a/lib/implementer/InMemory.js +++ b/lib/implementer/InMemory.js @@ -6,7 +6,7 @@ * @module lib/implementer/InMemory */ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); const rootPrefix = '../..', cacheHelper = require(rootPrefix + '/lib/helper'), diff --git a/lib/implementer/Memcached.js b/lib/implementer/Memcached.js index a19fdbc..5745585 100644 --- a/lib/implementer/Memcached.js +++ b/lib/implementer/Memcached.js @@ -5,7 +5,7 @@ */ const Memcached = require('memcached'), - Base = require('@TrueSparrowSystems/base'); + Base = require('@truesparrow/base'); const rootPrefix = '../..', cacheHelper = require(rootPrefix + '/lib/helper'), @@ -107,7 +107,7 @@ class MemcachedCacheImplementer { oThis._isConsistentBehaviour = isConsistentBehaviour; // First time cache set was intermittently failing for memcached, thus setting test key here. - oThis.set('plgInit', 1); + oThis.set('tsInit', 1); } /** diff --git a/lib/implementer/Redis.js b/lib/implementer/Redis.js index 0ef7cb8..e435d9a 100644 --- a/lib/implementer/Redis.js +++ b/lib/implementer/Redis.js @@ -5,7 +5,7 @@ * @module lib/implementer/Redis */ -const Base = require('@TrueSparrowSystems/base'), +const Base = require('@truesparrow/base'), redis = require('redis'); const rootPrefix = '../..', diff --git a/lib/logger/customConsoleLogger.js b/lib/logger/customConsoleLogger.js index 48f72be..41ca316 100644 --- a/lib/logger/customConsoleLogger.js +++ b/lib/logger/customConsoleLogger.js @@ -1,4 +1,4 @@ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); const rootPrefix = '../..', coreConstants = require(rootPrefix + '/config/coreConstant'); diff --git a/package.json b/package.json index fc28bb1..b18b020 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { - "name": "@TrueSparrowSystems/unicache", - "version": "1.0.0", + "name": "@truesparrow/unicache", + "version": "2.0.0", "description": "UniCache is an NPM package that provides singleton interface and behavior for Memcached, Redis and In-memory caching. Easily interact or switch between them in minutes!", "main": "index.js", "scripts": { @@ -10,7 +10,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/PLG-Works/UniCache.git" + "url": "https://github.com/TrueSparrowSystems/UniCache.git" }, "keywords": [ "UniCache", @@ -21,16 +21,16 @@ "opensource", "caching" ], - "author": "PLG Works", + "author": "True Sparrow", "license": "MIT", "bugs": { - "url": "https://github.com/PLG-Works/UniCache/issues" + "url": "https://github.com/TrueSparrowSystems/UniCache/issues" }, - "homepage": "https://github.com/PLG-Works/UniCache#readme", + "homepage": "https://github.com/TrueSparrowSystems/UniCache#readme", "dependencies": { "memcached": "2.2.2", "redis": "3.1.1", - "@TrueSparrowSystems/base": "^1.0.0" + "@truesparrow/base": "^2.0.0" }, "devDependencies": { "chai": "4.3.0", diff --git a/services/CacheInstance.js b/services/CacheInstance.js index 906651b..8679410 100644 --- a/services/CacheInstance.js +++ b/services/CacheInstance.js @@ -10,7 +10,7 @@ * @module services/CacheInstance */ -const Base = require('@TrueSparrowSystems/base'); +const Base = require('@truesparrow/base'); const rootPrefix = '..', coreConstants = require(rootPrefix + '/config/coreConstant'),