@skyra/i18next-backend
Advanced tools
Comparing version 2.0.4 to 2.0.5
@@ -5,2 +5,9 @@ # Changelog | ||
# [@skyra/i18next-backend@2.0.5](https://github.com/skyra-project/archid-components/compare/@skyra/i18next-backend@2.0.5...@skyra/i18next-backend@2.0.5) - (2023-12-10) | ||
## 🐛 Bug Fixes | ||
- **deps:** Update all non-major dependencies ([7e1e2c1](https://github.com/skyra-project/archid-components/commit/7e1e2c1096cd1182f31888c2024dda4072545cdc)) | ||
- **i18next-backend:** Mark source as esm ([294e667](https://github.com/skyra-project/archid-components/commit/294e6674a3b7e4379bfd61ecc9246d2a6c3a98e0)) | ||
# [@skyra/i18next-backend@2.0.4](https://github.com/skyra-project/archid-components/compare/@skyra/i18next-backend@2.0.3...@skyra/i18next-backend@2.0.4) - (2023-09-03) | ||
@@ -7,0 +14,0 @@ |
@@ -30,2 +30,2 @@ import { BackendModule, Services, InitOptions, ReadCallback } from 'i18next'; | ||
export { Backend, PathResolvable }; | ||
export { Backend, type PathResolvable }; |
@@ -1,22 +0,4 @@ | ||
"use strict"; | ||
"use strict"; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
var __export = (target, all) => { | ||
for (var name in all) | ||
__defProp(target, name, { get: all[name], enumerable: true }); | ||
}; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); | ||
var __publicField = (obj, key, value) => { | ||
@@ -28,10 +10,5 @@ __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); | ||
// src/index.ts | ||
var src_exports = {}; | ||
__export(src_exports, { | ||
Backend: () => Backend | ||
}); | ||
module.exports = __toCommonJS(src_exports); | ||
var import_node_fs = require("fs"); | ||
var import_promises = require("fs/promises"); | ||
var import_node_url = require("url"); | ||
import { readFileSync } from "node:fs"; | ||
import { readFile } from "node:fs/promises"; | ||
import { fileURLToPath } from "node:url"; | ||
var _Backend = class _Backend { | ||
@@ -78,6 +55,6 @@ constructor() { | ||
static async readPath(path) { | ||
return JSON.parse(await (0, import_promises.readFile)(path, "utf8")); | ||
return JSON.parse(await readFile(path, "utf8")); | ||
} | ||
static readPathSync(path) { | ||
return JSON.parse((0, import_node_fs.readFileSync)(path, "utf8")); | ||
return JSON.parse(readFileSync(path, "utf8")); | ||
} | ||
@@ -98,3 +75,3 @@ static handleResults(results) { | ||
if (typeof path !== "string") | ||
path = (0, import_node_url.fileURLToPath)(path); | ||
path = fileURLToPath(path); | ||
return path.replaceAll(/\{\{(?:lng|ns)\}\}/g, (match) => match === "{{lng}}" ? language : namespace); | ||
@@ -106,6 +83,5 @@ } | ||
var Backend = _Backend; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
export { | ||
Backend | ||
}); | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@skyra/i18next-backend", | ||
"version": "2.0.4", | ||
"version": "2.0.5", | ||
"description": "A fast and modern filesystem-based i18next backend for Node.js.", | ||
"author": "@skyra", | ||
"license": "Apache-2.0", | ||
"main": "dist/index.js", | ||
"module": "dist/index.mjs", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "commonjs", | ||
"type": "module", | ||
"exports": { | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js", | ||
"types": "./dist/index.d.ts" | ||
"import": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.cts", | ||
"default": "./dist/index.cjs" | ||
} | ||
}, | ||
@@ -30,7 +35,7 @@ "sideEffects": false, | ||
"devDependencies": { | ||
"@favware/cliff-jumper": "^2.1.2", | ||
"@types/node": "^20.5.9", | ||
"@favware/cliff-jumper": "^2.2.3", | ||
"@types/node": "^20.10.4", | ||
"i18next": "^22.5.1", | ||
"tsup": "^7.2.0", | ||
"typescript": "^5.2.2" | ||
"tsup": "^8.0.1", | ||
"typescript": "^5.3.3" | ||
}, | ||
@@ -37,0 +42,0 @@ "repository": { |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
34193
Yes
7
1