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

mortice

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mortice - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

5

lib/browser.js
const EventEmitter = require('events').EventEmitter
const shortid = require('shortid')
const { nanoid } = require('nanoid')
const {

@@ -12,3 +12,2 @@ WORKER_REQUEST_READ_LOCK,

const observer = require('observable-webworkers')
const globalThis = require('globalthis')()

@@ -62,3 +61,3 @@ const handleWorkerLockRequest = (emitter, masterEvent, requestType, releaseType, grantType) => {

return () => {
const id = shortid.generate()
const id = nanoid()

@@ -65,0 +64,0 @@ globalThis.postMessage({

4

lib/node.js
const EventEmitter = require('events').EventEmitter
const shortid = require('shortid')
const { nanoid } = require('nanoid')
const {

@@ -42,3 +42,3 @@ WORKER_REQUEST_READ_LOCK,

return () => {
const id = shortid.generate()
const id = nanoid()

@@ -45,0 +45,0 @@ process.send({

{
"name": "mortice",
"version": "2.0.0",
"version": "2.0.1",
"description": "Isomorphic read/write lock that works in single processes, node clusters and web workers",

@@ -29,8 +29,8 @@ "main": "lib/index.js",

"devDependencies": {
"ava": "^2.0.0",
"browserify": "^16.2.2",
"delay": "^4.3.0",
"execa": "^2.0.0",
"ava": "^3.15.0",
"browserify": "^17.0.0",
"delay": "^5.0.0",
"execa": "^5.0.0",
"run-headless": "^2.0.1",
"standard": "^14.0.0",
"standard": "^16.0.3",
"webworkify": "^1.5.0"

@@ -44,7 +44,6 @@ },

"dependencies": {
"globalthis": "^1.0.0",
"nanoid": "^3.1.20",
"observable-webworkers": "^1.0.0",
"p-queue": "^6.0.0",
"promise-timeout": "^1.3.0",
"shortid": "^2.2.8"
"promise-timeout": "^1.3.0"
},

@@ -51,0 +50,0 @@ "browser": {

@@ -1,5 +0,5 @@

import test from 'ava'
import exec from 'execa'
import path from 'path'
import browserify from 'browserify'
const test = require('ava')
const exec = require('execa')
const path = require('path')
const browserify = require('browserify')

@@ -6,0 +6,0 @@ test('executes locks in correct order', async (t) => {

@@ -1,4 +0,4 @@

import test from 'ava'
import exec from 'execa'
import path from 'path'
const test = require('ava')
const exec = require('execa')
const path = require('path')

@@ -5,0 +5,0 @@ test('executes locks in correct order', async (t) => {

const mortice = require('../../')
const globalThis = require('globalthis')()
const delay = require('delay')

@@ -4,0 +3,0 @@

const mortice = require('../../')
const globalThis = require('globalthis')()
const delay = require('delay')

@@ -4,0 +3,0 @@

@@ -1,5 +0,5 @@

import test from 'ava'
import exec from 'execa'
import path from 'path'
import browserify from 'browserify'
const test = require('ava')
const exec = require('execa')
const path = require('path')
const browserify = require('browserify')

@@ -6,0 +6,0 @@ test('execute locks in correct order', async (t) => {

@@ -1,4 +0,4 @@

import test from 'ava'
import exec from 'execa'
import path from 'path'
const test = require('ava')
const exec = require( 'execa')
const path = require('path')

@@ -40,3 +40,3 @@ test('executes locks in correct order', async (t) => {

test('continues processing after error', async (t) => {
const result = await exec('node', [path.join(__dirname, 'fixtures', 'process-error-handling.js')])
const result = await exec('node', [path.join(__dirname, 'fixtures', 'process-error-handling.js')])

@@ -43,0 +43,0 @@ t.is(result.stdout, `read 1

@@ -1,5 +0,5 @@

import test from 'ava'
import exec from 'execa'
import path from 'path'
import browserify from 'browserify'
const test = require('ava')
const exec = require('execa')
const path = require('path')
const browserify = require('browserify')

@@ -6,0 +6,0 @@ test('execute locks in correct order', async (t) => {

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