Comparing version 0.10.0 to 0.10.1
@@ -0,1 +1,8 @@ | ||
## [0.10.1](https://github.com/VaclavObornik/mongodash/compare/v0.10.0...v0.10.1) (2021-07-26) | ||
### Bug Fixes | ||
* added package.json keywords ([c6ac7d1](https://github.com/VaclavObornik/mongodash/commit/c6ac7d11a19b72dbb58d13135be058f4430522c7)) | ||
# [0.10.0](https://github.com/VaclavObornik/mongodash/compare/v0.9.7...v0.10.0) (2021-07-24) | ||
@@ -2,0 +9,0 @@ |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
/**! | ||
* mongodash v0.10.0 | ||
* mongodash v0.10.1 | ||
* https://github.com/VaclavObornik/mongodash.git | ||
@@ -4,0 +4,0 @@ * |
{ | ||
"name": "mongodash", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"description": "An utility library delivering super-useful and super-simple tools using MongoDB", | ||
@@ -38,5 +38,3 @@ "main": "dist/lib/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.13.10", | ||
"@bndynet/cli": "^1.3.0", | ||
"@commitlint/cli": "^12.1.4", | ||
"@commitlint/cli": "^13.1.0", | ||
"@semantic-release/changelog": "^5.0.1", | ||
@@ -49,3 +47,2 @@ "@semantic-release/git": "^9.0.0", | ||
"@types/lodash": "^4.14.168", | ||
"@types/mongodb": "^3.6.9", | ||
"@types/node": "^16.3.1", | ||
@@ -55,6 +52,2 @@ "@types/sinon": "^10.0.0", | ||
"@typescript-eslint/parser": "^4.17.0", | ||
"autoprefixer": "^10.2.6", | ||
"awesome-typescript-loader": "^5.2.1", | ||
"babel-jest": "^27.0.6", | ||
"babel-preset-env": "^1.7.0", | ||
"coveralls": "^3.1.0", | ||
@@ -70,11 +63,7 @@ "deepdash": "^5.3.5", | ||
"jest-transform-stub": "^2.0.0", | ||
"jsdom": "16.6.0", | ||
"jsdom-global": "^3.0.2", | ||
"lint-staged": "^11.0.0", | ||
"lodash": "^4.17.21", | ||
"mongodb": "^4.0.1", | ||
"node-sass": "^6.0.0", | ||
"npm-run-all": "^4.1.5", | ||
"organize-imports-cli": "^0.8.0", | ||
"postcss": "^8.2.10", | ||
"prettier": "^2.2.1", | ||
@@ -96,3 +85,5 @@ "rimraf": "^3.0.2", | ||
"scheduling", | ||
"schedule" | ||
"schedule", | ||
"critical section", | ||
"transaction" | ||
], | ||
@@ -99,0 +90,0 @@ "author": { |
<br> | ||
## http://mongodash.com | ||
<img src="https://raw.githubusercontent.com/VaclavObornik/mongodash/master/logo.png" alt="Mongodash" height="150" /> | ||
<br> | ||
#### A modern JavaScript & Typescript MongoDB-based utility library allowing to develop common app requirements incredible simple. | ||
@@ -10,1 +10,82 @@ ![Release](https://github.com/VaclavObornik/mongodash/workflows/Release/badge.svg) | ||
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2FVaclavObornik%2Fmongodash%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/VaclavObornik/mongodash/master) | ||
See full documentation on [http://mongodash.com](http://mongodash.com) | ||
--- | ||
Installation: | ||
```bash | ||
npm install mongodash | ||
``` | ||
Initialization | ||
```javascript | ||
const mongodash = require('mongodash'); | ||
await mongodash.init({ uri: 'mongodb://mongodb0.example.com:27017/myDatabase' }); | ||
``` | ||
See more initialization options [here](https://mongodash.readme.io/docs/initialization). | ||
### cronTask | ||
```javascript | ||
const { cronTask } = require('mongodash'); | ||
await cronTask('my-task-id', '5m 20s', async () => { | ||
console.log('Hurray the task is running!'); | ||
}); | ||
``` | ||
See detailed description and more cron tasks methods [here](https://mongodash.readme.io/docs/cron-tasks). | ||
### withLock | ||
```javascript | ||
const { withLock } from 'mongodash'; | ||
await withLock('my-lock-id', async () => { | ||
// it is quaranteed this callback will never run in parallel, | ||
// so all race-conditions are solved | ||
const data = await loadFromDatabase(); | ||
data.counter += 1; | ||
await saveToDatabase(data); | ||
}); | ||
``` | ||
See detailed description [here](https://mongodash.readme.io/docs/withlock). | ||
### withTransaction | ||
```javascript | ||
const { withTransaction, getCollection } = require('mongodash'); | ||
const createdDocuments = await withTransaction(async (session) => { | ||
const myDocument1 = { value: 1 }; | ||
const myDocument2 = { value: 2 }; | ||
const collection = getCollection('myCollection'); | ||
await testCollection.insertOne(myDocument1, { session }); | ||
await testCollection.insertOne(myDocument2, { session }); | ||
return [myDocument1, myDocument2]; | ||
}); | ||
``` | ||
See detailed description [here](https://mongodash.readme.io/docs/withtransaction). | ||
### getCollection | ||
```javascript | ||
const { getCollection } = require('mongodash'); | ||
const myCollection = getCollection('myCollectionName'); | ||
``` | ||
See detailed description [here](https://mongodash.readme.io/docs/getters). | ||
### getMongoClient | ||
```javascript | ||
const { getMongoClient } = require('mongodash'); | ||
const mongoClient = getMongoClient(); | ||
``` | ||
See detailed description [here](https://mongodash.readme.io/docs/getters). |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
52401
34
91