def remove(dependencies: List[Dependency]) -> None: """ Remove one or more npm packages. """ sys_calls.run(["yarn", "remove"] + dependencies, cwd="frontend/") add_type_stubs() git.remind_to_commit("package.json and yarn.lock")
def upgrade(dependencies: List[Dependency]) -> None: """ Upgrade one or more out-of-date npm packages. """ sys_calls.run(["yarn", "upgrade"] + dependencies, cwd="frontend/") add_type_stubs() git.remind_to_commit("package.json and yarn.lock")
def add_dev(dependencies: List[Dependency]) -> None: """ Add one or more pip packages to dev. """ sys_calls.run(["yarn", "add", "--dev"] + dependencies, cwd="frontend/") add_type_stubs() git.remind_to_commit("package.json and yarn.lock")
def _freeze_requirements() -> None: """ Updates the requirements.txt file with new dependencies. """ with open('requirements.txt', 'w') as requirements: sys_calls.run(['pip', 'freeze'], stdout=requirements) git.remind_to_commit("requirements.txt")
def add(dependencies: List[Dependency]) -> None: """ Add one or more npm packages. """ sys_calls.run(["yarn", "add"] + dependencies, cwd='frontend/') git.remind_to_commit("package.json and yarn.lock")