tokenbridge-contracts
tokenbridge-contracts copied to clipboard
Migrate from npm to yarn
I noticed that yarn
package manager works much faster than the default npm
. Also, yarn
is used in the monorepo, so I propose to use it in this repo as well.
While changes delta in this PR is insane, there are only a few things were done:
- Move
./contracts/*
to./contracts/contracts/*
, update import paths in deploy scripts. - Add
contracts
,deploy
,upgrade
workspaces to the rootpackage.json
- Remove npm's
package-lock.json
files, generateyarn.lock
by runningyarn install
. As a side effect, this caused a lot of dependency updates. - Enable linting for
./deploy
and./upgrade
, it was already configured previously, but was not run. - Run
yarn lint:js:fix
andyarn lint:sol:fix
to fix appeared lint errors. - Replace usages of
npm
withyarn
commands in docs, scripts, Dockerfiles, etc.
Could you share ideas why previously the lint does not require such changes for the contracts?
why is it require to move contracts to ./contracts/contracts/
instead of ./contracts
?
Could you share ideas why previously the lint does not require such changes for the contracts?
I think some linting rules were changed or added to the new version of solhint.
why is it require to move contracts to
./contracts/contracts/
instead of./contracts
?
That is the recommended way to use yarn workspaces, to keep each workspace code and dependencies in its own directory.