Comparing version 4.2.0 to 4.3.0
@@ -0,1 +1,6 @@ | ||
4.3.0 / 2022-06-19 | ||
================== | ||
* Add `seasonIntervals` parser constraint | ||
* Use ESM import assertions to import JSON locale data | ||
4.1.0 / 2021-08-31 | ||
@@ -2,0 +7,0 @@ ================== |
@@ -1,6 +0,8 @@ | ||
import { readFileSync } from 'fs' | ||
import en from './en-US.json' assert { type: 'json' } | ||
import es from './es-ES.json' assert { type: 'json' } | ||
import de from './de-DE.json' assert { type: 'json' } | ||
import fr from './fr-FR.json' assert { type: 'json' } | ||
import it from './it-IT.json' assert { type: 'json' } | ||
import ja from './ja-JA.json' assert { type: 'json' } | ||
const load = (locale) => | ||
JSON.parse(readFileSync(new URL(`${locale}.json`, import.meta.url))) | ||
const alias = (lang, ...regions) => { | ||
@@ -12,8 +14,8 @@ for (let region of regions) | ||
const data = { | ||
en: load('en-US'), | ||
es: load('es-ES'), | ||
de: load('de-DE'), | ||
fr: load('fr-FR'), | ||
it: load('it-IT'), | ||
ja: load('ja-JA') | ||
en, | ||
es, | ||
de, | ||
fr, | ||
it, | ||
ja | ||
} | ||
@@ -20,0 +22,0 @@ |
{ | ||
"name": "edtf", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"description": "Extended Date Time Format (EDTF) / ISO 8601-2 Parser and Library", | ||
@@ -52,5 +52,3 @@ "type": "module", | ||
"@rollup/plugin-commonjs": "^22.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^13.0.4", | ||
"@rollup/plugin-replace": "^4.0.0", | ||
"acorn-import-assertions": "^1.8.0", | ||
"c8": "^7.7.3", | ||
@@ -60,4 +58,5 @@ "chai": "^4.2.0", | ||
"mocha": "^10.0.0", | ||
"rollup": "^2.56.3" | ||
"rollup": "^2.56.3", | ||
"rollup-plugin-import-assert": "^2.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
8
3880
0
170356
33