@sap-ux/project-input-validator
Advanced tools
Comparing version 0.1.2 to 0.2.0
@@ -8,3 +8,3 @@ import type { TOptions } from 'i18next'; | ||
/** | ||
* Helper function facading the call to i18next. | ||
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used. | ||
* | ||
@@ -11,0 +11,0 @@ * @param key i18n key |
@@ -17,3 +17,3 @@ "use strict"; | ||
const i18next_1 = __importDefault(require("i18next")); | ||
const common_i18n_json_1 = __importDefault(require("./translations/common.i18n.json")); | ||
const project_input_validator_i18n_json_1 = __importDefault(require("./translations/project-input-validator.i18n.json")); | ||
exports.PROJECT_INPUT_VALIDATOR_NS = 'project-input-validator'; | ||
@@ -28,3 +28,3 @@ /** | ||
en: { | ||
[exports.PROJECT_INPUT_VALIDATOR_NS]: common_i18n_json_1.default | ||
[exports.PROJECT_INPUT_VALIDATOR_NS]: project_input_validator_i18n_json_1.default | ||
} | ||
@@ -41,3 +41,3 @@ }, | ||
/** | ||
* Helper function facading the call to i18next. | ||
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used. | ||
* | ||
@@ -49,2 +49,5 @@ * @param key i18n key | ||
function t(key, options) { | ||
if (!(options === null || options === void 0 ? void 0 : options.ns)) { | ||
options = Object.assign(options !== null && options !== void 0 ? options : {}, { ns: exports.PROJECT_INPUT_VALIDATOR_NS }); | ||
} | ||
return i18next_1.default.t(key, options); | ||
@@ -54,4 +57,4 @@ } | ||
initI18n().catch(() => { | ||
// Ignore any errors since the write will still work | ||
// needed by lint | ||
}); | ||
//# sourceMappingURL=i18n.js.map |
@@ -1,2 +0,4 @@ | ||
export * from './validators'; | ||
export * from './deploy/validators'; | ||
export * from './ui5/validators'; | ||
export * from './general/validators'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -17,3 +17,5 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./validators"), exports); | ||
__exportStar(require("./deploy/validators"), exports); | ||
__exportStar(require("./ui5/validators"), exports); | ||
__exportStar(require("./general/validators"), exports); | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@sap-ux/project-input-validator", | ||
"version": "0.1.2", | ||
"version": "0.2.0", | ||
"description": "Library to validate Fiori project input formats", | ||
@@ -17,5 +17,10 @@ "repository": { | ||
"dependencies": { | ||
"i18next": "20.6.1" | ||
"i18next": "20.6.1", | ||
"validate-npm-package-name": "5.0.0" | ||
}, | ||
"devDependencies": {}, | ||
"devDependencies": { | ||
"@types/validate-npm-package-name": "4.0.1", | ||
"@types/i18next": "13.0.0", | ||
"jest-extended": "3.2.4" | ||
}, | ||
"files": [ | ||
@@ -29,3 +34,3 @@ "dist", | ||
"pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0", | ||
"node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0" | ||
"node": ">=18.x" | ||
}, | ||
@@ -32,0 +37,0 @@ "scripts": { |
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
37472
14
545
2
3
1
1
+ Addedbuiltins@5.1.0(transitive)
+ Addedsemver@7.7.1(transitive)
+ Addedvalidate-npm-package-name@5.0.0(transitive)