i18next-fs-backend
Advanced tools
Comparing version 2.4.0 to 2.5.0
@@ -9,2 +9,3 @@ "use strict"; | ||
var _json = _interopRequireDefault(require("./formats/json5.js")); | ||
var _jsonc = require("./formats/jsonc.js"); | ||
var _yaml = _interopRequireDefault(require("./formats/yaml.js")); | ||
@@ -106,2 +107,5 @@ var _extname = _interopRequireDefault(require("./extname.js")); | ||
break; | ||
case '.jsonc': | ||
result = (0, _jsonc.parse)(data); | ||
break; | ||
case '.yml': | ||
@@ -108,0 +112,0 @@ case '.yaml': |
import JSON5 from './formats/json5.js'; | ||
import { parse as parseJSONC } from './formats/jsonc.js'; | ||
import jsYaml from './formats/yaml.js'; | ||
@@ -94,2 +95,5 @@ import extname from './extname.js'; | ||
break; | ||
case '.jsonc': | ||
result = parseJSONC(data); | ||
break; | ||
case '.yml': | ||
@@ -96,0 +100,0 @@ case '.yaml': |
import JSON5 from './formats/json5.js' | ||
import { parse as parseJSONC } from './formats/jsonc.js' | ||
import jsYaml from './formats/yaml.js' | ||
@@ -90,2 +91,5 @@ import extname from './extname.js' | ||
break | ||
case '.jsonc': | ||
result = parseJSONC(data) | ||
break | ||
case '.yml': | ||
@@ -92,0 +96,0 @@ case '.yaml': |
{ | ||
"name": "i18next-fs-backend", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"private": false, | ||
@@ -36,2 +36,3 @@ "type": "module", | ||
"dtslint": "4.2.1", | ||
"esbuild": "0.24.0", | ||
"eslint": "8.55.0", | ||
@@ -47,2 +48,3 @@ "eslint-config-standard": "17.1.0", | ||
"js-yaml": "4.1.0", | ||
"jsonc-parser": "3.3.1", | ||
"json5": "2.2.3", | ||
@@ -74,5 +76,6 @@ "mocha": "10.8.2", | ||
"scripts": { | ||
"copy:jsonc": "esbuild node_modules/jsonc-parser/lib/esm/main.js --bundle --format=esm --platform=neutral --banner:js=\"/*\n$(sed 's/\\r$//' node_modules/jsonc-parser/LICENSE.md)\n*/\" --outfile=lib/formats/jsonc.js", | ||
"copy:json5": "cp node_modules/json5/dist/index.mjs lib/formats/json5.js", | ||
"copy:yaml": "cp node_modules/js-yaml/dist/js-yaml.mjs lib/formats/yaml.js", | ||
"copy": "rm -rf lib/formats && mkdir lib/formats && npm run copy:json5 && npm run copy:yaml", | ||
"copy": "rm -rf lib/formats && mkdir lib/formats && npm run copy:jsonc && npm run copy:json5 && npm run copy:yaml", | ||
"lint": "eslint .", | ||
@@ -79,0 +82,0 @@ "fixcjs": "node -e \"$npm_package_config_fixcjs\"", |
@@ -15,2 +15,3 @@ # Introduction | ||
- .json5 | ||
- .jsonc | ||
- .yml/.yaml | ||
@@ -17,0 +18,0 @@ - .js (very limited, checks for `exports` or `export default`) |
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
662803
35
19084
149
23