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

@matrixai/resources

Package Overview
Dependencies
Maintainers
3
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@matrixai/resources - npm Package Compare versions

Comparing version 1.1.1 to 1.1.2

6

dist/index.js
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -0,2 +1,15 @@

/**
* Resource acquisition function
* This returns a tuple of resource release function and the acquired resource
* When implementing this type, make sure to use arrow functions or
* if you are passing a method, make sure to bind the `this` context
*/
declare type ResourceAcquire<Resource> = (resources?: readonly any[]) => Promise<readonly [ResourceRelease, Resource?]>;
/**
* Resource release function
* Pass any error during resource usage into the function
* The function should not rethrow the error, it only uses it to change
* its releasing behaviour, the `withF` and `withG` utilities will rethrow
* the error
*/
declare type ResourceRelease = (e?: Error) => Promise<void>;

@@ -3,0 +16,0 @@ declare type Resources<T extends readonly ResourceAcquire<unknown>[]> = {

26

package.json
{
"name": "@matrixai/resources",
"version": "1.1.1",
"version": "1.1.2",
"author": "Roger Qiu",

@@ -14,2 +14,3 @@ "description": "Resource context management",

"scripts": {
"prepare": "tsc -p ./tsconfig.build.json",
"build": "rm -r ./dist || true; tsc -p ./tsconfig.build.json",

@@ -20,23 +21,22 @@ "ts-node": "ts-node -r tsconfig-paths/register",

"lintfix": "eslint '{src,tests}/**/*.{js,ts}' --fix",
"docs": "rm -r ./docs || true; typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src && touch ./docs/.nojekyll"
"docs": "rm -r ./docs || true; typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src"
},
"devDependencies": {
"@types/jest": "^27.0.2",
"@types/node": "^14.14.35",
"@typescript-eslint/eslint-plugin": "^5.4.0",
"@typescript-eslint/parser": "^5.4.0",
"@types/node": "^16.11.7",
"@typescript-eslint/eslint-plugin": "^5.23.0",
"@typescript-eslint/parser": "^5.23.0",
"async-mutex": "^0.3.2",
"eslint": "^7.17.0",
"eslint-config-prettier": "^7.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^3.3.1",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^27.2.5",
"prettier": "^2.2.1",
"prettier": "^2.6.2",
"ts-jest": "^27.0.5",
"ts-node": "^10.4.0",
"tsconfig-paths": "^3.9.0",
"typedoc": "^0.22.13",
"typescript": "^4.4.3",
"typescript-cached-transpile": "0.0.6"
"typedoc": "^0.22.15",
"typescript": "^4.5.2"
}
}

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