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 3.3.0 to 3.4.0

10

index.d.ts

@@ -0,1 +1,3 @@

import type { GeneratorOptions } from "@babel/core";
export declare type CatalogFormat = "lingui" | "minimal" | "po" | "csv" | "po-gettext";

@@ -25,5 +27,5 @@ export type CatalogFormatOptions = {

catalogs: CatalogConfig[];
compileNamespace: string;
compileNamespace: "es" | "cjs" | "ts" | string;
extractBabelOptions: Record<string, unknown>;
compilerBabelOptions: Record<string, unknown>;
compilerBabelOptions: GeneratorOptions;
fallbackLocales: FallbackLocales;

@@ -56,5 +58,5 @@ format: CatalogFormat;

};
compilerBabelOptions: Record<string, unknown>;
compilerBabelOptions: GeneratorOptions;
catalogs: CatalogConfig[];
compileNamespace: string;
compileNamespace: "es" | "ts" | "cjs" | string;
fallbackLocales: FallbackLocales;

@@ -61,0 +63,0 @@ format: CatalogFormat;

36

index.js

@@ -30,2 +30,4 @@ "use strict";

var _lodash = _interopRequireDefault(require("lodash.get"));
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }

@@ -50,3 +52,8 @@

compileNamespace: "cjs",
compilerBabelOptions: {},
compilerBabelOptions: {
minified: true,
jsescOption: {
minimal: true
}
},
extractBabelOptions: {

@@ -82,3 +89,9 @@ plugins: [],

var defaultRootDir = cwd || process.cwd();
var configExplorer = (0, _cosmiconfig.cosmiconfigSync)("lingui");
var moduleName = "lingui";
var configExplorer = (0, _cosmiconfig.cosmiconfigSync)(moduleName, {
searchPlaces: ["package.json", ".".concat(moduleName, "rc"), ".".concat(moduleName, "rc.json"), ".".concat(moduleName, "rc.yaml"), ".".concat(moduleName, "rc.yml"), ".".concat(moduleName, "rc.ts"), ".".concat(moduleName, "rc.js"), "".concat(moduleName, ".config.ts"), "".concat(moduleName, ".config.js")],
loaders: {
".ts": TypeScriptLoader
}
});
var result = configExists(configPath) ? configExplorer.load(configPath) : configExplorer.search(defaultRootDir);

@@ -432,2 +445,19 @@ var userConfig = result ? result.config : {};

};
};
}; // copied from @EndemolShineGroup/cosmiconfig-typescript-loader
// to support sync operations
// if this PR gets merged and published, this piece of code can be thrown away
// https://github.com/EndemolShineGroup/cosmiconfig-typescript-loader/pull/132
function TypeScriptLoader(filePath) {
try {
require("ts-node/register");
var result = require(filePath);
return (0, _lodash.default)(result, "default", result);
} catch (error) {
// Replace with logger class OR throw a more specific error
throw require("@endemolshinegroup/cosmiconfig-typescript-loader/dist/Errors/TypeScriptCompileError").fromError(error);
}
}
{
"name": "@lingui/conf",
"version": "3.3.0",
"version": "3.4.0",
"description": "Get lingui configuration from package.json",

@@ -22,2 +22,3 @@ "keywords": [

"@babel/runtime": "^7.11.2",
"@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2",
"chalk": "^4.1.0",

@@ -24,0 +25,0 @@ "cosmiconfig": "^7.0.0",

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