Socket
Socket
Sign inDemoInstall

@ngneat/transloco-scoped-libs

Package Overview
Dependencies
72
Maintainers
3
Versions
16
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.0.4 to 3.0.5

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Changelog

## [3.0.5](https://github.com/ngneat/transloco/compare/transloco-scoped-libs-3.0.4...transloco-scoped-libs-3.0.5) (2023-05-18)
## [3.0.4](https://github.com/ngneat/transloco/compare/transloco-scoped-libs-3.0.3...transloco-scoped-libs-3.0.4) (2022-01-15)

@@ -7,0 +11,0 @@

13

package.json
{
"name": "@ngneat/transloco-scoped-libs",
"version": "3.0.4",
"version": "3.0.5",
"description": "Transloco support tool for libraries with translations",

@@ -45,3 +45,3 @@ "main": "src/lib/transloco-scoped-libs.js",

"dependencies": {
"@ngneat/transloco-utils": "^3.0.2",
"@ngneat/transloco-utils": "^3.0.5",
"chalk": "^4.1.2",

@@ -53,3 +53,10 @@ "chokidar": "^3.5.2",

},
"typings": "./src/index.d.ts"
"typings": "./src/index.d.ts",
"peerDependencies": {
"cosmiconfig": "^8.1.3",
"tslib": "2.3.1",
"zone.js": "0.11.5",
"@angular/core": "13.3.10",
"@angular/platform-browser-dynamic": "13.3.10"
}
}

@@ -12,5 +12,5 @@ #!/usr/bin/env node

];
const { watch, ['skip-gitignore']: skipGitIgnoreUpdate } = command_line_args_1.default(optionDefinitions);
const { rootTranslationsPath, scopedLibs } = transloco_utils_1.getGlobalConfig();
transloco_scoped_libs_1.default({
const { watch, ['skip-gitignore']: skipGitIgnoreUpdate } = (0, command_line_args_1.default)(optionDefinitions);
const { rootTranslationsPath, scopedLibs } = (0, transloco_utils_1.getGlobalConfig)();
(0, transloco_scoped_libs_1.default)({
watch,

@@ -17,0 +17,0 @@ skipGitIgnoreUpdate,

@@ -48,3 +48,3 @@ "use strict";

}
const pkg = scoped_libs_utils_1.getPackageJson(lib.src);
const pkg = (0, scoped_libs_utils_1.getPackageJson)(lib.src);
if (!pkg.content.i18n) {

@@ -62,3 +62,3 @@ console.log(chalk_1.default.red(`${path_1.default.join(lib.src, 'package.json')} is missing i18n information.`, packageJsoni18nExample));

const { scope, strategy } = scopeConfig;
glob_1.default(`${path_1.default.join(input, scopeConfig.path)}/**/*.json`, {}, function (err, files) {
(0, glob_1.default)(`${path_1.default.join(input, scopeConfig.path)}/**/*.json`, {}, function (err, files) {
if (err)

@@ -99,5 +99,5 @@ console.log(chalk_1.default.red(err));

return scopedLibs.map((lib) => {
return scoped_libs_utils_1.isString(lib)
return (0, scoped_libs_utils_1.isString)(lib)
? { src: lib, dist: [defaultPath] }
: Object.assign(Object.assign({}, lib), { dist: scoped_libs_utils_1.coerceArray(lib.dist) });
: Object.assign(Object.assign({}, lib), { dist: (0, scoped_libs_utils_1.coerceArray)(lib.dist) });
});

@@ -123,6 +123,6 @@ }

const outputFilePath = path_1.default.join(outputDir, fileName);
console.log('✅ Copy translation from file:', chalk_1.default.blue(scoped_libs_utils_1.cutPath(translationFilePath)), 'to:', chalk_1.default.blue(scoped_libs_utils_1.cutPath(outputFilePath)));
console.log('✅ Copy translation from file:', chalk_1.default.blue((0, scoped_libs_utils_1.cutPath)(translationFilePath)), 'to:', chalk_1.default.blue((0, scoped_libs_utils_1.cutPath)(outputFilePath)));
if (!skipGitIgnoreUpdate) {
const path = strategy === 'join' ? outputFilePath : outputDir;
scoped_libs_utils_1.insertPathToGitIgnore(path);
(0, scoped_libs_utils_1.insertPathToGitIgnore)(path);
}

@@ -138,3 +138,3 @@ setTranslationFile({

function setTranslationFile({ translationFilePath: targetFilePath, scope, strategy, outputFilePath, }) {
let content = scoped_libs_utils_1.readJson(targetFilePath);
let content = (0, scoped_libs_utils_1.readJson)(targetFilePath);
if (!content) {

@@ -144,5 +144,5 @@ return;

if (strategy === 'join') {
content = Object.assign(Object.assign({}, scoped_libs_utils_1.readJson(outputFilePath)), { [scope]: content });
content = Object.assign(Object.assign({}, (0, scoped_libs_utils_1.readJson)(outputFilePath)), { [scope]: content });
}
scoped_libs_utils_1.writeJson(outputFilePath, content);
(0, scoped_libs_utils_1.writeJson)(outputFilePath, content);
}

@@ -9,3 +9,5 @@ "use strict";

// First, initialize the Angular testing environment.
testing_1.getTestBed().initTestEnvironment(testing_2.BrowserDynamicTestingModule, testing_2.platformBrowserDynamicTesting());
(0, testing_1.getTestBed)().initTestEnvironment(testing_2.BrowserDynamicTestingModule, (0, testing_2.platformBrowserDynamicTesting)(), {
teardown: { destroyAfterEach: false }
});
// Then we find all the tests.

@@ -12,0 +14,0 @@ const context = require.context('./', true, /\.spec\.ts$/);

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc