[Django] #31493: Replace var usage with const and let keywords in JavaScript.

28 views
Skip to first unread message

Django

unread,
Apr 21, 2020, 8:03:21 AM4/21/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
------------------------------------------------+------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Statements/const
https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Statements/let

Since 8b30360322d4de6687e17ab267a856db4e3c78a6, these statements are
available on all supported browsers.

--
Ticket URL: <https://code.djangoproject.com/ticket/31493>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 21, 2020, 8:08:04 AM4/21/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
-------------------------------------+-------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Jon Dufresne):

* has_patch: 0 => 1


Comment:

https://github.com/django/django/pull/12767

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:1>

Django

unread,
Apr 21, 2020, 9:06:14 AM4/21/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Adam (Chainz) Johnson):

* cc: Adam (Chainz) Johnson (added)
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:2>

Django

unread,
Apr 21, 2020, 9:08:57 AM4/21/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Adam (Chainz) Johnson):

Additionally, whilst we don't officially support IE11 since that commit,
https://caniuse.com/#search=const and https://caniuse.com/#search=let show
it has support with only caveats for loops, so I expect most things should
continue to function there.

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:3>

Django

unread,
Apr 29, 2020, 4:23:22 AM4/29/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"7271c8def4029d53c3249c3eb341c7180f527747" 7271c8de]:
{{{
#!CommitTicketReference repository=""
revision="7271c8def4029d53c3249c3eb341c7180f527747"
Refs #31493 -- Changed IIFE to ES6 blocks.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:5>

Django

unread,
Apr 29, 2020, 4:23:22 AM4/29/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by Carlton Gibson <carlton@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"5d37cc703b2d3f100ca5c2c73fd456739cd80dd9" 5d37cc70]:
{{{
#!CommitTicketReference repository=""
revision="5d37cc703b2d3f100ca5c2c73fd456739cd80dd9"
Fixed #31493 -- Replaced var with const and let keywords in JavaScript.

The eslint configuration and the admin script compress.py have been
updated for ES6.

The unused fallback of globals.django in jquery.init.js was removed. It
is always included before jsi18n-mocks.test.js and it always sets the
global value.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:4>

Django

unread,
Jun 24, 2020, 6:21:09 AM6/24/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton@…>):

In [changeset:"2afa61e7d99b2ff2656dc64b6e28db88baf786a4" 2afa61e]:
{{{
#!CommitTicketReference repository=""
revision="2afa61e7d99b2ff2656dc64b6e28db88baf786a4"
Refs #31493 -- Replaced var with const/let in documentation JS.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:6>

Django

unread,
Jun 24, 2020, 6:23:33 AM6/24/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"6ed4a9bdb3dcb8eb6d6f175947e5fef7827245fc" 6ed4a9b]:
{{{
#!CommitTicketReference repository=""
revision="6ed4a9bdb3dcb8eb6d6f175947e5fef7827245fc"
[3.1.x] Refs #31493 -- Replaced var with const/let in documentation JS.

Backport of 2afa61e7d99b2ff2656dc64b6e28db88baf786a4 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:7>

Django

unread,
Jun 24, 2020, 6:28:24 AM6/24/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by Carlton Gibson <carlton.gibson@…>):

In [changeset:"af2e95b0fae0437c1cc6c08adfe4ce9c68991a50" af2e95b0]:
{{{
#!CommitTicketReference repository=""
revision="af2e95b0fae0437c1cc6c08adfe4ce9c68991a50"
[3.0.x] Refs #31493 -- Replaced var with const/let in documentation JS.

Backport of 2afa61e7d99b2ff2656dc64b6e28db88baf786a4 from master

Co-authored-by: Carlton Gibson <carlton...@noumenal.es>
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:8>

Django

unread,
Aug 5, 2020, 2:09:07 AM8/5/20
to django-...@googlegroups.com
#31493: Replace var usage with const and let keywords in JavaScript.
--------------------------------------+------------------------------------

Reporter: Jon Dufresne | Owner: nobody
Type: Cleanup/optimization | Status: closed
Component: contrib.admin | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------

Comment (by GitHub <noreply@…>):

In [changeset:"b23216d9d0ee783405331b4f4b331ef175073874" b23216d]:
{{{
#!CommitTicketReference repository=""
revision="b23216d9d0ee783405331b4f4b331ef175073874"
Refs #31493 -- Replaced var with const and let in JavaScriptCatalog
template.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/31493#comment:9>

Reply all
Reply to author
Forward
0 new messages