Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • AlekSIS/libs/django-yarnpkg
  • edward/django-yarnpkg
  • detiste-guest/django-yarnpkg
3 results
Show changes
Commits on Source (7)
Version 6.0.3 (2022-11-01)
=====================================================
* Fix compatibility with Django 4.1
* Pass all arguments of yarn commands to yarn
* [Dev] Fix tests
Version 6.0.2 (2022-09-05)
=====================================================
......
......@@ -8,7 +8,7 @@ from ..exceptions import YarnNotInstalled
class BaseYarnCommand(BaseCommand):
"""Base management command with yarn support"""
requires_system_checks = False
requires_system_checks = []
# add fake .options_list for Django>=1.10
if not hasattr(BaseCommand, 'option_list'):
......
from ...yarn import yarn_adapter
from ..base import BaseYarnCommand
from argparse import REMAINDER
class Command(BaseYarnCommand):
args = 'command'
......@@ -8,7 +8,7 @@ class Command(BaseYarnCommand):
yarn_adapter._node_modules_root)
def add_arguments(self, parser):
parser.add_argument('command', nargs='*')
parser.add_argument('command', nargs=REMAINDER)
def handle(self, *args, **options):
super(Command, self).handle(*args, **options)
......
......@@ -35,3 +35,12 @@ DATABASES = {
'PORT': '',
}
}
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {},
},
]
......@@ -24,8 +24,8 @@ class BaseYarnCase(TestCase):
def tearDown(self):
self._remove_node_modules_root()
def _remove_components_root(self):
"""Remove components root if exists"""
def _remove_node_modules_root(self):
"""Remove node_modules root if exists"""
if os.path.exists(TEST_NODE_MODULES_ROOT):
shutil.rmtree(TEST_NODE_MODULES_ROOT)
......
......@@ -72,7 +72,6 @@ class SimpleNodeModulesFinderCase(_MakeDirsTestCase):
"""
If both folders exist, only 'yarn_node_modules' should be used.
"""
self.makedirs(os.path.join(conf.NODE_MODULES_ROOT, 'node_modules'))
self.test_list_existent(leaf_name='node_modules')
......
......@@ -98,14 +98,11 @@ class YarnCommandCase(BaseYarnCase):
yarn_adapter.install = MagicMock()
self._orig_call = yarn_adapter.call_yarn
yarn_adapter.call_yarn = MagicMock()
self._orig_freeze = yarn_adapter.freeze
yarn_adapter.freeze = MagicMock()
def tearDown(self):
super(YarnCommandCase, self).tearDown()
yarn_adapter.install = self._original_install
yarn_adapter.call_yarn = self._orig_call
yarn_adapter.freeze = self._orig_freeze
def test_install_without_params(self):
"""Test that yarn install without param identical
......
from setuptools import setup, find_packages
version = '6.0.2'
version = '6.0.3'
setup(
name='django-yarnpkg',
......