Socket
Socket
Sign inDemoInstall

@lingui/conf

Package Overview
Dependencies
Maintainers
1
Versions
147
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lingui/conf - npm Package Compare versions

Comparing version 2.1.2 to 2.2.0-16

21

index.js

@@ -6,7 +6,15 @@ "use strict";

});
var _assign = require("babel-runtime/core-js/object/assign");
var _assign2 = _interopRequireDefault(_assign);
exports.replaceRootDir = replaceRootDir;
exports.getConfig = getConfig;
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var path = require("path");
var chalk = require("chalk");
var pkgConf = require("pkg-conf");
var cosmiconfig = require("cosmiconfig");

@@ -64,7 +72,8 @@ var _require = require("jest-validate"),

var raw = pkgConf.sync("lingui", {
defaults: defaults,
skipOnFalse: true,
cwd: cwd || process.cwd()
var defaultRootDir = cwd || process.cwd();
var configExplorer = cosmiconfig("lingui", {
sync: true
});
var result = configExplorer.load(defaultRootDir);
var raw = (0, _assign2.default)({}, defaults, result ? result.config : null);

@@ -75,4 +84,4 @@ validate(raw, configValidation);

var rootDir = path.dirname(pkgConf.filepath(raw));
var rootDir = result ? path.dirname(result.filepath) : defaultRootDir;
return replaceRootDir(raw, rootDir);
}
{
"name": "@lingui/conf",
"version": "2.1.2",
"version": "2.2.0-16",
"description": "Get lingui configuration from package.json",

@@ -22,4 +22,5 @@ "keywords": [

"chalk": "^2.3.0",
"jest-regex-util": "^23.0.0",
"jest-validate": "^23.0.1",
"cosmiconfig": "^4.0.0",
"jest-regex-util": "^23.3.0",
"jest-validate": "^23.3.0",
"pkg-conf": "^2.1.0"

@@ -26,0 +27,0 @@ },

@@ -5,3 +5,3 @@ [![License][Badge-License]][License]

lingui-conf
@lingui/conf
===========

@@ -13,3 +13,3 @@

`lingui-conf` is part of [js-lingui][jsLingui]. See the [documentation][Documentation] for all information, tutorials and examples.
`@lingui/conf` is part of [js-lingui][jsLingui]. See the [documentation][Documentation] for all information, tutorials and examples.

@@ -21,3 +21,3 @@ Package finds nearest package.json starting from current directory, reads `lingui` configuration, provides defaults for all options and `<rootDir>` with current working directory.

```js
const getConfig = require('lingui-conf')
const getConfig = require('@lingui/conf')

@@ -24,0 +24,0 @@ const config = getConfig()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc