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

@rushstack/localization-utilities

Package Overview
Dependencies
Maintainers
3
Versions
188
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rushstack/localization-utilities - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

dist/localization-utilities.d.ts

@@ -77,2 +77,4 @@ import { ITerminal } from '@rushstack/node-core-library';

ignoreMissingResxComments?: boolean | undefined;
ignoreString?: (resxFilePath: string, stringName: string) => boolean;
processComment?: (comment: string | undefined, resxFilePath: string, stringName: string) => string | undefined;
}

@@ -79,0 +81,0 @@

@@ -14,2 +14,4 @@ import { StringValuesTypingsGenerator } from '@rushstack/typings-generator';

ignoreMissingResxComments?: boolean | undefined;
ignoreString?: (resxFilePath: string, stringName: string) => boolean;
processComment?: (comment: string | undefined, resxFilePath: string, stringName: string) => string | undefined;
}

@@ -16,0 +18,0 @@ /**

17

lib/LocFileTypingsGenerator.js

@@ -15,3 +15,4 @@ "use strict";

constructor(options) {
super(Object.assign(Object.assign({}, options), { fileExtensions: ['.resx', '.resx.json', '.loc.json', '.resjson'], parseAndGenerateTypings: (fileContents, filePath) => {
const { ignoreString, processComment } = options;
super(Object.assign(Object.assign({}, options), { fileExtensions: ['.resx', '.resx.json', '.loc.json', '.resjson'], parseAndGenerateTypings: (fileContents, filePath, resxFilePath) => {
const locFileData = (0, LocFileParser_1.parseLocFile)({

@@ -27,6 +28,12 @@ filePath: filePath,

for (const stringName in locFileData) {
typings.push({
exportName: stringName,
comment: locFileData[stringName].comment
});
if (!(ignoreString === null || ignoreString === void 0 ? void 0 : ignoreString(resxFilePath, stringName))) {
let comment = locFileData[stringName].comment;
if (processComment) {
comment = processComment(comment, resxFilePath, stringName);
}
typings.push({
exportName: stringName,
comment
});
}
}

@@ -33,0 +40,0 @@ return { typings };

{
"name": "@rushstack/localization-utilities",
"version": "0.1.0",
"version": "0.2.0",
"description": "This plugin contains some useful functions for localization.",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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