Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: don't mutate params #1047

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

mshanemc
Copy link
Contributor

@mshanemc mshanemc commented Apr 4, 2024

What does this PR do?

fix code flagged by https://eslint.org/docs/latest/rules/no-param-reassign
some changes to messages for the es2022 error changes (namedError => sfError)

[skip-validate-pr]

@mshanemc mshanemc changed the base branch from main to sm/sfError April 4, 2024 16:24
Base automatically changed from sm/sfError to sm/core-7-deprecations April 8, 2024 19:10
@mshanemc mshanemc requested a review from a team as a code owner April 8, 2024 19:59
@@ -848,26 +840,26 @@ export class AuthInfo extends AsyncOptionalCreatable<AuthInfo.Options> {
let authConfig: AuthFields;

if (options) {
options = structuredClone(options);
const clonedOptions = structuredClone(options);
Copy link
Contributor

Choose a reason for hiding this comment

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

This one would be my biggest concern about whether the mutation was causing side effect behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ooh, good point, that could be bad.

We don't have full NUT coverage here (we're always either sfdx-url or JWT, never accessToken or web, device, etc).

I think'll I'll put this back like it was with a TODO

@mshanemc mshanemc merged commit b9050fc into sm/core-7-deprecations Apr 10, 2024
66 checks passed
@mshanemc mshanemc deleted the sm/no-mutate-params branch April 10, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants