@lingui/conf
Advanced tools
Comparing version 2.5.0 to 2.6.0
26
index.js
@@ -8,5 +8,5 @@ "use strict"; | ||
var _assign = require("babel-runtime/core-js/object/assign"); | ||
var _extends2 = require("babel-runtime/helpers/extends"); | ||
var _assign2 = _interopRequireDefault(_assign); | ||
var _extends3 = _interopRequireDefault(_extends2); | ||
@@ -54,8 +54,20 @@ exports.replaceRootDir = replaceRootDir; | ||
format: "lingui", | ||
rootDir: "." | ||
rootDir: ".", | ||
extractBabelOptions: { | ||
plugins: [], | ||
presets: [] | ||
}, | ||
compileNamespace: "cjs" | ||
}; | ||
var exampleConfig = (0, _extends3.default)({}, defaultConfig, { | ||
extractBabelOptions: { | ||
plugins: ["plugin"], | ||
presets: ["preset"] | ||
} | ||
}); | ||
var deprecatedConfig = { | ||
fallbackLanguage: function fallbackLanguage(config) { | ||
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 "; | ||
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 "; | ||
} | ||
@@ -65,5 +77,5 @@ }; | ||
var configValidation = { | ||
exampleConfig: defaultConfig, | ||
exampleConfig: exampleConfig, | ||
deprecatedConfig: deprecatedConfig, | ||
comment: "See https://lingui.github.io/js-lingui/ref/conf.html for a list of valid options" | ||
comment: "See https://lingui.js.org/ref/conf.html for a list of valid options" | ||
}; | ||
@@ -78,3 +90,3 @@ | ||
var result = configExplorer.searchSync(defaultRootDir); | ||
var raw = (0, _assign2.default)({}, defaultConfig, result ? result.config : null); | ||
var raw = (0, _extends3.default)({}, defaultConfig, result ? result.config : {}); | ||
@@ -81,0 +93,0 @@ validate(raw, configValidation); |
{ | ||
"name": "@lingui/conf", | ||
"version": "2.5.0", | ||
"version": "2.6.0", | ||
"description": "Get lingui configuration from package.json", | ||
@@ -22,5 +22,5 @@ "keywords": [ | ||
"chalk": "^2.3.0", | ||
"cosmiconfig": "^5.0.5", | ||
"cosmiconfig": "^5.0.6", | ||
"jest-regex-util": "^23.3.0", | ||
"jest-validate": "^23.4.0", | ||
"jest-validate": "^23.5.0", | ||
"pkg-conf": "^2.1.0" | ||
@@ -27,0 +27,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
6068
75
Updatedcosmiconfig@^5.0.6
Updatedjest-validate@^23.5.0