@lingui/conf
Advanced tools
Comparing version 2.0.8 to 2.1.0
16
index.js
@@ -8,7 +8,4 @@ "use strict"; | ||
exports.getConfig = getConfig; | ||
var path = require("path"); | ||
var chalk = require("chalk"); | ||
var pkgConf = require("pkg-conf"); | ||
@@ -27,5 +24,3 @@ | ||
return s.replace("<rootDir>", rootDir); | ||
}; | ||
["srcPathDirs", "srcPathIgnorePatterns", "localeDir"].forEach(function (key) { | ||
};["srcPathDirs", "srcPathIgnorePatterns", "localeDir"].forEach(function (key) { | ||
var value = conf[key]; | ||
@@ -39,2 +34,3 @@ | ||
}); | ||
conf.rootDir = rootDir; | ||
@@ -53,7 +49,9 @@ return conf; | ||
}; | ||
var deprecatedConfig = { | ||
fallbackLanguage: function fallbackLanguage(config) { | ||
return " Option ".concat(chalk.bold("fallbackLanguage"), " was replaced by ").concat(chalk.bold("fallbackLocale"), "\n \n lingui-cli now treats your current configuration as:\n {\n ").concat(chalk.bold('"fallbackLocale"'), ": ").concat(chalk.bold("\"".concat(config.fallbackLanguage, "\"")), "\n }\n \n Please update your configuration.\n "); | ||
return " Option " + chalk.bold("fallbackLanguage") + " was replaced by " + chalk.bold("fallbackLocale") + "\n \n lingui-cli now treats your current configuration as:\n {\n " + chalk.bold('"fallbackLocale"') + ": " + chalk.bold("\"" + config.fallbackLanguage + "\"") + "\n }\n \n Please update your configuration.\n "; | ||
} | ||
}; | ||
var configValidation = { | ||
@@ -74,7 +72,9 @@ exampleConfig: defaults, | ||
}); | ||
validate(raw, configValidation); // Use deprecated fallbackLanguage, if defined | ||
validate(raw, configValidation); | ||
// Use deprecated fallbackLanguage, if defined | ||
raw.fallbackLocale = raw.fallbackLocale || raw.fallbackLanguage || ""; | ||
var rootDir = path.dirname(pkgConf.filepath(raw)); | ||
return replaceRootDir(raw, rootDir); | ||
} |
{ | ||
"name": "@lingui/conf", | ||
"version": "2.0.8", | ||
"version": "2.1.0", | ||
"description": "Get lingui configuration from package.json", | ||
@@ -22,4 +22,4 @@ "keywords": [ | ||
"chalk": "^2.3.0", | ||
"jest-regex-util": "^22.1.0", | ||
"jest-validate": "^22.1.2", | ||
"jest-regex-util": "^23.0.0", | ||
"jest-validate": "^23.0.1", | ||
"pkg-conf": "^2.1.0" | ||
@@ -26,0 +26,0 @@ }, |
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
5334
+ Addedjest-regex-util@23.3.0(transitive)
+ Addedjest-validate@23.6.0(transitive)
+ Addedpretty-format@23.6.0(transitive)
- Removed@babel/code-frame@7.25.7(transitive)
- Removed@babel/helper-validator-identifier@7.25.7(transitive)
- Removed@babel/highlight@7.25.7(transitive)
- Removedabab@2.0.6(transitive)
- Removedacorn@5.7.46.4.2(transitive)
- Removedacorn-globals@4.3.4(transitive)
- Removedacorn-walk@6.2.0(transitive)
- Removedajv@6.12.6(transitive)
- Removedarr-diff@2.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarray-equal@1.0.2(transitive)
- Removedarray-unique@0.2.1(transitive)
- Removedasn1@0.2.6(transitive)
- Removedassert-plus@1.0.0(transitive)
- Removedasync-limiter@1.0.1(transitive)
- Removedasynckit@0.4.0(transitive)
- Removedaws-sign2@0.7.0(transitive)
- Removedaws4@1.13.2(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbcrypt-pbkdf@1.0.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedbraces@1.8.5(transitive)
- Removedbrowser-process-hrtime@1.0.0(transitive)
- Removedbrowser-resolve@1.11.3(transitive)
- Removedbuffer-from@1.1.2(transitive)
- Removedcallsites@2.0.0(transitive)
- Removedcaseless@0.12.0(transitive)
- Removedci-info@1.6.0(transitive)
- Removedco@4.6.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removedcore-util-is@1.0.2(transitive)
- Removedcssom@0.3.8(transitive)
- Removedcssstyle@1.4.0(transitive)
- Removeddashdash@1.14.1(transitive)
- Removeddata-urls@1.1.0(transitive)
- Removeddeep-is@0.1.4(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removeddiff@3.5.0(transitive)
- Removeddomexception@1.0.1(transitive)
- Removedecc-jsbn@0.1.2(transitive)
- Removedescape-string-regexp@2.0.0(transitive)
- Removedescodegen@1.14.3(transitive)
- Removedesprima@4.0.1(transitive)
- Removedestraverse@4.3.0(transitive)
- Removedesutils@2.0.3(transitive)
- Removedexpand-brackets@0.1.5(transitive)
- Removedexpand-range@1.8.2(transitive)
- Removedexpect@22.4.3(transitive)
- Removedextend@3.0.2(transitive)
- Removedextglob@0.3.2(transitive)
- Removedextsprintf@1.3.0(transitive)
- Removedfast-deep-equal@3.1.3(transitive)
- Removedfast-json-stable-stringify@2.1.0(transitive)
- Removedfast-levenshtein@2.0.6(transitive)
- Removedfilename-regex@2.0.1(transitive)
- Removedfill-range@2.2.4(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfor-own@0.1.5(transitive)
- Removedforever-agent@0.6.1(transitive)
- Removedform-data@2.3.3(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedgetpass@0.1.7(transitive)
- Removedglob@7.2.3(transitive)
- Removedglob-base@0.3.0(transitive)
- Removedglob-parent@2.0.0(transitive)
- Removedhar-schema@2.0.0(transitive)
- Removedhar-validator@5.1.5(transitive)
- Removedhtml-encoding-sniffer@1.0.2(transitive)
- Removedhttp-signature@1.2.0(transitive)
- Removediconv-lite@0.4.24(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-ci@1.2.1(transitive)
- Removedis-dotfile@1.0.3(transitive)
- Removedis-equal-shallow@0.1.3(transitive)
- Removedis-extendable@0.1.1(transitive)
- Removedis-extglob@1.0.0(transitive)
- Removedis-generator-fn@1.0.0(transitive)
- Removedis-glob@2.0.1(transitive)
- Removedis-number@2.1.04.0.0(transitive)
- Removedis-posix-bracket@0.1.1(transitive)
- Removedis-primitive@2.0.0(transitive)
- Removedis-typedarray@1.0.0(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.0(transitive)
- Removedisstream@0.1.2(transitive)
- Removedjest-config@22.4.4(transitive)
- Removedjest-diff@22.4.3(transitive)
- Removedjest-environment-jsdom@22.4.3(transitive)
- Removedjest-environment-node@22.4.3(transitive)
- Removedjest-jasmine2@22.4.4(transitive)
- Removedjest-matcher-utils@22.4.3(transitive)
- Removedjest-message-util@22.4.3(transitive)
- Removedjest-mock@22.4.3(transitive)
- Removedjest-regex-util@22.4.3(transitive)
- Removedjest-resolve@22.4.3(transitive)
- Removedjest-snapshot@22.4.3(transitive)
- Removedjest-util@22.4.3(transitive)
- Removedjest-validate@22.4.4(transitive)
- Removedjs-tokens@4.0.0(transitive)
- Removedjsbn@0.1.1(transitive)
- Removedjsdom@11.12.0(transitive)
- Removedjson-schema@0.4.0(transitive)
- Removedjson-schema-traverse@0.4.1(transitive)
- Removedjson-stringify-safe@5.0.1(transitive)
- Removedjsprim@1.4.2(transitive)
- Removedkind-of@3.2.26.0.3(transitive)
- Removedleft-pad@1.3.0(transitive)
- Removedlevn@0.3.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedlodash.sortby@4.7.0(transitive)
- Removedmath-random@1.0.4(transitive)
- Removedmicromatch@2.3.11(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removednatural-compare@1.4.0(transitive)
- Removednormalize-path@2.1.1(transitive)
- Removednwsapi@2.2.13(transitive)
- Removedoauth-sign@0.9.0(transitive)
- Removedobject.omit@2.0.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedoptionator@0.8.3(transitive)
- Removedparse-glob@3.0.4(transitive)
- Removedparse5@4.0.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedperformance-now@2.1.0(transitive)
- Removedpicocolors@1.1.0(transitive)
- Removedpn@1.1.0(transitive)
- Removedprelude-ls@1.1.2(transitive)
- Removedpreserve@0.2.0(transitive)
- Removedpretty-format@22.4.3(transitive)
- Removedpsl@1.9.0(transitive)
- Removedpunycode@2.3.1(transitive)
- Removedqs@6.5.3(transitive)
- Removedrandomatic@3.1.1(transitive)
- Removedregex-cache@0.4.4(transitive)
- Removedremove-trailing-separator@1.1.0(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedrequest@2.88.2(transitive)
- Removedrequest-promise-core@1.1.4(transitive)
- Removedrequest-promise-native@1.0.9(transitive)
- Removedresolve@1.1.7(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsafer-buffer@2.1.2(transitive)
- Removedsax@1.4.1(transitive)
- Removedslash@1.0.0(transitive)
- Removedsource-map@0.6.1(transitive)
- Removedsource-map-support@0.5.21(transitive)
- Removedsshpk@1.18.0(transitive)
- Removedstack-utils@1.0.5(transitive)
- Removedstealthy-require@1.1.1(transitive)
- Removedsymbol-tree@3.2.4(transitive)
- Removedtough-cookie@2.5.0(transitive)
- Removedtr46@1.0.1(transitive)
- Removedtunnel-agent@0.6.0(transitive)
- Removedtweetnacl@0.14.5(transitive)
- Removedtype-check@0.3.2(transitive)
- Removeduri-js@4.4.1(transitive)
- Removeduuid@3.4.0(transitive)
- Removedverror@1.10.0(transitive)
- Removedw3c-hr-time@1.0.2(transitive)
- Removedwebidl-conversions@4.0.2(transitive)
- Removedwhatwg-encoding@1.0.5(transitive)
- Removedwhatwg-mimetype@2.3.0(transitive)
- Removedwhatwg-url@6.5.07.1.0(transitive)
- Removedword-wrap@1.2.5(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedws@5.2.4(transitive)
- Removedxml-name-validator@3.0.0(transitive)
Updatedjest-regex-util@^23.0.0
Updatedjest-validate@^23.0.1