Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

feat: add undo yvm effects on the shell commands #400

Merged
merged 12 commits into from
Jun 12, 2019

Conversation

iamogbz
Copy link
Contributor

@iamogbz iamogbz commented May 29, 2019

Description

  • Add nvm like deactivate and unload commands

Checklist

  • This PR has updated documentation
  • This PR has sufficient testing

DevQA

DevQA Prep

  • Please make install-watch

DevQA Steps

unload

  • Open a new shell
  • echo $YVM_DIR should show the location of yvm
  • which yarn should point to the shimmed yvm yarn
  • yvm unload
  • which yarn should point to the system installed yarn or nothing if none
  • echo $YVM_DIR should show nothing
  • yvm use should fail

deactivate

  • Open a new shell
  • echo $YVM_DIR should show the location of yvm
  • which yarn should point to the shimmed yvm yarn
  • yvm deactivate
  • which yarn should point to the system installed yarn or nothing if none
  • echo $YVM_DIR should still show yvm location
  • yvm use
  • which yarn should point to the version of yarn in your .yvmrc file

Comments

@iamogbz iamogbz changed the title Undo yvm effects on the shell feat: add undo yvm effects on the shell commands Jun 10, 2019
@iamogbz iamogbz marked this pull request as ready for review June 10, 2019 05:01
@@ -1,6 +1,9 @@
import os from 'os'
import path from 'path'
import fs from 'fs'
import { negate } from 'lodash'
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { negate } from 'lodash'
import negate from 'lodash/negate'

export const getPathEntries = shell =>
getCurrentPath(shell).split(getPathDelimiter(shell))

export const getNonYvmPathEntries = shell =>
getPathEntries(shell).filter(negate(isYvmPath))
Copy link
Contributor

Choose a reason for hiding this comment

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

why use a function for negation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I like the way it looks ☺️

@iamogbz iamogbz requested a review from noahnu June 11, 2019 16:08
@iamogbz iamogbz merged commit 32a2ebc into master Jun 12, 2019
@iamogbz iamogbz deleted the feature/add-undo-yvm-commands branch June 12, 2019 01:47
@yvm-bot
Copy link
Contributor

yvm-bot commented Jun 12, 2019

🎉 This PR is included in version 3.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@yvm-bot yvm-bot added the released Pull request has been successfully deployed label Jun 12, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
released Pull request has been successfully deployed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants