-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Migrating `@salesforce/core` from v5 to v6 | ||
|
||
v5 contains breaking changes to the classes that extend from ConfigStore/ConfigFile. We'll call these the "config stack" as a shorthand | ||
|
||
We've had a series of bugs where files controlled by the config stack could lose data or become corrupted when multiple processes try to write them concurrently. | ||
|
||
V6 introducing a file locking mechanism previously only available on the `alias` file and a process of resolving conflicts based on timestamps. | ||
|
||
But that comes with breaking changes to to reduce the risk of "getting around" the safeties. | ||
|
||
## Breaking changes related to the Config Stack | ||
|
||
- AuthInfo.getFields now returns a read-only object. Use AuthInfo.update to change values in the fields. | ||
- `setContents` method is no longer available in the ConfigFile stack. Use `update` to merge in multiple props, or `set/unset` on a single prop. | ||
- `write` and `writeSync` method no longer accepts a param. Use other methods (`set`, `unset`, `update) to make modifications, then call write()/writeSync() to do the write. | ||
- the use of lodash-style `get`/`set` (ex: `set('foo.bar.baz[0]', 3)`) no longer works. | ||
- You can no longer override the `setMethod` and `getMethod`` when extending classes built on ConfigFile. Technically you could override get/set, but DON'T! | ||
- Everything related to tokens/tokenConfig is gone | ||
|
||
## Unrelated changes that we did because it's a major version | ||
|
||
- node18+ only, compiles to es2022 | ||
- move `uniqid`` to a shared function, outside of testSetup | ||
|
||
## Previously deprecated items that are now removed | ||
|
||
- removed sfdc.isInternalUrl. Use new SfdcUrl(url).isInternalUrl() | ||
- removed sfdc.findUppercaseKeys. There is no replacement. | ||
- removed SchemaPrinter. There is no replacement. |
cdfdc79
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger Benchmarks - ubuntu-latest
Child logger creation
454502
ops/sec (±7.88%
)456074
ops/sec (±8.86%
)1.00
Logging a string on root logger
511915
ops/sec (±10.04%
)486490
ops/sec (±11.82%
)0.95
Logging an object on root logger
354640
ops/sec (±11.58%
)396049
ops/sec (±14.14%
)1.12
Logging an object with a message on root logger
268703
ops/sec (±12.64%
)234578
ops/sec (±14.80%
)0.87
Logging an object with a redacted prop on root logger
271280
ops/sec (±13.81%
)281092
ops/sec (±17.79%
)1.04
Logging a nested 3-level object on root logger
3848
ops/sec (±206.98%
)1527
ops/sec (±243.28%
)0.40
This comment was automatically generated by workflow using github-action-benchmark.
cdfdc79
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logger Benchmarks - windows-latest
Child logger creation
486930
ops/sec (±0.53%
)406802
ops/sec (±1.02%
)0.84
Logging a string on root logger
553335
ops/sec (±14.34%
)436839
ops/sec (±11.55%
)0.79
Logging an object on root logger
317674
ops/sec (±18.03%
)283586
ops/sec (±24.21%
)0.89
Logging an object with a message on root logger
167111
ops/sec (±22.69%
)160443
ops/sec (±25.39%
)0.96
Logging an object with a redacted prop on root logger
171303
ops/sec (±21.30%
)144715
ops/sec (±25.27%
)0.84
Logging a nested 3-level object on root logger
137137
ops/sec (±18.70%
)112494
ops/sec (±22.40%
)0.82
This comment was automatically generated by workflow using github-action-benchmark.