Socket
Socket
Sign inDemoInstall

@salesforce/core

Package Overview
Dependencies
Maintainers
0
Versions
499
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/core - npm Package Compare versions

Comparing version 8.1.1 to 8.1.2

26

lib/messages.js

@@ -40,2 +40,3 @@ "use strict";

const kit_1 = require("@salesforce/kit");
const lifecycleEvents_1 = require("./lifecycleEvents");
const sfError_1 = require("./sfError");

@@ -523,4 +524,25 @@ const getKey = (packageName, bundleName) => `${packageName}:${bundleName}`;

return messages.map((message) => {
(0, ts_types_1.ensureString)(message);
return util.format(message, ...tokens);
const msgStr = (0, ts_types_1.ensureString)(message);
// If the message does not contain a specifier, util.format still appends the token to the end.
// The 'markdownLoader' automatically splits bulleted lists into arrays.
// This causes the token to be appended to each line regardless of the presence of a specifier.
// Here we check for the presence of a specifier and only format the message if one is present.
// https://nodejs.org/api/util.html#utilformatformat-args
// https://regex101.com/r/8Hf8Z6/1
const specifierRegex = new RegExp('%[sdifjoO]{1}', 'gm');
// NOTE: This is a temporary telemetry event to track down missing specifiers in messages.
// Once we have enough data and correct missing specifiers, we can remove this.
// The followup work is outlined in: W-16197665
if (!specifierRegex.test(msgStr) && tokens.length > 0) {
void lifecycleEvents_1.Lifecycle.getInstance().emitTelemetry({
eventName: 'missing_message_specifier',
library: 'sfdx-core',
function: 'getMessageWithMap',
messagesLength: messages.length,
message: msgStr,
tokensLength: tokens.length,
});
}
// return specifierRegex.test(msgStr) ? util.format(msgStr, ...tokens) : msgStr;
return util.format(msgStr, ...tokens);
});

@@ -527,0 +549,0 @@ }

4

package.json
{
"name": "@salesforce/core",
"version": "8.1.1",
"version": "8.1.2",
"description": "Core libraries to interact with SFDX projects, orgs, and APIs.",

@@ -59,3 +59,3 @@ "main": "lib/index",

"@salesforce/ts-types": "^2.0.10",
"ajv": "^8.16.0",
"ajv": "^8.17.1",
"change-case": "^4.1.2",

@@ -62,0 +62,0 @@ "fast-levenshtein": "^3.0.0",

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