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

feat: migrate from @salesforce/core v6 -> v7 #5556

Merged
merged 24 commits into from Apr 30, 2024
Merged

Conversation

daphne-sfdc
Copy link
Contributor

@daphne-sfdc daphne-sfdc commented Apr 25, 2024

What does this PR do?

Migrates @salesforce/core from v6.7.4 -> v7.3.1

This upgrade means we are able to support Core v7 in our other dependencies, so the following dependencies are also migrated from Core v6 -> v7 in this PR:

  1. @salesforce/source-deploy-retrieve - v10.3.3 -> v11.1.2
  2. @salesforce/source-tracking - v5.1.11 -> v6.0.4
  3. @salesforce/apex-node - v4.0.5 -> v6.0.0
  4. @salesforce/templates - v60.1.0 -> v60.1.2
  5. jsforce v2.0.0-beta.29 -> @jsforce/jsforce-node v3.2.0

Additional changes:

  1. Changed the import of @salesforce/core/testSetup to use top-level imports
  2. Replaced all usages of Interfaces with Types to match the new standards
  3. Fixed the mocking of @salesforce/core in workspaceContextUtils.test.ts unit test to make it pass

What issues does this PR fix or reference?

@W-15472197@

Functionality Before

Extensions monorepo uses v6 of @salesforce/core

Functionality After

Extensions monrepo uses v7 of @salesforce/core, which means we are now able to pull in new features from our shared libraries

@daphne-sfdc daphne-sfdc marked this pull request as ready for review April 29, 2024 15:14
@daphne-sfdc daphne-sfdc requested a review from a team as a code owner April 29, 2024 15:14
@@ -4,6 +4,7 @@
* Licensed under the BSD 3-Clause license.
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import { ListMetadataQuery } from '@jsforce/jsforce-node/lib/api/metadata';
Copy link
Contributor

Choose a reason for hiding this comment

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

@daphne-sfdc can you check to see if this is exposed at the module level?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2024-04-29 at 2 32 53 PM

It seems like ListMetadataQuery does exist at the top level but it refers to something else? I did have to change the import to import ListMetadataQuery from '@jsforce/jsforce-node' without the curly braces.
Screenshot 2024-04-29 at 2 33 54 PM

@@ -23,10 +23,10 @@ export const stopTelemetry = (): Promise<void> => {
return Promise.resolve();
};

export interface TelemetryModelJson extends JsonMap {
export type TelemetryModelJson = JsonMap & {
Copy link
Contributor

Choose a reason for hiding this comment

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

@daphne-sfdc I don't believe JsonMap is necessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@peternhale The double negative means you think it is necessary and what's currently there is fine? Or did you actually mean JSONMap is not necessary?

Copy link
Contributor

Choose a reason for hiding this comment

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

not necessary

@@ -5,12 +5,12 @@
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/

import { DescribeSObjectResult } from '@jsforce/jsforce-node';
Copy link
Contributor

Choose a reason for hiding this comment

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

We already moved to jsforce-node! 🍠

@daphne-sfdc daphne-sfdc merged commit 60957b5 into develop Apr 30, 2024
12 checks passed
@daphne-sfdc daphne-sfdc deleted the daphne/core-v6-v7 branch April 30, 2024 19:55
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.

None yet

4 participants