Comparing version 29.0.2 to 29.0.3
@@ -76,2 +76,3 @@ /** | ||
if (process.env.CLDR_URL) { | ||
console.warn("CLDR_URL is deprecated, use CLDR_DATA_URLS_JSON instead.") | ||
srcUrl = srcUrl.replace( | ||
@@ -83,21 +84,30 @@ "http://www.unicode.org/Public/cldr", | ||
} else { | ||
srcUrl = path.join(__dirname, "./urls.json"); | ||
if (parentPackage && parentPackage["cldr-data-coverage"] && ( | ||
(parentPackage.dependencies && parentPackage.dependencies["cldr-data"]) || | ||
(parentPackage.devDependencies && parentPackage.devDependencies["cldr-data"]) | ||
)) { | ||
coverage = parentPackage["cldr-data-coverage"]; | ||
if (process.env.CLDR_DATA_URLS_JSON) { | ||
srcUrl = process.env.CLDR_DATA_URLS_JSON; | ||
} else if (parentPackage && parentPackage["cldr-data-urls-json"]) { | ||
srcUrl = parentPackage["cldr-data-urls-json"]; | ||
} else { | ||
srcUrl = path.join(__dirname, "./urls.json"); | ||
} | ||
} | ||
if (process.env.CLDR_COVERAGE) { | ||
coverage = process.env.CLDR_COVERAGE; | ||
} | ||
if (process.env.CLDR_COVERAGE) { | ||
coverage = process.env.CLDR_COVERAGE; | ||
} else if (parentPackage && parentPackage["cldr-data-coverage"] && ( | ||
(parentPackage.dependencies && parentPackage.dependencies["cldr-data"]) || | ||
(parentPackage.devDependencies && parentPackage.devDependencies["cldr-data"]) | ||
)) { | ||
coverage = parentPackage["cldr-data-coverage"]; | ||
} | ||
if (coverage) { | ||
options.srcUrlKey = coverage; | ||
} | ||
if (process.env.CLDR_DATA_URLS_FILTER) { | ||
options.filterRe = process.env.CLDR_DATA_URLS_FILTER; | ||
} else if (parentPackage && parentPackage["cldr-data-urls-filter"]) { | ||
options.filterRe = parentPackage["cldr-data-urls-filter"]; | ||
} | ||
if (coverage) { | ||
options.srcUrlKey = coverage; | ||
} | ||
cldrDownloader( | ||
@@ -104,0 +114,0 @@ srcUrl, |
{ | ||
"name": "cldr-data", | ||
"version": "29.0.2", | ||
"version": "29.0.3", | ||
"keywords": [ | ||
@@ -28,2 +28,8 @@ "unicode", | ||
"main": "index.js", | ||
"files": [ | ||
"DCO.md", | ||
"index.js", | ||
"install.js", | ||
"urls.json" | ||
], | ||
"scripts": { | ||
@@ -34,3 +40,3 @@ "install": "node install.js", | ||
"dependencies": { | ||
"cldr-data-downloader": "0.2.x", | ||
"cldr-data-downloader": "0.3.x", | ||
"glob": "5.x.x" | ||
@@ -37,0 +43,0 @@ }, |
@@ -91,4 +91,49 @@ # Npm's cldr-data | ||
#### Set Custom json file with urls or filter existing | ||
By default, used file `urls.json` form cldr-data module, which contain | ||
for each lovale coverage 18 urls. For set custom `.json` file, that have | ||
structure accoding `urls.json` use `cldr-data-urls-json` property in `package.json` your webApp | ||
*Define the package.json `cldr-data-urls-json` property* | ||
``` | ||
{ | ||
... | ||
"cldr-data-urls-json": "../../cldrdatadwnl.json", | ||
... | ||
} | ||
``` | ||
Path must be relative from cldr-data directory | ||
*Example custom cldrdatadwnl.json* | ||
File have only 7 urls. | ||
``` | ||
{ | ||
"core": [ | ||
"https://github.com/unicode-cldr/cldr-core/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-dates-modern/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-localenames-modern/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-misc-modern/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-numbers-modern/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-segments-modern/archive/30.0.3.zip", | ||
"https://github.com/unicode-cldr/cldr-units-modern/archive/30.0.3.zip" | ||
] | ||
} | ||
``` | ||
Or you can filter existing urls by regexp pattern, via `cldr-data-urls-filter` | ||
field in `package.json`: | ||
``` | ||
{ | ||
... | ||
"cldr-data-urls-filter": "(cldr-core|cldr-numbers-modern|cldr-dates-modern)", | ||
... | ||
} | ||
``` | ||
## License | ||
MIT © [Rafael Xavier de Souza](http://rafael.xavier.blog.br) |
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances 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
139
15664
6
235
12
+ Addedadm-zip@0.4.11(transitive)
+ Addedajv@5.5.2(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaws-sign2@0.7.0(transitive)
+ Addedcaseless@0.12.0(transitive)
+ Addedcldr-data-downloader@0.3.5(transitive)
+ Addedco@4.6.0(transitive)
+ Addedfast-deep-equal@1.1.0(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedform-data@2.3.3(transitive)
+ Addedhar-schema@2.0.0(transitive)
+ Addedhar-validator@5.0.3(transitive)
+ Addedhttp-signature@1.2.0(transitive)
+ Addedjson-schema-traverse@0.3.1(transitive)
+ Addedperformance-now@2.1.0(transitive)
+ Addedqs@6.5.3(transitive)
+ Addedrequest@2.87.0(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedtunnel-agent@0.6.0(transitive)
+ Addeduuid@3.4.0(transitive)
- Removedadm-zip@0.4.4(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedassert-plus@0.2.0(transitive)
- Removedasync@2.6.4(transitive)
- Removedaws-sign2@0.6.0(transitive)
- Removedbl@1.1.2(transitive)
- Removedboom@2.10.1(transitive)
- Removedcaseless@0.11.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedcldr-data-downloader@0.2.5(transitive)
- Removedcommander@2.20.3(transitive)
- Removedconfig-chain@1.1.13(transitive)
- Removedcore-util-is@1.0.3(transitive)
- Removedcryptiles@2.0.5(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedform-data@1.0.1(transitive)
- Removedgenerate-function@2.3.1(transitive)
- Removedgenerate-object-property@1.2.0(transitive)
- Removedhar-validator@2.0.6(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhawk@3.1.3(transitive)
- Removedhoek@2.16.3(transitive)
- Removedhttp-signature@1.1.1(transitive)
- Removedini@1.3.8(transitive)
- Removedis-my-ip-valid@1.0.1(transitive)
- Removedis-my-json-valid@2.20.6(transitive)
- Removedis-property@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedjsonpointer@5.0.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removednode-uuid@1.4.8(transitive)
- Removednpmconf@2.0.9(transitive)
- Removedonce@1.3.3(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedosenv@0.1.5(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedprocess-nextick-args@1.0.7(transitive)
- Removedproto-list@1.2.4(transitive)
- Removedqs@6.2.4(transitive)
- Removedreadable-stream@2.0.6(transitive)
- Removedrequest@2.74.0(transitive)
- Removedsemver@4.3.6(transitive)
- Removedsntp@1.0.9(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedtunnel-agent@0.4.3(transitive)
- Removeduid-number@0.0.5(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedxtend@4.0.2(transitive)
Updatedcldr-data-downloader@0.3.x