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

salesforce-alm package is deprecated #2787

Closed
svishalkumar06 opened this issue Mar 22, 2024 · 8 comments
Closed

salesforce-alm package is deprecated #2787

svishalkumar06 opened this issue Mar 22, 2024 · 8 comments
Labels
more information required Issue requires more information or a response from the customer

Comments

@svishalkumar06
Copy link

svishalkumar06 commented Mar 22, 2024

Hi,

Previously we were using sfdx-cli V7 Now we have migrated to @salesforce/cli V2 version.

So previously we were using a salesforce-alm and salesforcedx packages in sfdx-cli.

But In V2 version of salesforce cli those salesforce-alm and salesforcedx packages are deprecated. So what is the replacement for those functionalities ?

We were using following functionality from salesforce-alm package -

getting getMetadataTypeFromSourcePath from require('salesforce-alm/dist/lib/source/metadataTypeFactory')
getting metadataRegistry from require('salesforce-alm/dist/lib/source/metadataRegistry')
getting srcDevUtil from require('salesforce-alm/dist/lib/core/srcDevUtil')

How should we use these functionality in new salesforce cli package (@salesforce/cli) ?

@svishalkumar06 svishalkumar06 added the investigating We're actively investigating this issue label Mar 22, 2024
Copy link

Hello @svishalkumar06 👋 It looks like you didn't include the full Salesforce CLI version information in your issue.
Please provide the output of version --verbose --json for the CLI you're using (sf or sfdx).

A few more things to check:

  • Make sure you've provided detailed steps to reproduce your issue.
    • A repository that clearly demonstrates the bug is ideal.
  • Make sure you've installed the latest version of Salesforce CLI. (docs)
    • Better yet, try the rc or nightly versions. (docs)
  • Try running the doctor command to diagnose common issues.
  • Search GitHub for existing related issues.

Thank you!

Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@github-actions github-actions bot added more information required Issue requires more information or a response from the customer and removed investigating We're actively investigating this issue labels Mar 22, 2024
@svishalkumar06
Copy link
Author

{
"architecture": "win32-x64",
"cliVersion": "@salesforce/cli/2.17.14",
"nodeVersion": "node-v20.11.0",
"osVersion": "Windows_NT 10.0.22000",
"rootPath": "C:\Users\vishal.r.kumar.singh\AppData\Roaming\npm\node_modules\@salesforce\cli",
"shell": "cmd.exe",
"pluginVersions": [
"@oclif/plugin-autocomplete 3.0.1 (core)",
"@oclif/plugin-commands 3.0.6 (core)",
"@oclif/plugin-help 6.0.5 (core)",
"@oclif/plugin-not-found 3.0.3 (core)",
"@oclif/plugin-plugins 4.1.7 (core)",
"@oclif/plugin-search 1.0.6 (core)",
"@oclif/plugin-update 4.1.3 (core)",
"@oclif/plugin-version 2.0.6 (core)",
"@oclif/plugin-warn-if-update-available 3.0.2 (core)",
"@oclif/plugin-which 3.0.8 (core)",
"@salesforce/cli 2.17.14 (core)",
"apex 2.3.20 (core)",
"auth 2.8.26 (core)",
"data 2.6.3 (core)",
"deploy-retrieve 1.20.0 (core)",
"dev 2.1.12 (user)",
"info 3.0.1 (core)",
"limits 3.0.1 (core)",
"login 2.0.1 (core)",
"marketplace 1.0.2 (core)",
"org 2.11.8 (core)",
"schema 3.0.1 (core)",
"settings 2.0.2 (core)",
"sobject 0.2.15 (core)",
"source 2.11.0 (core)",
"telemetry 3.1.0 (core)",
"templates 55.5.18 (core)",
"trust 3.0.2 (core)",
"user 2.3.42 (core)"
]
}

Copy link

Hello @svishalkumar06 👋 None of the versions of sf you shared match the latest release.

Shared: 2.17.14
Latest: 2.33.3

Update to the latest version of Salesforce CLI (docs) and confirm that you're still seeing your issue.
You can also try the rc and nightly releases! (docs)

After updating, share the full output of sf version --verbose --json

@svishalkumar06
Copy link
Author

Hi,

We have not upgraded our node project to the ESM Module, we are using the Common JS Module for now for that reason we are using salesforce cli version 2.17.14.

We are using V2 commands and cli So please suggest us how can we use salesforce-alm libraries in V2 Salesforce cli.

@cristiand391
Copy link
Member

Hey, for the first two you should use the SDR library:
https://github.com/forcedotcom/source-deploy-retrieve

and sfdx-core for the last one:
https://github.com/forcedotcom/sfdx-core

note that salesforce-alm was used by commands back then and there might not be 1-1 equivalients in SDR/sfdx-core

@svishalkumar06
Copy link
Author

@cristiand391 Can you suggest If we continue to use salesforce-alm libraries in our project as there is no 1-1 equivalents replacement Is there will be an issue in the future?

@cristiand391
Copy link
Member

@svishalkumar06 I would suggest moving to SDR and sfdx-core.
If you can't find a speicfic replacement in the libraries you can post here and we might be able to help: https://github.com/forcedotcom/cli/discussions/categories/q-a

Is there will be an issue in the future?

yeah, outdated dependencies might start to notice in the future (salesforce-alm was using SDR v7, we are at SDR v10 now), also could break in any node update if it was using a deprecated API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information required Issue requires more information or a response from the customer
Projects
None yet
Development

No branches or pull requests

2 participants