Skip to content

Commit

Permalink
Merge pull request #125 from jazzband/release/0.6.0
Browse files Browse the repository at this point in the history
Release 0.6.0
  • Loading branch information
sergei-maertens committed May 10, 2024
2 parents cc062a9 + 02c55ef commit e7be214
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 8 deletions.
2 changes: 1 addition & 1 deletion cookie_consent/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.5.0b0"
__version__ = "0.6.0"
59 changes: 57 additions & 2 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,70 @@
Changelog
=========

0.6.0 (unreleased)
0.6.0 (2024-05-10)
------------------

Feature release with improved JS support.

💥 This feature release has a potential breaking change. The ``CookieGroup.varname``
field now has a unique constraint on it. The ``Cookie`` model now has a unique
constraint on ``cookiegroup``, ``name`` and ``domain``. If you have duplicate values,
this migration will crash.

* ...
**💥 Breaking changes**

Some (database) unique constraints have been added to the model fields. If you have
duplicate values in those fields, the migrations will crash. You should check for
duplicates before upgrading, and fix those:

.. code-block:: py
from django.db.models import Count
from cookie_consent.models import CookieGroup, Cookie
# duplicated cookie groups (by varname)
CookieGroup.objects.values("varname").annotate(n=Count("varname")).filter(n__gt=1)
# <QuerySet []>
# duplicated cookies
Cookie.objects.values("cookiegroup", "name", "domain").annotate(n=Count("id")).filter(n__gt=1)
# <QuerySet []>
Additionally, support for unmaintained Django versions (3.2, 4.1) is dropped.

**New features**

* The JS for the cookiebar module is rewritten in TypeScript and published as an
`npm package`_ for people wishing to integrate this functionality in their own
frontend stack. ``cookie_consent/cookiebar.module.js`` is still in the Python package,
and it's generated from the same source code.

* Added support for natural keys in dumpdata/loaddata management commands.

**Deprecations**

None.

**Bugfixes**

* Fixed cache not being cleared after queryset (bulk) update/deletes
* Swapped the order of ``onShow`` and ``doInsert`` in the cookiebar JS. ``onShow`` is
now called after the cookiebar is inserted into the document.
* Added missing unique constraint to ``CookieGroup.varname`` field
* Added missing unique constraint on ``Cookie`` fields ``cookiegroup``, ``name`` and
``domain``.

**Project maintenance**

* Add missing templatetag instruction to docs
* Removed Django < 4.2 compatibility shims
* Formatted code with latest black version
* Dropped Django 3.2 & 4.1 from the supported versions
* Removed unused dependencies
* Bumped github actions to latest versions
* Updated to modern packaging tooling with ``pyproject.toml``

.. _npm package: https://www.npmjs.com/package/django-cookie-consent

0.5.0b0 (2023-09-24)
--------------------
Expand Down
4 changes: 2 additions & 2 deletions js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "django-cookie-consent",
"version": "0.6.0-beta0",
"version": "0.6.0",
"description": "Frontend code for django-cookie-consent",
"main": "lib/index.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "django-cookie-consent"
version = "0.5.0b0"
version = "0.6.0"
description = "Django cookie consent application"
authors = [
{name = "Informatika Mihelac", email = "bmihelac@mihelac.org"}
Expand Down
2 changes: 1 addition & 1 deletion tbump.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[version]
current = "0.5.0b0"
current = "0.6.0"
regex = '''
(?P<major>\d+)
\.
Expand Down

0 comments on commit e7be214

Please sign in to comment.