# HG changeset patch # User Goffi # Date 1623250207 -7200 # Node ID 2f6dac783c8e1e3d2fb315c370694dad69b64519 # Parent 1a5410981c4514bd82cb377c2e2d5748baf51b39 tasks(js_modules, sass): remove support for `npm`: `npm` cause trouble during installation, and it will be resource cousuming to find the source and maintain it in addition to `yarn`, thus `yarn` is for now kept and the only supported NodeJS package manager. diff -r 1a5410981c45 -r 2f6dac783c8e libervia/server/tasks/implicit/task_js_modules.py --- a/libervia/server/tasks/implicit/task_js_modules.py Sun Jun 06 19:40:07 2021 +0200 +++ b/libervia/server/tasks/implicit/task_js_modules.py Wed Jun 09 16:50:07 2021 +0200 @@ -16,7 +16,7 @@ async def prepare(self): if "js" not in self.resource.browser_modules: - raise exceptions.CancelError(f"No JS module needed") + raise exceptions.CancelError("No JS module needed") async def start(self): js_data = self.resource.browser_modules['js'] @@ -25,7 +25,7 @@ with package_path.open('w') as f: json.dump(package, f) - cmd = self.findCommand('yarnpkg', 'yarn', 'npm') + cmd = self.findCommand('yarnpkg', 'yarn') await self.runCommand(cmd, 'install', path=str(self.build_path)) try: diff -r 1a5410981c45 -r 2f6dac783c8e libervia/server/tasks/implicit/task_sass.py --- a/libervia/server/tasks/implicit/task_sass.py Sun Jun 06 19:40:07 2021 +0200 +++ b/libervia/server/tasks/implicit/task_sass.py Wed Jun 09 16:50:07 2021 +0200 @@ -1,11 +1,8 @@ #!/ur/bin/env python3 import json -from pathlib import Path -from sat.core.i18n import _ from sat.core.log import getLogger from sat.core import exceptions -from libervia.server.constants import Const as C from libervia.server.tasks import task @@ -46,7 +43,7 @@ with package_path.open('w') as f: json.dump(package, f, indent=4) - cmd = self.findCommand('yarnpkg', 'yarn', 'npm') + cmd = self.findCommand('yarnpkg', 'yarn') await self.runCommand(cmd, 'install', path=str(d_path)) self.WATCH_DIRS = list(sass_dirs)