-
Notifications
You must be signed in to change notification settings - Fork 139
Wr/corev3 #598
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
Wr/corev3 #598
Conversation
e3acc2e
to
16a218a
Compare
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.
approved pending 1 return type confirmation
several comments about things outside this repo/pr
"@salesforce/ts-sinon": "^1.1.2", | ||
"@types/archiver": "^5.1.1", | ||
"@types/deep-equal-in-any-order": "^1.0.1", | ||
"@types/jsforce": "^1.9.38", |
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.
that's pretty exciting!
void connection.metadata | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore _invoke is private on the jsforce metadata object, and cancelDeploy is not an exposed method | ||
._invoke('cancelDeploy', { id: this.id }) |
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.
please make a WI to
- add a proper
cancel
method to the metadata class - update this code to use it instead of this nastiness
const fromConnection = await ComponentSet.fromConnection({ | ||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access,@typescript-eslint/no-unsafe-assignment | ||
usernameOrConnection: (await Aliases.fetch(org.username)) || org.username, | ||
usernameOrConnection: (await GlobalInfo.create()).aliases.get(org.username) || org.username, |
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.
confirm that the new aliases.get
returns something falsy
prefer ?? over || if it's returning undefined/null
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.
@mshanemc @WillieRuemmele as in this case org.username
is either an username or an alias we can use here usernameOrConnection: (await GlobalInfo.create()).aliases.resolveUsername(org.username),
I think you need an username to use aliases.get()
to get an alias. And it seems that the documentation for Aliases.fetch()
is wrong, because this method returns an username not an alias.
import { createSandbox, SinonSandbox } from 'sinon'; | ||
import { AnyJson } from '@salesforce/ts-types'; | ||
import { nls } from '../../../src/i18n'; | ||
import { ToolingDeployStatus, ComponentStatus } from '../../../src/client'; |
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.
is there an eslint rule for alphabetizing imports that we can turn on to have less of this happen?
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.
there is... but I couldn't get it working to match what my IDE did. I'll turn off that setting
* feat!: no hardcoded api version * feat: componentSet can omit version * chore: adding types for SDR * feat: export currentApiVersion * fix: set version from org, coverageReport * test: retrieve uses connection apiVersion * feat: async versions of getObject and getPackageXml * test: updates for breaking changes * chore: adding types for SDR * refactor: async write (pr feedback) * chore: adding types for SDR * Wr/corev3 (#598) * chore: migrating to core3 * chore: fix UT method * chore: adding types for SDR * chore: resolve alias to username Co-authored-by: mshanemc <shane.mclaughlin@salesforce.com> * chore: fix deploy cancel method * fix: handle BooleanString properly * fix: reverse false value * fix: another place allowing BooleanString * chore: adding types for SDR * fix: type array and destructure tasks * chore: adding types for SDR * test: correct stub for fs * refactor: pr and cleanup * feat: use core error/messages * feat: use core errors and messages, test changes from v5 main * chore: auto-update metadata coverage in METADATA_SUPPORT.md * feat: use jsforce2 rest deploys * chore: auto-update metadata coverage in METADATA_SUPPORT.md * ci: external nuts * chore: bump kit * fix: don't send rest param to mdapi * chore: bump jsforce * test: adjust ut for the new jsforce mdapi * chore: auto-update metadata coverage in METADATA_SUPPORT.md * chore: update core lib Co-authored-by: Willie Ruemmele <willieruemmele@gmail.com> Co-authored-by: Steve Hetzel <shetzel@salesforce.com>
What does this PR do?
bumps
@salesforce/core
to v3 - and planned as part of a major 6.0.0 releaseWhat issues does this PR fix or reference?
@W-10743680@