@commonform/component-updates
Advanced tools
Comparing version 1.0.1 to 1.0.2
const compareVersions = require('legal-versioning-compare') | ||
const concat = require('concat-stream') | ||
const concat = require('simple-concat') | ||
const https = require('https') | ||
@@ -18,3 +18,3 @@ const isObject = require('is-object') | ||
} = found | ||
if (cache.get) { | ||
if (cache && cache.get) { | ||
cache.get(url, (error, versions) => { | ||
@@ -30,3 +30,3 @@ if (error || !versions) downloadAndCache() | ||
if (!versions) return withVersions(null, false) | ||
if (cache.put) cache.put(url, versions, () => finish()) | ||
if (cache && cache.put) cache.put(url, versions, () => finish()) | ||
else finish() | ||
@@ -83,4 +83,5 @@ | ||
function downloadVersions (url, callback) { | ||
function downloadVersions (component, callback) { | ||
callback = once(callback) | ||
const url = component + '.json' | ||
https.request(url) | ||
@@ -87,0 +88,0 @@ .once('error', callback) |
{ | ||
"name": "@commonform/component-updates", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "check for updates to components in Common Forms", | ||
@@ -12,3 +12,2 @@ "author": "Kyle E. Mitchell <kyle@kemitchell.com> (https://kemitchell.com/)", | ||
"dependencies": { | ||
"concat-stream": "^2.0.0", | ||
"is-object": "^1.0.2", | ||
@@ -19,3 +18,4 @@ "json-parse-errback": "^2.0.1", | ||
"once": "^1.4.0", | ||
"run-parallel-limit": "^1.1.0" | ||
"run-parallel-limit": "^1.1.0", | ||
"simple-concat": "^1.0.1" | ||
}, | ||
@@ -22,0 +22,0 @@ "devDependencies": { |
@@ -12,3 +12,3 @@ ```javascript | ||
version: versions[0], | ||
substitutions: { terms: {}, headings: {} } | ||
substitutions: { terms: {}, headings: {}, blanks: {}} | ||
} | ||
@@ -15,0 +15,0 @@ |
5016
100
+ Addedsimple-concat@^1.0.1
+ Addedsimple-concat@1.0.1(transitive)
- Removedconcat-stream@^2.0.0
- Removedbuffer-from@1.1.2(transitive)
- Removedconcat-stream@2.0.0(transitive)
- Removedinherits@2.0.4(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedtypedarray@0.0.6(transitive)
- Removedutil-deprecate@1.0.2(transitive)