New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@dile/crud

Package Overview
Dependencies
Maintainers
0
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dile/crud - npm Package Compare versions

Comparing version 0.6.12 to 0.6.13

23

lib/translationService.js
import { TranslationService as OriginalTranslationService } from '@dile/ui/mixins/i18n/TranslationService.js';
const translations = import.meta.glob('./i18n/*.js', { eager: true });
class TranslationService extends OriginalTranslationService {
async importLanguage(language) {
const importPath = `./i18n/${language}.js`;
if (translations[importPath]) {
return translations[importPath];
} else {
throw new Error(`Translation file for language "${language}" not found.`);
switch (language) {
case 'es':
return import('./i18n/es.js');
case 'en':
return import('./i18n/en.js');
default:
throw new Error(`Unsupported language: ${language}`);
}

@@ -17,7 +16,5 @@ }

async importFallback() {
const fallbackPath = './i18n/en.js';
if (translations[fallbackPath]) {
return translations[fallbackPath];
} else {
try {
return import('./i18n/en.js');
} catch (error) {
throw new Error('Fallback translation file not found.');

@@ -24,0 +21,0 @@ }

{
"name": "@dile/crud",
"version": "0.6.12",
"version": "0.6.13",
"description": "Components to create a generic crud system based on Web Components and Lit",

@@ -34,3 +34,3 @@ "main": "index.js",

},
"gitHead": "ddbdaed2692688f0fcdb6d30bfae38fcda5a1e0c"
"gitHead": "835b290fb9a8796a94961f2dfe779b4e61446bb8"
}
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