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

Switch to npm #1055

Merged
merged 12 commits into from
Sep 9, 2022
Merged

Switch to npm #1055

merged 12 commits into from
Sep 9, 2022

Conversation

chmanie
Copy link
Member

@chmanie chmanie commented Jun 20, 2022

yarn was great at a time when npm was lacking the speed, the consistency and the features it provided. These days are over now as npm has caught up. I propose to switch this project (back?) to npm and with that improve compatibility (node version usually determines npm version) and remove dependencies while at the same time create consistency with all other Colony projects.

I used https://github.com/imsnif/synp to convert the yarn.lock to a package-lock.json. The process is like so:

  1. Freshly clone the repository with the newest yarn.lock file
  2. Run yarn --frozen-lockfile
  3. Remove any existing package-lock.json
  4. Run npx synp --source-file yarn.lock --with-workspace
  5. Run npm install
  6. After that you should end up with a valid package-lock.json

We also move from Meta to Microsoft 😬

Changes for the run-scripts:

  • To run executables from the .bin folder, in the package.json one does not need to use yarn or yarn run, so I removed those
  • yarn EXECUTABLE in other places was replaced with npx EXECUTABLE (the npm canonical way to execute the .bin executables)
  • yarn (run) SCRIPT in the package.json was replaced with npm run SCRIPT

It seems to be going through fine. We still have to test/adjust the following:

  • Does the reputation miner still work?
  • We need to adjust various docker images I assume, especially rebuild the reputation miner's
  • We probably also need to adjust things on some production servers?

Note: as this PR is based on top of #1052 I suggest to merge that PR first and have the CircleCI checks run on this one

This PR closes #1050.

@chmanie chmanie force-pushed the maint/switch-to-npm branch 3 times, most recently from 9ae90c7 to 63b383f Compare June 20, 2022 22:07
@chmanie chmanie changed the base branch from maint/major-upgrades to develop June 20, 2022 22:19
@chmanie chmanie force-pushed the maint/switch-to-npm branch from 121486b to 6ad1238 Compare June 20, 2022 22:22
@chmanie chmanie changed the base branch from develop to maint/major-upgrades June 20, 2022 22:24
@chmanie chmanie changed the title Switch to npm ? Switch to npm Jun 20, 2022
@area area force-pushed the maint/major-upgrades branch from cf302ab to ce2eedc Compare June 21, 2022 08:14
@chmanie chmanie force-pushed the maint/switch-to-npm branch 4 times, most recently from fd80b2d to ef1b57b Compare June 21, 2022 09:32
@chmanie chmanie marked this pull request as ready for review June 21, 2022 15:08
@chmanie chmanie self-assigned this Jun 21, 2022
@area area force-pushed the maint/switch-to-npm branch from ef1b57b to e3969a3 Compare June 22, 2022 14:47
Base automatically changed from maint/major-upgrades to develop June 22, 2022 17:47
@area area force-pushed the maint/switch-to-npm branch from e3969a3 to f5bd456 Compare July 6, 2022 12:22
@rdig
Copy link
Member

rdig commented Jul 13, 2022

Can we please be kept in the look as when this makes it's way into develop as it will affect the dapp's provision script

@chmanie chmanie force-pushed the maint/switch-to-npm branch 11 times, most recently from 5cca839 to 1c88401 Compare August 11, 2022 00:19
@chmanie chmanie force-pushed the maint/switch-to-npm branch from 1c6fe8b to 3f4eea8 Compare August 11, 2022 00:26
@chmanie
Copy link
Member Author

chmanie commented Aug 11, 2022

It works! All the tests are passing and I also tested the reputation miner locally.

@chmanie chmanie force-pushed the maint/switch-to-npm branch from bda68c7 to f540696 Compare September 7, 2022 10:00
@chmanie chmanie force-pushed the maint/switch-to-npm branch 3 times, most recently from e9660e5 to 542bb94 Compare September 7, 2022 11:11
@chmanie chmanie force-pushed the maint/switch-to-npm branch from 542bb94 to ca926b1 Compare September 7, 2022 11:16
@chmanie
Copy link
Member Author

chmanie commented Sep 7, 2022

Rebased and working again! I applied npm audit fix which should have resolved all the security issues

@kronosapiens kronosapiens merged commit 9b7f96c into develop Sep 9, 2022
@kronosapiens kronosapiens deleted the maint/switch-to-npm branch September 9, 2022 19:10
@kronosapiens
Copy link
Member

@rdig heads up this has been merged to develop

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

Successfully merging this pull request may close these issues.

Readme changes
3 participants