Comparing version 2.0.1 to 3.0.0
@@ -1,3 +0,1 @@ | ||
/* global Promise */ | ||
const Promise = require('bluebird'); | ||
const request = require('request'); | ||
@@ -4,0 +2,0 @@ const _ = require('lodash'); |
The MIT License (MIT) | ||
Copyright (c) 2013 PetroCloud | ||
Copyright (c) 2013-2022 PetroCloud LLC | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of |
{ | ||
"name": "pcutils", | ||
"description": "PetroCloud Utils", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"author": "Petrocloud", | ||
@@ -9,26 +9,21 @@ "license": "MIT", | ||
"scripts": { | ||
"test": "istanbul cover _mocha test/**/*.js", | ||
"test": "nyc --reporter=lcov npm run testdev", | ||
"lint": "eslint --format codeframe '**/*.js'", | ||
"testdev": "mocha --bail" | ||
}, | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=v12.22.9" | ||
}, | ||
"dependencies": { | ||
"bluebird": "3.5.1", | ||
"lodash": "4.17.4", | ||
"request": "2.83.0" | ||
"lodash": "4.17.21", | ||
"request": "2.88.2" | ||
}, | ||
"devDependencies": { | ||
"chai": "4.1.2", | ||
"chai": "4.3.4", | ||
"chai-as-promised": "7.1.1", | ||
"eslint": "4.14.0", | ||
"eslint-plugin-chai-friendly": "^0.4.1", | ||
"grunt": "1.0.1", | ||
"grunt-contrib-watch": "1.0.0", | ||
"grunt-coveralls": "1.0.1", | ||
"grunt-mocha-istanbul": "5.0.2", | ||
"grunt-mocha-test": "0.13.3", | ||
"gruntify-eslint": "4.0.0", | ||
"istanbul": "1.1.0-alpha.1", | ||
"mocha": "4.1.0" | ||
"eslint": "8.6.0", | ||
"eslint-formatter-codeframe": "7.32.1", | ||
"eslint-plugin-chai-friendly": "0.7.2", | ||
"mocha": "9.1.3", | ||
"nyc": "15.1.0" | ||
}, | ||
@@ -35,0 +30,0 @@ "directories": { |
@@ -1,2 +0,2 @@ | ||
# PetroCloud Utils (pcutils) | ||
# Twenty20 Solutions Utils (pcutils) | ||
@@ -6,4 +6,3 @@ --- | ||
[](https://badge.fury.io/js/pcutils) | ||
[](https://travis-ci.org/PetroCloud/pcutils) | ||
[](https://coveralls.io/github/PetroCloud/pcutils) | ||
[](https://github.com/twenty20solutions/pcutils/actions/workflows/ci.yml) | ||
@@ -24,3 +23,3 @@ --- | ||
- `options` request options. See [`request` options documentation](https://github.com/request/request#requestoptions-callback) | ||
- returns a Bluebird promise that is resolved with the `request` response | ||
- returns a promise that is resolved with the `request` response | ||
object, unless `options.returnBody` is set to `true`, in that case, it resolves | ||
@@ -48,3 +47,3 @@ the promise with the body content. | ||
body if true, or the response object response if false. | ||
- returns a Bluebird promise that is resolved with the `request` response | ||
- returns a promise that is resolved with the `request` response | ||
body, unless `returnBody` is set to `false`, in that case, it resolves | ||
@@ -60,3 +59,3 @@ the promise with the response object. | ||
### Function `getJSON(url, timeout)` | ||
### Function `getJSON(url, timeout, returnBody = true)` | ||
@@ -72,3 +71,3 @@ Get a JSON object from an endpoint as an HTTP GET | ||
body if true, or the response object response if false. | ||
- returns a Bluebird promise that is resolved with the `request` response | ||
- returns a promise that is resolved with the `request` response | ||
body, unless `returnBody` is set to `false`, in that case, it resolves | ||
@@ -84,26 +83,8 @@ the promise with the response object. | ||
### `promisifier(function)` | ||
Takes a function as a parameter and returns a promise that resolves when the | ||
function returns a value or rejects if an exception ocurrs | ||
- `function` is the function to promisify | ||
- returns a Bluebird promise with the result of the call to the function or an | ||
error if one is thrown | ||
### `objectToString(object, showHidden, depth)` | ||
Takes an object or an array and returns the 'deep' representation of it. | ||
- `object` is the object subject to be converted | ||
- `showHidden` (defaults to false) makes the function show hidden attributes | ||
- `depth` (defaults to null, that is, infinite depth) tells how deep to go in | ||
the nesting chain, when converting the object as a string. | ||
- returns a String that resembles the object, based on the parameters passed | ||
## License | ||
**[MIT](./LICENSE)** | ||
© 2014-2016 | ||
[Petrocloud](http://petrocloud.com) | ||
© 2014-2022 | ||
[Twenty20 Solutions](http://www.twenty20solutions.com) | ||
This module is free and open-source under the MIT License. |
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
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
2
7
9580
4
107
85
+ Addedajv@6.12.6(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedhar-validator@5.1.5(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedoauth-sign@0.9.0(transitive)
+ Addedpsl@1.15.0(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addedrequest@2.88.2(transitive)
+ Addedtough-cookie@2.5.0(transitive)
+ Addeduri-js@4.4.1(transitive)
- Removedbluebird@3.5.1
- Removedajv@5.5.2(transitive)
- Removedbluebird@3.5.1(transitive)
- Removedboom@4.3.15.3.3(transitive)
- Removedco@4.6.0(transitive)
- Removedcryptiles@3.2.1(transitive)
- Removedfast-deep-equal@1.1.0(transitive)
- Removedhar-validator@5.0.3(transitive)
- Removedhawk@6.0.2(transitive)
- Removedhoek@4.3.1(transitive)
- Removedjson-schema-traverse@0.3.1(transitive)
- Removedlodash@4.17.4(transitive)
- Removedoauth-sign@0.8.2(transitive)
- Removedpunycode@1.4.1(transitive)
- Removedrequest@2.83.0(transitive)
- Removedsntp@2.1.0(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedtough-cookie@2.3.4(transitive)
Updatedlodash@4.17.21
Updatedrequest@2.88.2