Comparing version 27.0.0 to 27.0.1
@@ -11,34 +11,40 @@ /** | ||
var coverage, parentPackage, srcUrl; | ||
var cldrDownloader = require("cldr-data-downloader"); | ||
var path = require("path"); | ||
var urls = require("./urls"); | ||
var parentPackage; | ||
var url; | ||
try { | ||
parentPackage = require("../../package.json"); | ||
} | ||
catch(error) {} | ||
var options = {}; | ||
url = urls[process.env.CLDR_COVERAGE || "core"]; | ||
if (process.env.CLDR_URL) { | ||
srcUrl = srcUrl.replace( | ||
"http://www.unicode.org/Public/cldr", | ||
process.env.CLDR_URL.replace(/\/$/, "") | ||
); | ||
if (parentPackage) { | ||
if (parentPackage["cldr-data-coverage"] && parentPackage.dependencies["cldr-data"]) { | ||
if (!/^full|core$/.test(parentPackage["cldr-data-coverage"])) { | ||
throw new TypeError("Your `cldr-data-coverage` setting must have the value \"core\" or \"full\"."); | ||
} else { | ||
srcUrl = path.join(__dirname, "./urls.json"); | ||
try { | ||
parentPackage = require("../../package.json"); | ||
if (parentPackage["cldr-data-coverage"] && parentPackage.dependencies["cldr-data"]) { | ||
coverage = parentPackage["cldr-data-coverage"]; | ||
} | ||
url = urls[parentPackage["cldr-data-coverage"]]; | ||
} | ||
} | ||
catch(error) {} | ||
if (process.env.CLDR_URL) { | ||
url = url.replace( | ||
"http://www.unicode.org/Public/cldr", | ||
process.env.CLDR_URL.replace(/\/$/, "") | ||
); | ||
if (process.env.CLDR_COVERAGE) { | ||
coverage = process.env.CLDR_COVERAGE; | ||
} | ||
if (coverage) { | ||
options.srcUrlKey = coverage; | ||
} | ||
} | ||
cldrDownloader( | ||
url, | ||
srcUrl, | ||
__dirname, | ||
options, | ||
function(error) { | ||
@@ -45,0 +51,0 @@ if (error) { |
{ | ||
"name": "cldr-data", | ||
"version": "27.0.0", | ||
"version": "27.0.1", | ||
"keywords": [ | ||
@@ -5,0 +5,0 @@ "unicode", |
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
171
12848
5