2
0
Fork 0

fix: freeze default versions for buefy, vue-resource

needed for sanity
This commit is contained in:
Lance Edgar 2024-08-28 19:51:55 -05:00
parent 29a0d6ba24
commit 749882671f
2 changed files with 11 additions and 11 deletions

View file

@ -210,7 +210,7 @@ def get_libver(
DeprecationWarning) DeprecationWarning)
return version return version
if not configured_only: if not configured_only:
return 'latest' return '0.9.25'
elif key == 'buefy.css': elif key == 'buefy.css':
# nb. this always returns something # nb. this always returns something
@ -232,7 +232,7 @@ def get_libver(
elif key == 'vue_resource': elif key == 'vue_resource':
if not configured_only: if not configured_only:
return 'latest' return '1.5.3'
elif key == 'fontawesome': elif key == 'fontawesome':
if not configured_only: if not configured_only:

View file

@ -60,7 +60,7 @@ class TestGetLibVer(TestCase):
def test_buefy_default(self): def test_buefy_default(self):
version = mod.get_libver(self.request, 'buefy') version = mod.get_libver(self.request, 'buefy')
self.assertEqual(version, 'latest') self.assertEqual(version, '0.9.25')
def test_buefy_custom_old(self): def test_buefy_custom_old(self):
self.config.setdefault('wuttaweb.buefy_version', '0.9.29') self.config.setdefault('wuttaweb.buefy_version', '0.9.29')
@ -84,11 +84,11 @@ class TestGetLibVer(TestCase):
def test_buefy_default_only(self): def test_buefy_default_only(self):
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29') self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
version = mod.get_libver(self.request, 'buefy', default_only=True) version = mod.get_libver(self.request, 'buefy', default_only=True)
self.assertEqual(version, 'latest') self.assertEqual(version, '0.9.25')
def test_buefy_css_default(self): def test_buefy_css_default(self):
version = mod.get_libver(self.request, 'buefy.css') version = mod.get_libver(self.request, 'buefy.css')
self.assertEqual(version, 'latest') self.assertEqual(version, '0.9.25')
def test_buefy_css_custom_old(self): def test_buefy_css_custom_old(self):
# nb. this uses same setting as buefy (js) # nb. this uses same setting as buefy (js)
@ -109,7 +109,7 @@ class TestGetLibVer(TestCase):
def test_buefy_css_default_only(self): def test_buefy_css_default_only(self):
self.config.setdefault('wuttaweb.libver.buefy', '0.9.29') self.config.setdefault('wuttaweb.libver.buefy', '0.9.29')
version = mod.get_libver(self.request, 'buefy.css', default_only=True) version = mod.get_libver(self.request, 'buefy.css', default_only=True)
self.assertEqual(version, 'latest') self.assertEqual(version, '0.9.25')
def test_vue_default(self): def test_vue_default(self):
version = mod.get_libver(self.request, 'vue') version = mod.get_libver(self.request, 'vue')
@ -136,7 +136,7 @@ class TestGetLibVer(TestCase):
def test_vue_resource_default(self): def test_vue_resource_default(self):
version = mod.get_libver(self.request, 'vue_resource') version = mod.get_libver(self.request, 'vue_resource')
self.assertEqual(version, 'latest') self.assertEqual(version, '1.5.3')
def test_vue_resource_custom(self): def test_vue_resource_custom(self):
self.config.setdefault('wuttaweb.libver.vue_resource', '1.5.3') self.config.setdefault('wuttaweb.libver.vue_resource', '1.5.3')
@ -247,7 +247,7 @@ class TestGetLibUrl(TestCase):
def test_buefy_default(self): def test_buefy_default(self):
url = mod.get_liburl(self.request, 'buefy') url = mod.get_liburl(self.request, 'buefy')
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.js') self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.js')
def test_buefy_custom(self): def test_buefy_custom(self):
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js') self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
@ -262,7 +262,7 @@ class TestGetLibUrl(TestCase):
def test_buefy_default_only(self): def test_buefy_default_only(self):
self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js') self.config.setdefault('wuttaweb.liburl.buefy', '/lib/buefy.js')
url = mod.get_liburl(self.request, 'buefy', default_only=True) url = mod.get_liburl(self.request, 'buefy', default_only=True)
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.js') self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.js')
def test_buefy_configured_only(self): def test_buefy_configured_only(self):
url = mod.get_liburl(self.request, 'buefy', configured_only=True) url = mod.get_liburl(self.request, 'buefy', configured_only=True)
@ -281,7 +281,7 @@ class TestGetLibUrl(TestCase):
def test_buefy_css_default(self): def test_buefy_css_default(self):
url = mod.get_liburl(self.request, 'buefy.css') url = mod.get_liburl(self.request, 'buefy.css')
self.assertEqual(url, 'https://unpkg.com/buefy@latest/dist/buefy.min.css') self.assertEqual(url, 'https://unpkg.com/buefy@0.9.25/dist/buefy.min.css')
def test_buefy_css_custom(self): def test_buefy_css_custom(self):
self.config.setdefault('wuttaweb.liburl.buefy.css', '/lib/buefy.css') self.config.setdefault('wuttaweb.liburl.buefy.css', '/lib/buefy.css')
@ -309,7 +309,7 @@ class TestGetLibUrl(TestCase):
def test_vue_resource_default(self): def test_vue_resource_default(self):
url = mod.get_liburl(self.request, 'vue_resource') url = mod.get_liburl(self.request, 'vue_resource')
self.assertEqual(url, 'https://cdn.jsdelivr.net/npm/vue-resource@latest') self.assertEqual(url, 'https://cdn.jsdelivr.net/npm/vue-resource@1.5.3')
def test_vue_resource_custom(self): def test_vue_resource_custom(self):
self.config.setdefault('wuttaweb.liburl.vue_resource', '/lib/vue-resource.js') self.config.setdefault('wuttaweb.liburl.vue_resource', '/lib/vue-resource.js')