Skip to content

Instantly share code, notes, and snippets.

@laudaikinhdi
Forked from wojtekmaj/.gitignore
Created February 8, 2023 04:47
Show Gist options
  • Save laudaikinhdi/f044c727dbf00439403ec75129d97a50 to your computer and use it in GitHub Desktop.
Save laudaikinhdi/f044c727dbf00439403ec75129d97a50 to your computer and use it in GitHub Desktop.

Revisions

  1. @wojtekmaj wojtekmaj revised this gist Sep 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion upgrade-yarn-to-berry.sh
    Original file line number Diff line number Diff line change
    @@ -16,4 +16,4 @@ yarn plugin import interactive-tools
    yarn

    # Commits the changes
    git commit . -m "Upgrade Yarn to Yarn Berry (v2)"
    git add . && git commit -m "Upgrade Yarn to Yarn Berry (v2)"
  2. @wojtekmaj wojtekmaj revised this gist Jul 31, 2020. 1 changed file with 12 additions and 4 deletions.
    16 changes: 12 additions & 4 deletions upgrade-yarn-to-berry.sh
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,19 @@
    #!/bin/sh
    # Upgrade Yarn to Berry

    # Upgrade Yarn to Berry (latest Yarn 2 version known to Yarn 1)
    yarn set version berry
    # Upgrade Yarn Berry to latest version now that we know where to download it from (Yarn 1 has no clue)

    # Upgrade Yarn Berry to latest version now that Yarn knows where to download it from
    yarn set version latest
    # Set nodeLinker to node-modules - this is optional but 100% guarantees backwards compatibility

    # (optional) Set nodeLinker to node-modules - this 100% guarantees backwards compatibility
    yarn config set nodeLinker node-modules
    # Adds `yarn upgrade-interactive` command back

    # (optional) Adds `yarn upgrade-interactive` command back
    yarn plugin import interactive-tools

    # Reinstalls project using Yarn 2. This will also update your yarn.lock file, but will NOT sneakily upgrade the dependencies
    yarn

    # Commits the changes
    git commit . -m "Upgrade Yarn to Yarn Berry (v2)"
  3. @wojtekmaj wojtekmaj revised this gist Jul 31, 2020. No changes.
  4. @wojtekmaj wojtekmaj revised this gist Jul 31, 2020. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions upgrade-yarn-to-berry.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +1,11 @@
    #!/bin/sh
    # Upgrade Yarn to Berry
    yarn set version berry
    # Upgrade Yarn Berry to latest version now that we know where to download it from
    # (Yarn 1 has no clue)
    # Upgrade Yarn Berry to latest version now that we know where to download it from (Yarn 1 has no clue)
    yarn set version latest
    # Set nodeLinker to node-modules - this is optional but 100% guarantees backwards
    # compatibility
    # Set nodeLinker to node-modules - this is optional but 100% guarantees backwards compatibility
    yarn config set nodeLinker node-modules
    # Adds `yarn upgrade-interactive` command back
    yarn plugin import interactive-tools
    # Reinstalls project using Yarn 2. This will also update your yarn.lock file, but will
    # NOT sneakily upgrade the dependencies
    # Reinstalls project using Yarn 2. This will also update your yarn.lock file, but will NOT sneakily upgrade the dependencies
    yarn
  5. @wojtekmaj wojtekmaj created this gist Jul 31, 2020.
    3 changes: 3 additions & 0 deletions .gitignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    .yarn/*
    !.yarn/releases
    !.yarn/plugins
    14 changes: 14 additions & 0 deletions upgrade-yarn-to-berry.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    #!/bin/sh
    # Upgrade Yarn to Berry
    yarn set version berry
    # Upgrade Yarn Berry to latest version now that we know where to download it from
    # (Yarn 1 has no clue)
    yarn set version latest
    # Set nodeLinker to node-modules - this is optional but 100% guarantees backwards
    # compatibility
    yarn config set nodeLinker node-modules
    # Adds `yarn upgrade-interactive` command back
    yarn plugin import interactive-tools
    # Reinstalls project using Yarn 2. This will also update your yarn.lock file, but will
    # NOT sneakily upgrade the dependencies
    yarn