Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

els-intl-addon

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

els-intl-addon - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

22

index.js

@@ -108,7 +108,23 @@ const flat = require("flat");

const items = getTranslations(_);
const val = focusPath.node.value.indexOf("ELSCompletionDummy");
const key = focusPath.node.value.slice(0, val);
const PLACEHOLDER = 'ELSCompletionDummy';
let indexOfPlaceholder = focusPath.node.value.indexOf(PLACEHOLDER);
if (
indexOfPlaceholder === -1 &&
focusPath.parent &&
focusPath.parent.callee &&
focusPath.parent.callee.property
) {
// in js call
indexOfPlaceholder =
position.character -
focusPath.parent.callee.property.loc.start.column -
3; // column start of `t` call + `t("` (3 symbols)
}
const key = focusPath.node.value.slice(0, indexOfPlaceholder);
const startPosition = {
character: position.character - key.length,
line: position.line
line: position.line,
};

@@ -115,0 +131,0 @@ Object.keys(items).forEach(tr => {

2

package.json
{
"name": "els-intl-addon",
"version": "1.0.4",
"version": "1.0.5",
"description": "Ember Language Server intl extension",

@@ -5,0 +5,0 @@ "main": "index.js",

{
"subFolderTranslation": {
"subTranslation": "text 2"
"subTranslation": "text 2",
"anotherTranslation": "another text"
}
}
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