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

build: fix npm package conflicts #106

Merged
merged 3 commits into from
Oct 7, 2024
Merged

Conversation

diegocam
Copy link
Contributor

@diegocam diegocam commented Oct 7, 2024

When pulling this repo locally and running npm install I kept getting the following conflicting errors:

➜  merge-schedule-action git:(master) ✗ npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: vitest@2.1.1
npm ERR! Found: @types/node@17.0.42
npm ERR! node_modules/@types/node
npm ERR!   dev @types/node@"^17.0.42" from the root project
npm ERR!   @types/node@"*" from @types/mute-stream@0.0.4
npm ERR!   node_modules/@types/mute-stream
npm ERR!     @types/mute-stream@"^0.0.4" from @inquirer/core@9.2.1
npm ERR!     node_modules/@inquirer/core
npm ERR!       @inquirer/core@"^9.1.0" from @inquirer/confirm@3.2.0
npm ERR!       node_modules/@inquirer/confirm
npm ERR!         @inquirer/confirm@"^3.0.0" from msw@2.4.8
npm ERR!         node_modules/vitest/node_modules/msw
npm ERR!   1 more (@types/set-cookie-parser)
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @types/node@"^18.0.0 || >=20.0.0" from vitest@2.1.1
npm ERR! node_modules/vitest
npm ERR!   dev vitest@"^2.1.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: @types/node@22.7.4
npm ERR! node_modules/@types/node
npm ERR!   peerOptional @types/node@"^18.0.0 || >=20.0.0" from vitest@2.1.1
npm ERR!   node_modules/vitest
npm ERR!     dev vitest@"^2.1.1" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 

This PR updates some of those conflicting/outdated packages in package.json to prevent the npm errors.

You will notice that when updating these, I had to change some of the core testing structure. Some of those are as follows:

  1. Removed vitest-mock-process and replaced it with std-mocks https://github.com/gregberge/std-mocks as it is more up to date and simple to use.
  2. Updated msw to its latest version which changes rest. to http. https://mswjs.io/docs/migrations/1.x-to-2.x

@gr2m gr2m changed the title Fix NPM package conflicts build: fix npm package conflicts Oct 7, 2024
Copy link
Owner

@gr2m gr2m left a comment

Choose a reason for hiding this comment

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

Hey thanks a lot, this is great!

@gr2m gr2m merged commit 0f39279 into gr2m:master Oct 7, 2024
1 check passed
@gr2m-releaser
Copy link

gr2m-releaser bot commented Oct 7, 2024

🎉 This PR is included in version 2.4.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants