@awesomeeng/awesome-utils
Advanced tools
Comparing version 1.4.10 to 1.5.0
{ | ||
"name": "@awesomeeng/awesome-utils", | ||
"version": "1.4.10", | ||
"version": "1.5.0", | ||
"author": "the awesome engineering company", | ||
@@ -15,2 +15,3 @@ "license": "MIT", | ||
"devDependencies": { | ||
"eslint": "^6.6.0", | ||
"jsdoc-to-markdown": "^5.0.2", | ||
@@ -17,0 +18,0 @@ "mocha": "^6.2.1" |
# AwesomeUtils Release Notes | ||
#### **Version 1.5.0** | ||
- AwesomeUtils.Request: Adds abort and timeout events cause rejection in requests. | ||
#### **Version 1.4.10** | ||
- Fixes Net.portInUse() to work under node 11 or later. | ||
- AwesomeUtils.Net: Fixes Net.portInUse() to work under node 11 or later. | ||
#### **Version 1.4.9** | ||
- Fixes minor error in FS.recursiveMkdir that would occur when running in linux. | ||
- AwesomeUtils.FS: Fixes minor error in FS.recursiveMkdir that would occur when running in linux. | ||
#### **Version 1.4.8** | ||
- Adds MimeTypes utilities. | ||
- AwesomeUtils.MimeTypes: Adds MimeTypes utilities. | ||
@@ -15,0 +19,0 @@ #### **Version 1.4.7** |
@@ -154,13 +154,4 @@ // (c) 2018, The Awesome Engineering Company, https://awesomeneg.com | ||
let paths = path.split(/\//g); | ||
paths.forEach((p,i)=>{ | ||
if (!p) return; | ||
let before = paths.slice(0,i).join("/"); | ||
let filename = (before ? before+"/" : "")+p; | ||
let stat = this.statSync(filename); | ||
if (!stat) return FS.mkdirSync(filename); | ||
if (!stat.isDirectory()) throw new Error("Invalid directory "+filename); | ||
FS.mkdirSync(path,{ | ||
recursive: true | ||
}); | ||
@@ -167,0 +158,0 @@ } |
@@ -40,2 +40,3 @@ // (c) 2018, The Awesome Engineering Company, https://awesomeneg.com | ||
let done = false; | ||
let request = channel.request(url,options,(response)=>{ | ||
@@ -49,6 +50,24 @@ // sets up the content getter. | ||
resolve(response); | ||
if (!done) { | ||
done = true; | ||
resolve(response); | ||
} | ||
}); | ||
request.once("abort",(err)=>{ | ||
if (!done) { | ||
done = true; | ||
reject(err); | ||
} | ||
}); | ||
request.once("timeout",(err)=>{ | ||
if (!done) { | ||
done = true; | ||
reject(err); | ||
} | ||
}); | ||
request.once("error",(err)=>{ | ||
reject(err); | ||
if (!done) { | ||
done = true; | ||
reject(err); | ||
} | ||
}); | ||
@@ -55,0 +74,0 @@ if (content) request.write(content); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
152273
3662
3