@salesforce/core 8.24.1 → 8.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,18 +141,20 @@ class AuthRemover extends kit_1.AsyncOptionalCreatable {
141
141
  .filter((k) => !!k)
142
142
  .reduce((x, y) => x.concat(y), []);
143
143
  const allKeys = keysWithUsername.concat(keysWithAlias);
144
- this.logger.debug(`Found these config keys to remove: ${allKeys.join(',')}`);
145
- allKeys.forEach((key) => {
146
- try {
147
- config.unset(key);
148
- }
149
- catch {
150
- this.logger.debug(`Failed to remove ${key}`);
151
- }
152
- });
153
- // prevent ConfigFile collision bug
154
- // eslint-disable-next-line no-await-in-loop
155
- await config.write();
144
+ if (allKeys.length) {
145
+ this.logger.debug(`Found these config keys to remove: ${allKeys.join(',')}`);
146
+ allKeys.forEach((key) => {
147
+ try {
148
+ config.unset(key);
149
+ }
150
+ catch {
151
+ this.logger.debug(`Failed to remove ${key}`);
152
+ }
153
+ });
154
+ // prevent ConfigFile collision bug
155
+ // eslint-disable-next-line no-await-in-loop
156
+ await config.write();
157
+ }
156
158
  }
157
159
  }
158
160
  }
@@ -163,7 +165,7 @@ class AuthRemover extends kit_1.AsyncOptionalCreatable {
163
165
  */
164
166
  async unsetAliases(username) {
165
167
  this.logger.debug(`Clearing aliases for username: ${username}`);
166
- const existingAliases = this.stateAggregator.aliases.getAll(username);
168
+ const existingAliases = this.getAliases(username);
167
169
  if (existingAliases.length === 0)
168
170
  return;
169
171
  this.logger.debug(`Found these aliases to remove: ${existingAliases.join(',')}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "8.24.1",
3
+ "version": "8.24.2",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/index",
6
6
  "types": "lib/index.d.ts",