Comparing version 2.0.1 to 3.0.0
166
package.json
{ | ||
"name": "mortice", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "Isomorphic read/write lock that works in single processes, node clusters and web workers", | ||
"main": "lib/index.js", | ||
"scripts": { | ||
"test": "ava", | ||
"lint": "standard" | ||
}, | ||
"keywords": [ | ||
"read-write", | ||
"cluster", | ||
"mutex", | ||
"lock", | ||
"await", | ||
"async" | ||
], | ||
"author": "Alex Potsides <alex@achingbrain.net>", | ||
"license": "ISC", | ||
"license": "Apache-2.0 OR MIT", | ||
"homepage": "https://github.com/achingbrain/mortice#readme", | ||
"repository": { | ||
@@ -27,26 +15,142 @@ "type": "git", | ||
}, | ||
"homepage": "https://github.com/achingbrain/mortice", | ||
"devDependencies": { | ||
"ava": "^3.15.0", | ||
"browserify": "^17.0.0", | ||
"delay": "^5.0.0", | ||
"execa": "^5.0.0", | ||
"run-headless": "^2.0.1", | ||
"standard": "^16.0.3", | ||
"webworkify": "^1.5.0" | ||
"keywords": [ | ||
"async", | ||
"await", | ||
"cluster", | ||
"lock", | ||
"mutex", | ||
"read-write" | ||
], | ||
"engines": { | ||
"node": ">=16.0.0", | ||
"npm": ">=7.0.0" | ||
}, | ||
"ava": { | ||
"files": [ | ||
"test/*.test.js" | ||
"type": "module", | ||
"types": "./dist/src/index.d.ts", | ||
"files": [ | ||
"src", | ||
"dist/src", | ||
"!dist/test", | ||
"!**/*.tsbuildinfo" | ||
], | ||
"exports": { | ||
".": { | ||
"import": "./dist/src/index.js" | ||
} | ||
}, | ||
"eslintConfig": { | ||
"extends": "ipfs", | ||
"parserOptions": { | ||
"sourceType": "module" | ||
} | ||
}, | ||
"release": { | ||
"branches": [ | ||
"master" | ||
], | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "conventionalcommits", | ||
"releaseRules": [ | ||
{ | ||
"breaking": true, | ||
"release": "major" | ||
}, | ||
{ | ||
"revert": true, | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "feat", | ||
"release": "minor" | ||
}, | ||
{ | ||
"type": "fix", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "chore", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "docs", | ||
"release": "patch" | ||
}, | ||
{ | ||
"type": "test", | ||
"release": "patch" | ||
}, | ||
{ | ||
"scope": "no-release", | ||
"release": false | ||
} | ||
] | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "conventionalcommits", | ||
"presetConfig": { | ||
"types": [ | ||
{ | ||
"type": "feat", | ||
"section": "Features" | ||
}, | ||
{ | ||
"type": "fix", | ||
"section": "Bug Fixes" | ||
}, | ||
{ | ||
"type": "chore", | ||
"section": "Trivial Changes" | ||
}, | ||
{ | ||
"type": "docs", | ||
"section": "Trivial Changes" | ||
}, | ||
{ | ||
"type": "test", | ||
"section": "Tests" | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
"@semantic-release/github", | ||
"@semantic-release/git" | ||
] | ||
}, | ||
"scripts": { | ||
"lint": "aegir lint", | ||
"pretest": "npm run build", | ||
"test": "aegir test", | ||
"test:node": "npm run test -- -f dist/test/node.js -t node --cov", | ||
"test:chrome": "npm run test -- -f dist/test/browser.js -t browser --cov", | ||
"test:firefox": "npm run test -- -f dist/test/browser.js -t browser -- --browser firefox", | ||
"test:electron-main": "npm run test -- -f dist/test/node.js -t electron-main", | ||
"build": "tsc && node esbuild.js", | ||
"release": "semantic-release" | ||
}, | ||
"dependencies": { | ||
"nanoid": "^3.1.20", | ||
"observable-webworkers": "^1.0.0", | ||
"p-queue": "^6.0.0", | ||
"promise-timeout": "^1.3.0" | ||
"observable-webworkers": "^2.0.1", | ||
"p-queue": "^7.2.0", | ||
"p-timeout": "^5.0.2" | ||
}, | ||
"devDependencies": { | ||
"aegir": "^36.1.3", | ||
"delay": "^5.0.0", | ||
"esbuild": "^0.14.21", | ||
"execa": "^6.0.0" | ||
}, | ||
"browser": { | ||
"cluster": false | ||
"cluster": false, | ||
"./dist/src/node.js": "./dist/src/browser.js", | ||
"./src/node.js": "./src/browser.js" | ||
} | ||
} |
# mortice | ||
[![Build status](https://travis-ci.org/achingbrain/mortice.svg?branch=master)](https://travis-ci.org/achingbrain/mortice) | ||
[![Build Status](https://github.com/achingbrain/mortice/actions/workflows/js-test-and-release.yml/badge.svg?branch=main)](https://github.com/achingbrain/mortice/actions/workflows/js-test-and-release.yml) | ||
Isomorphic read/write lock that works in single processes, node clusters and web workers. | ||
> Isomorphic read/write lock that works in single processes, node clusters and web workers. | ||
@@ -24,4 +24,4 @@ ## Features | ||
```javascript | ||
const mortice = require('mortice') | ||
const delay = require('delay') | ||
import mortice from 'mortice' | ||
import delay from 'delay' | ||
@@ -98,4 +98,4 @@ // the lock name & options objects are both optional | ||
// main.js | ||
const mortice = require('mortice') | ||
const observe = require('observable-webworkers') | ||
import mortice from 'mortice' | ||
import observe from 'observable-webworkers' | ||
@@ -112,4 +112,4 @@ // create our lock on the main thread, it will be held here | ||
// worker.js | ||
const mortice = require('mortice') | ||
const delay = require('delay') | ||
import mortice from 'mortice' | ||
import delay from 'delay' | ||
@@ -126,13 +126,1 @@ const mutex = mortice() | ||
``` | ||
Alternatively you can use the bundled `mortice.Worker` to create web workers and save yourself an extra dependency. | ||
```javascript | ||
const mortice = require('mortice') | ||
const Worker = mortice.Worker | ||
// create our lock on the main thread, it will be held here | ||
const mutex = mortice() | ||
const worker = new Worker('worker.js') | ||
``` |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
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
43282
4
Yes
1
80
643
123
1
+ Addedp-timeout@^5.0.2
+ Addedeventemitter3@5.0.1(transitive)
+ Addedobservable-webworkers@2.0.1(transitive)
+ Addedp-queue@7.4.1(transitive)
+ Addedp-timeout@5.1.0(transitive)
- Removedpromise-timeout@^1.3.0
- Removedeventemitter3@4.0.7(transitive)
- Removedobservable-webworkers@1.0.0(transitive)
- Removedp-finally@1.0.0(transitive)
- Removedp-queue@6.6.2(transitive)
- Removedp-timeout@3.2.0(transitive)
- Removedpromise-timeout@1.3.0(transitive)
Updatedobservable-webworkers@^2.0.1
Updatedp-queue@^7.2.0