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.8 to 0.6.9

22

lib/translationService.js

@@ -1,14 +0,24 @@

import {TranslationService as OriginalTranslationService} from '@dile/ui/mixins/i18n/TranslationService.js';
import { TranslationService as OriginalTranslationService } from '@dile/ui/mixins/i18n/TranslationService.js';
const translations = import.meta.glob('./i18n/*.js', { eager: true })
const translations = import.meta.glob('./i18n/*.js', { eager: true });
class TranslationService extends OriginalTranslationService {
async importLanguage(language) {
const module = await import(`./i18n/${language}.js`);
return module;
const importPath = `./i18n/${language}.js`;
if (translations[importPath]) {
return translations[importPath];
} else {
throw new Error(`Translation file for language "${language}" not found.`);
}
}
async importFallback() {
const defaultModule = await import('./i18n/en.js');
return defaultModule;
const fallbackPath = './i18n/en.js';
if (translations[fallbackPath]) {
return translations[fallbackPath];
} else {
throw new Error('Fallback translation file not found.');
}
}

@@ -15,0 +25,0 @@ }

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

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

},
"gitHead": "d62d281604d5206d27f5c2443e9a312443530140"
"gitHead": "4206a26c8acdf404ecc53cacec8f801b4288b63f"
}
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