Skip to content

Commit

Permalink
Merge pull request #14 from keyvhq/meta
Browse files Browse the repository at this point in the history
build: restructure project
  • Loading branch information
Kikobeats committed Jul 1, 2021
2 parents d887e36 + 2ee6507 commit 3e1d5cb
Show file tree
Hide file tree
Showing 72 changed files with 1,617 additions and 2,068 deletions.
22 changes: 22 additions & 0 deletions .editorconfig
@@ -0,0 +1,22 @@
# http://editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
max_line_length = 80
indent_brace_style = 1TBS
spaces_around_operators = true
quote_type = auto

[package.json]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto
11 changes: 11 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,11 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every weekday
interval: "daily"
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Expand Up @@ -59,11 +59,11 @@ jobs:
sudo systemctl restart postgresql.service
pg_isready
- run: yarn install
- run: yarn test
- run: npm install --no-package-lock
- run: npm test
- name: Report
run: mkdir -p coverage && yarn run nyc report --reporter=text-lcov > coverage/lcov.info
run: mkdir -p coverage && npx nyc report --reporter=text-lcov > coverage/lcov.info
- name: Coverage
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Expand Up @@ -79,3 +79,7 @@ Icon
Network Trash Folder
Temporary Items
.apdisk

**/*.env

*.sqlite
4 changes: 4 additions & 0 deletions .npmrc
@@ -0,0 +1,4 @@
unsafe-perm=true
save-prefix=~
shrinkwrap=false
save=false
12 changes: 6 additions & 6 deletions packages/keyv-postgres/LICENSE → LICENSE.md
@@ -1,6 +1,6 @@
MIT License
The MIT License (MIT)

Copyright (c) 2017 Luke Childs
Copyright © 2021 Kiko Beats <hello@kikobeats.com> (httpss://kikobeats.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -9,13 +9,13 @@ 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:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
17 changes: 9 additions & 8 deletions README.md
Expand Up @@ -156,13 +156,13 @@ Inside your module:

```js
class AwesomeModule {
constructor(opts) {
this.cache = new Keyv({
uri: typeof opts.cache === 'string' && opts.cache,
store: typeof opts.cache !== 'string' && opts.cache,
namespace: 'awesome-module'
});
}
constructor (opts) {
this.cache = new Keyv({
uri: typeof opts.cache === 'string' && opts.cache,
store: typeof opts.cache !== 'string' && opts.cache,
namespace: 'awesome-module'
})
}
}
```

Expand Down Expand Up @@ -285,4 +285,5 @@ Returns a promise which is resolved when the entries have been cleared.

## License

MIT © Luke Childs
**keyv** © [Luke Childs](https://github.com/lukechilds), Released under the [MIT](/LICENSE.md) License.<br>
Maintained by [Kiko Beats](https://kikobeats.com) and [Jytesh](https://github.com/Jytesh), with help from [contributors](https://github.com/keyvhq/keyv/contributors).
11 changes: 6 additions & 5 deletions lerna.json
Expand Up @@ -3,10 +3,11 @@
"packages/*"
],
"version": "0.2.0",
"npmClient": "yarn",
"useWorkspaces": "true",
"stream": "true",
"publishConfig": {
"access": "public"
"command": {
"bootstrap": {
"npmClientArgs": [
"--no-package-lock"
]
}
}
}
File renamed without changes
162 changes: 124 additions & 38 deletions package.json
@@ -1,57 +1,143 @@
{
"name": "@keyvhq/mono",
"private": "true",
"devDependencies": {
"@keyvhq/keyv": "file:./packages/keyv",
"@keyvhq/keyv-mongo": "file:packages/keyv-mongo",
"@keyvhq/keyv-mysql": "file:packages/keyv-mysql",
"@keyvhq/keyv-postgres": "file:packages/keyv-postgres",
"@keyvhq/keyv-redis": "file:packages/keyv-redis",
"@keyvhq/keyv-sql": "file:packages/keyv-sql",
"@keyvhq/keyv-sqlite": "file:packages/keyv-sqlite",
"@keyvhq/keyv-test-suite": "file:packages/keyv-test-suite",
"ava": "^3.15.0",
"coveralls": "^3.0.0",
"delay": "^4.3.0",
"dotenv": "^8.2.0",
"eslint-config-xo-lukechilds": "^1.0.0",
"knex": "^0.95.4",
"lerna": "^4.0.0",
"nyc": "^15.1.0",
"pify": "^5.0.0",
"requirable": "^1.0.1",
"sqlite3": "^5.0.2",
"this": "^1.0.2",
"timekeeper": "^2.0.0",
"xo": "^0.38.2"
},
"author": "Jytesh & Kikobeats",
"scripts": {
"test": "lerna run test",
"coverage": "nyc report --reporter=text-lcov | npx coveralls"
"name": "@keyvhq/monorepo",
"description": "Simple key-value storage with support for multiple backends",
"homepage": "https://github.com/keyvhq/keyv#readme",
"version": "",
"author": {
"email": "lukechilds123@gmail.com",
"name": "Luke Childs",
"url": "http://lukechilds.co.uk"
},
"contributors": [
{
"name": "Casey Webb",
"email": "notcaseywebb@gmail.com"
},
{
"name": "Dan Dascalescu",
"email": "ddascalescu+github@gmail.com"
},
{
"name": "Dušan Simić",
"email": "dusan.simic1810@gmail.com"
},
{
"name": "Jared Wray",
"email": "jaredwray@gmail.com"
},
{
"name": "Jitendra Adhikari",
"email": "jiten.adhikary@gmail.com"
},
{
"name": "Jérôme Desboeufs",
"email": "jerome.desboeufs@gmail.com"
},
{
"name": "Kent C. Dodds",
"email": "me+github@kentcdodds.com"
},
{
"name": "Kiko Beats",
"email": "josefrancisco.verdu@gmail.com"
},
{
"name": "Mateu Aguiló Bosch",
"email": "mateu@lullabot.com"
},
{
"name": "MySidesTheyAreGone",
"email": "mysidestheyaregone@protonmail.com"
},
{
"name": "Paul Morgan III",
"email": "pmorgan3@gmail.com"
},
{
"name": "Romuald Quantin",
"email": "romu@soundstep.com"
},
{
"name": "Roney Rao",
"email": "roneyrao@hotmail.com"
},
{
"name": "chocolateboy",
"email": "chocolate@cpan.org"
}
],
"repository": {
"type": "git",
"url": "git+https://github.com/keyvhq/keyv.git"
},
"bugs": {
"url": "https://github.com/keyvhq/keyv/issues"
},
"keywords": [
"keyv",
"cache",
"storage",
"adapter",
"cache",
"key",
"value",
"store",
"ttl",
"keyv",
"mongo",
"mongodb",
"mysql",
"pgsql",
"redis",
"sql",
"sqlite",
"sqlite3",
"mysql",
"pgsql"
"storage",
"store",
"ttl",
"value"
],
"devDependencies": {
"@commitlint/cli": "latest",
"@commitlint/config-conventional": "latest",
"lerna": "latest",
"lint-staged": "latest",
"simple-git-hooks": "latest",
"standard": "latest"
},
"engines": {
"node": ">= 12"
},
"files": [
"packages/**"
],
"scripts": {
"clean": "lerna clean --yes && rm -rf node_modules",
"contributors": "(lerna exec finepack --parallel && git-authors-cli && finepack && git add package.json && git commit -m 'build: contributors' --no-verify) || true",
"install": "lerna bootstrap --no-ci --force-local",
"lint": "standard",
"prerelease": "npm run contributors",
"pretest": "npm run lint",
"release": "lerna publish --yes --sort --conventional-commits -m \"chore(release): %s\" --create-release github",
"test": "lerna exec npm run test",
"update": "lerna exec ncu -- --upgrade && ncu -- --upgrade",
"update:check": "lerna exec ncu -- --errorLevel 2 && ncu -- --errorLevel 2"
},
"private": "true",
"commitlint": {
"extends": [
"@commitlint/config-conventional"
]
},
"lint-staged": {
"*.js": [
"prettier-standard"
],
"*.md": [
"standard-markdown"
],
"package.json": [
"finepack"
]
},
"simple-git-hooks": {
"commit-msg": "npx commitlint --edit",
"pre-commit": "npx lint-staged"
},
"workspaces": [
"packages/*"
]
Expand Down
73 changes: 0 additions & 73 deletions packages/keyv-mongo/.gitignore

This file was deleted.

0 comments on commit 3e1d5cb

Please sign in to comment.