yarn
creates yarn.lock
(whereas npm
creates package-lock.json
). They both use package.json
with the same structure (but with different algorithms).You should follow the official guide.
1# check version
2yarn --version
3# 4.1.1
Official: yarn remove | Yarn
1# Remove a package
2yarn remove <package>
Official: yarn info | Yarn
1yarn info lodash
1# npx like?
2# No, just use npx!
Official: yarn up | Yarn
1# to the latest release
2yarn up lodash
3
4# with confirm
5yarn up lodash -i
6
7# with version
8yarn up [email protected]
9
10# all packages inside
11yarn up @babel/*
12
13# all packages containing "jest"
14yarn up *jest*
1yarn version patch # 1.0.0 -> 1.0.1 (fixes)
2yarn version minor # 1.0.1 -> 1.1.0 (new features )
3yarn version major # 1.1.0 -> 2.0.0 (completely new APIs)