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

chore: upgrade deps with npm vulnerability #106

Closed
wants to merge 3 commits into from

Conversation

Balvajs
Copy link
Contributor

@Balvajs Balvajs commented Mar 19, 2024

The @semantic-release/npm dependency reports vulnerability because it's dependent on npm.
With https://github.com/semantic-release/npm/releases/tag/v11.0.3 the vulnerability was removed, and it's also the last version before dropping support for Node v18.

Together with the upgrade of @semantic-release/npm the https://github.com/semantic-release/github/releases/tag/v9.2.6 can be safely upgraded because it's last version before dropping support for Node v18.

Closes #99

BREAKING CHANGE:
Drop support for Node v16 and v19. Supported Node versions are now ^18.17 or >=20.

@Balvajs Balvajs force-pushed the fix-npm-vulnerability branch from db0bc22 to a2b50ba Compare March 19, 2024 10:40
@Balvajs Balvajs force-pushed the fix-npm-vulnerability branch from a2b50ba to e2711bf Compare March 19, 2024 10:41
@Balvajs
Copy link
Contributor Author

Balvajs commented Mar 19, 2024

@TheUnderScorer I don't know if you want to keep Node v18 support or not, I chose a less aggressive upgrade. However, if you are willing to drop support for v18, there is a newer version of both libraries:
https://github.com/semantic-release/github/releases
https://github.com/semantic-release/npm/releases

@Balvajs Balvajs marked this pull request as ready for review March 20, 2024 08:21
@Balvajs Balvajs requested a review from TheUnderScorer as a code owner March 20, 2024 08:21
@TheUnderScorer
Copy link
Owner

Thanks for the PR @Balvajs. Pls rebase on the master branch so that the CI can run properly.

BTW. I'm not sure if this change won't break the plugin, since the @semantic-release/npm package became ESM only with this version, but let's see if the tests will pass ;)

@TheUnderScorer
Copy link
Owner

TheUnderScorer commented Apr 10, 2024

As I expected 😔.
Sadly, NX still doesn't support ESM executors (there is a ongoing PR for this), so until this is implemented I won't be able to merge it.

I will try to experiment with some workarounds, because It would be good to update semantic-release to latest version as well, but it will take some time.

@Balvajs
Copy link
Contributor Author

Balvajs commented Apr 10, 2024

@TheUnderScorer I will try to make it work, I am using pure ESM dependencies in executors in our company's NX monorepo and it works. It's using dynamic import syntax that's not nice, but it gets the job done and we can keep using the latest package versions:

	const execa = await (new Function('return import("execa")')() as Promise<
		typeof import('execa')
	>);

@corwestermaniddink
Copy link

@TheUnderScorer @Balvajs Could this merge please be fixed and take place?

@Balvajs
Copy link
Contributor Author

Balvajs commented Jul 9, 2024

@corwestermaniddink I wasn't able to make it work 😕 And we switched to https://github.com/jscutlery/semver, so I won't be digging into this anymore and close the PR.

@Balvajs Balvajs closed this Jul 9, 2024
@corwestermaniddink
Copy link

corwestermaniddink commented Jul 9, 2024

@corwestermaniddink I wasn't able to make it work 😕 And we switched to https://github.com/jscutlery/semver, so I won't be digging into this anymore and close the PR.

Please be-aware that you use "semantic-release" npm pkg in your package.json, they use an old version of "semver" npm pkg with this vulnerability: GHSA-c2qf-rxjj-qqgw in their latest version.

"semantic-release" didn't update for 4 years "semver" in their package.json!

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.

Please update @semantic-release/npm version
3 participants