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

@wixc3/patterns

Package Overview
Dependencies
Maintainers
67
Versions
63
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/patterns - npm Package Compare versions

Comparing version 16.1.3 to 16.2.0

4

package.json
{
"name": "@wixc3/patterns",
"version": "16.1.3",
"version": "16.2.0",
"description": "A utility for saving objects to be disposed",

@@ -21,5 +21,5 @@ "main": "dist/cjs/index.js",

"dependencies": {
"@wixc3/common": "^16.1.3",
"@wixc3/common": "^16.2.0",
"promise-assist": "^2.0.1"
}
}

@@ -75,3 +75,6 @@ import { DisposalGroup, getGroupConstrainedIndex, GroupConstraints, normalizeConstraints } from './constraints';

private readonly constrains: GroupConstraints[] = [];
constructor(private name: string, initialGroups: string[] = []) {
constructor(
private name: string,
initialGroups: string[] = [],
) {
this.dispose = this.dispose.bind(this);

@@ -121,3 +124,3 @@ this.groups.push(...initialGroups.map(createGroup));

throw new Error(
`Invalid disposable: must be a function or object with a dispose method got ${disposable}`
`Invalid disposable: must be a function or object with a dispose method got ${disposable}`,
);

@@ -124,0 +127,0 @@ }

@@ -28,2 +28,2 @@ export interface IDisposable {

);
}
}

@@ -99,3 +99,3 @@ import { expect, use } from 'chai';

expect(() => groups.registerGroup('group1', { before: 'group2' })).to.throw(
`Invalid constraint: "before: group2" - group not found`
`Invalid constraint: "before: group2" - group not found`,
);

@@ -106,3 +106,3 @@ });

expect(() => groups.registerGroup('group1', [])).to.throw(
`Invalid disposal group: must have at least one constraint`
`Invalid disposal group: must have at least one constraint`,
);

@@ -116,3 +116,3 @@ });

expect(() => groups.registerGroup('invalid', { before: 'before', after: 'after' })).to.throw(
'Invalid constraints: after runs after before, which contradicts prior constraints'
'Invalid constraints: after runs after before, which contradicts prior constraints',
);

@@ -123,3 +123,3 @@ });

expect(() => groups.registerGroup('default', { before: 'default' })).to.throw(
`Invalid group: "default" already exists`
`Invalid group: "default" already exists`,
);

@@ -126,0 +126,0 @@ });

@@ -112,3 +112,3 @@ import { expect } from 'chai';

disposable.guard(() => 'guarded return value'),
'guard return value'
'guard return value',
).to.eql('guarded return value');

@@ -115,0 +115,0 @@ const disposing = disposable.dispose();

{
"extends": "../../../tsconfig.base.json",
"compilerOptions": {
"outDir": "../dist/cjs"
"outDir": "../dist/cjs",
},
"references": [{ "path": "../../common/src" }]
"references": [{ "path": "../../common/src" }],
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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