Skip to content

Commit

Permalink
chore: improve message
Browse files Browse the repository at this point in the history
  • Loading branch information
cristiand391 committed Jan 18, 2024
1 parent fc32218 commit 5e00c9a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion messages/envVars.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,4 +314,4 @@ Your environment has both variables populated, and with different values. The va

# sfCapitalizeRecordTypes

Boolean indicating whether or not to capitalize object settings.
Whether record types are capitalized on scrach org creation.
4 changes: 4 additions & 0 deletions messages/scratchOrgSettingsGenerator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# noCapitalizeRecordTypeConfigVar

Record types defined in the scratch org definition file will stop being capitalized by default in a future release.
Set the `org-capitalize-record-types` config var to `true` to enforce capitalization.
8 changes: 5 additions & 3 deletions src/org/scratchOrgSettingsGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ import { PollingClient } from '../status/pollingClient';
import { ZipWriter } from '../util/zipWriter';
import { DirectoryWriter } from '../util/directoryWriter';
import { Lifecycle } from '../lifecycleEvents';
import { Messages } from '../messages';
import { ScratchOrgInfo, ObjectSetting } from './scratchOrgTypes';
import { Org } from './org';

Messages.importMessagesDirectory(__dirname);

export enum RequestStatus {
Pending = 'Pending',
InProgress = 'InProgress',
Expand Down Expand Up @@ -212,9 +215,8 @@ export default class SettingsGenerator {
}) {
this.logger = Logger.childFromRoot('SettingsGenerator');
if (options?.capitalizeRecordTypes === undefined) {
void Lifecycle.getInstance().emitWarning(
'record types will stop being capitalized by default in a future release.'
);
const messages = Messages.loadMessages('@salesforce/core', 'scratchOrgSettingsGenerator');
void Lifecycle.getInstance().emitWarning(messages.getMessage('noCapitalizeRecordTypeConfigVar'));
this.capitalizeRecordTypes = true;
} else {
this.capitalizeRecordTypes = options.capitalizeRecordTypes;
Expand Down

2 comments on commit 5e00c9a

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - ubuntu-latest

Benchmark suite Current: 5e00c9a Previous: fc32218 Ratio
Child logger creation 480851 ops/sec (±0.43%) 458264 ops/sec (±2.75%) 0.95
Logging a string on root logger 799611 ops/sec (±8.92%) 874473 ops/sec (±9.38%) 1.09
Logging an object on root logger 574605 ops/sec (±5.15%) 606088 ops/sec (±6.32%) 1.05
Logging an object with a message on root logger 9702 ops/sec (±203.39%) 4412 ops/sec (±223.94%) 0.45
Logging an object with a redacted prop on root logger 421634 ops/sec (±7.31%) 451710 ops/sec (±9.74%) 1.07
Logging a nested 3-level object on root logger 361117 ops/sec (±8.08%) 382013 ops/sec (±8.12%) 1.06

This comment was automatically generated by workflow using github-action-benchmark.

@svc-cli-bot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger Benchmarks - windows-latest

Benchmark suite Current: 5e00c9a Previous: fc32218 Ratio
Child logger creation 335050 ops/sec (±0.61%) 342269 ops/sec (±0.78%) 1.02
Logging a string on root logger 820925 ops/sec (±4.15%) 807298 ops/sec (±5.67%) 0.98
Logging an object on root logger 637473 ops/sec (±6.92%) 618996 ops/sec (±7.24%) 0.97
Logging an object with a message on root logger 5070 ops/sec (±209.66%) 7153 ops/sec (±203.73%) 1.41
Logging an object with a redacted prop on root logger 427237 ops/sec (±5.18%) 455661 ops/sec (±9.69%) 1.07
Logging a nested 3-level object on root logger 310264 ops/sec (±5.06%) 339215 ops/sec (±4.88%) 1.09

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.