scolladon / sfdx-git-delta

Generate the sfdx content in source format from two git commits
Other
441 stars 115 forks source link

SFDX git delta depends on unsupported and outdated libraries. #906

Open PawelWozniak opened 2 months ago

PawelWozniak commented 2 months ago

Issue verification check:

What is the problem?

Just installed plugin and got many warnings during this process, here is an output:

PS D:\git> sf plugins install sfdx-git-delta
? sfdx-git-delta isn't signed by Salesforce. Only install the plugin if you trust its creator. Do you want to continue the
installation? yes
Because you approved this plugin, you can avoid future installation confirmations by adding the plugin to the unsignedPluginAllowList.json file. For details, see https://developer.salesforce.com/docs/atlas.en-us.sfdx_setup.meta/sfdx_setup/sfdx_setup_allowlist.htm.
Finished digital signature check.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated rimraf@2.4.5: Rimraf versions prior to v4 are no longer supported
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated @oclif/screen@3.0.8: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated glob@6.0.4: Glob versions prior to v9 are no longer supported
npm warn deprecated @salesforce/command@5.3.9: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
npm warn deprecated fancy-test@2.0.42: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.
added 390 packages in 24s

It seems that it depends on old version or even libraries that are not recommended to use:

inflight@1.0.6: This module is not supported, and leaks memory. Do not use it.

What is the parameter and the value you used with it?

sf plugins install sfdx-git-delta

What is the expected result?

Plugin install without warning.

What is the actual result?

The user is getting many warnings.

Steps to reproduce

Unsinstall whole SF CLI so it remove also plugins. Install SF CLI. Install sfdx-git-delta with command sf plugins install sfdx-git-delta

Execution context

Operating System: Windows 11

yarn version: none

node version: v20.17.0

git version: 2.46.0.windows.1

sfdx version: @salesforce/cli/2.56.7 win32-x64 node-v20.17.0

sgd plugin version: sfdx-git-delta 5.42.1

More information (optional)

scolladon commented 2 months ago

Hi @PawelWozniak !

Thanks for raising this issue and thanks for contributing in making this project better!

It seems to be related to dependency of library we are using. And also it seems to be related to the migration the plugin V2 which is way more up to date. We have a work item to follow this but we still have a lot of users using old sfdx so we don't want to break their installations.

Next fix / feature will come with a dependency upgrade, we'll see at that moment if it is better

PawelWozniak commented 2 months ago

Thank you for the update. In my opinion sf cli is already so long on the market that most of the teams and developers should be already using sf, because of that I would consider removing sfdx compatibility soon. Salesforce itself is already removing old sfdx commands https://github.com/forcedotcom/cli/issues/2974

scolladon commented 2 months ago

I'll have a look at the download trends at the end of september and see if it is the right time. I'll also think of how to do this upgrade (which channel, how to communicate, etc)

nvuillam commented 1 month ago

@scolladon if you upgrade your plugin to sf cli base arch and keep the same name of commands & parameters, existing calls to sfdx-git-delta will work exactly the same undepending they are called with sfdx or sf :)

Tested with many of the 100 commands of sfdx hardis v5 alpha

https://github.com/hardisgroupcom/sfdx-hardis/pull/770

I struggled a while for my upgrade so if you need help, you know where to find me :)

It starts with deleting all your files -> commit -> create a new plugin with the sf command -> revert the commit where you deleted everything -> solve conflicts (priority to new sf core items -> reinstall missing dependencies (as u have a brand new package.json) -> solve TS issues 😅

scolladon commented 1 month ago

Hi @nvuillam !

Thanks for those information

Can I understand that I can build a plugin using plugin V2 architecture and it will be executable by the old sfdx/cli application ? Old sfdx/cli is upward compatible with plugin V2 architecture ?

nvuillam commented 1 month ago

@scolladon exactly :) My cicd pipelines work exactly the same with sfdx hardis v4 & v5 alpha :)

scolladon commented 1 month ago

That's a very good news 🤩 Thanks mate, I'll work on that soon