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

@jsenv/util

Package Overview
Dependencies
Maintainers
2
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jsenv/util - npm Package Compare versions

Comparing version 3.5.2 to 3.6.0

dist/commonjs/manifest.json

5

index.js
// we won't internalize @jsenv/url-meta
// so that @jsenv/url-meta does not becomes nodejs specific
// but there functions could be inside this repository
// but these functions could be inside this repository
export {

@@ -21,2 +21,3 @@ applySpecifierPatternMatching,

export { ensureEmptyDirectory } from "./src/ensureEmptyDirectory.js"
export { ensureParentDirectories } from "./src/ensureParentDirectories.js"
export { ensureWindowsDriveLetter } from "./src/ensureWindowsDriveLetter.js"

@@ -45,7 +46,7 @@ export { copyFileSystemNode } from "./src/copyFileSystemNode.js"

export { urlToRelativeUrl } from "./src/urlToRelativeUrl.js"
export { wrapExternalFunction } from "./src/wrapExternalFunction.js"
export { writeDirectory } from "./src/writeDirectory.js"
export { writeFile } from "./src/writeFile.js"
export { ensureParentDirectories } from "./src/ensureParentDirectories.js"
export { writeFileSystemNodeModificationTime } from "./src/writeFileSystemNodeModificationTime.js"
export { writeFileSystemNodePermissions } from "./src/writeFileSystemNodePermissions.js"
export { writeSymbolicLink } from "./src/writeSymbolicLink.js"

34

package.json
{
"name": "@jsenv/util",
"version": "3.5.2",
"version": "3.6.0",
"description": "Set of functions often needed when using Node.js.",

@@ -32,5 +32,5 @@ "license": "MIT",

"test": "node ./script/test/test.js",
"test-with-coverage": "node ./script/test/test.js --coverage",
"eslint-check": "eslint .",
"prettier-format": "node ./script/prettier-format/prettier-format.js",
"test-with-coverage": "npm run test -- --coverage",
"eslint-check": "node ./node_modules/eslint/bin/eslint.js .",
"prettier-format": "node --no-warnings ./script/prettier-format/prettier-format.js",
"prettier-format-stage": "npm run prettier-format -- --staged",

@@ -44,4 +44,3 @@ "prettier-check": "npm run prettier-format -- --dry-run",

"prepublishOnly": "node ./script/transform-package/remove-postinstall.js && npm run dist",
"postpublish": "node ./script/transform-package/restore-postinstall.js",
"git-hook-pre-commit": "npm run prettier-format-stage"
"postpublish": "node ./script/transform-package/restore-postinstall.js"
},

@@ -51,19 +50,18 @@ "dependencies": {

"@jsenv/node-signals": "2.0.1",
"@jsenv/url-meta": "5.2.2"
"@jsenv/url-meta": "5.2.3"
},
"devDependencies": {
"@jsenv/assert": "1.2.2",
"@jsenv/codecov-upload": "3.2.0",
"@jsenv/core": "11.6.1",
"@jsenv/eslint-config": "12.3.1",
"@jsenv/git-hooks": "1.3.1",
"@jsenv/github-release-package": "1.2.0",
"@jsenv/node-module-import-map": "11.0.0",
"@jsenv/package-publish": "1.5.0",
"@jsenv/prettier-check-project": "5.4.0",
"@jsenv/assert": "2.2.0",
"@jsenv/codecov-upload": "3.4.1",
"@jsenv/core": "13.3.1",
"@jsenv/eslint-config": "12.4.1",
"@jsenv/github-release-package": "1.2.2",
"@jsenv/node-module-import-map": "11.1.1",
"@jsenv/package-publish": "1.5.1",
"@jsenv/prettier-check-project": "5.6.0",
"@jsenv/prettier-config": "1.2.0",
"babel-eslint": "11.0.0-beta.0",
"eslint": "6.8.0",
"prettier": "1.19.1"
"eslint": "7.2.0",
"prettier": "2.0.5"
}
}

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

import { isCancelError } from "@jsenv/cancellation"
import { wrapExternalFunction } from "./wrapExternalFunction.js"
export const catchCancellation = (asyncFn) => {
return asyncFn().catch((error) => {
if (isCancelError(error)) {
// it means consume of the function will resolve with a cancelError
// but when you cancel it means you're not interested in the result anymore
// thanks to this it avoid unhandledRejection
return error
}
throw error
})
}
export const catchCancellation = (asyncFn) =>
wrapExternalFunction(asyncFn, { catchCancellation: true })

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