Skip to content

Commit 8cac5c3

Browse files
authored
Merge pull request #390 from jrief/django-5-support
Prepare for Django 5 support
2 parents 65397bd + 9410039 commit 8cac5c3

File tree

12 files changed

+813
-183
lines changed

12 files changed

+813
-183
lines changed

.github/workflows/publish.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ jobs:
3434
- name: Build Client
3535
run: |
3636
npm run build
37-
npm run minify
3837
- name: Patch templates
3938
run: |
4039
mkdir -p adminsortable2/templates/adminsortable2/edit_inline

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ jobs:
4545
- name: Build Client
4646
run: |
4747
npm run build
48-
npm run minify
4948
- name: Patch templates
5049
run: |
5150
mkdir -p adminsortable2/templates/adminsortable2/edit_inline
@@ -59,4 +58,5 @@ jobs:
5958
done
6059
- name: Test with pytest
6160
run: |
61+
mkdir -p workdir
6262
python -m pytest testapp

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
*.pot
44
*.pyc
55
*.egg-info
6-
*.sqlite3
76
*.coverage
87
*.tsbuildinfo
98
*~
@@ -17,6 +16,7 @@ build
1716
docs/_build
1817
dist
1918
node_modules/
19+
workdir/*
2020
htmlcov
2121
adminsortable2/static/adminsortable2/js/adminsortable2.*
2222
adminsortable2/templates/adminsortable2/edit_inline

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Release history of [django-admin-sortable2](https://github.com/jrief/django-admin-sortable2/)
44

5+
### 2.1.11
6+
- Upgrade all external dependencies to their latest versions.
7+
- Adopt E2E tests to use Playwright's `locator`.
8+
59
### 2.1.10
610
- Do not create sourcemaps in production build.
711

adminsortable2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '2.1.10'
1+
__version__ = '2.1.11'

client/build.cjs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
const { build } = require('esbuild');
2+
const buildOptions = require('yargs-parser')(process.argv.slice(2), {
3+
boolean: ['debug'],
4+
});
25

36
build({
47
entryPoints: ['client/admin-sortable2.ts'],
58
bundle: true,
6-
minify: false,
7-
outfile: 'adminsortable2/static/adminsortable2/js/adminsortable2.js',
9+
minify: !buildOptions.debug,
10+
sourcemap: buildOptions.debug,
11+
outfile: 'adminsortable2/static/adminsortable2/js/adminsortable2' + (buildOptions.debug ? '' : '.min') + '.js',
812
plugins: [],
9-
sourcemap: false,
1013
target: ['es2020', 'chrome84', 'firefox84', 'safari14', 'edge84']
1114
}).catch(() => process.exit(1));

docs/source/contributing.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,23 @@ Writing Code
1919
Before hacking into the code, adopt your IDE to respect the projects's `.editorconfig`_ file.
2020

2121
When installing from GitHub, you *must* build the JavaScript client using the esbuild_ TypeScript
22-
compiler:
22+
compiler. Ensure that you have a recent version of NodeJS (18+) installed. Then run the following
23+
commands:
2324

2425
.. code-block:: shell
2526
2627
git clone https://github.com/jrief/django-admin-sortable2.git
2728
cd django-admin-sortable2
28-
npm install --also=dev
29+
npm install --include=dev
2930
npm run build
3031
31-
# and optionally for a minimized version
32-
npm run minify
32+
# for an unminimized version including a sourcemap, run
33+
npm run build -- --debug
3334
3435
This then builds and bundles the JavaScript file
35-
``adminsortable2/static/adminsortable2/js/adminsortable2.js`` which later on is imported by the
36-
sortable-admin mixin classes. The minimized version can be imported as
37-
``adminsortable2/static/adminsortable2/js/adminsortable2.min.js``
36+
``adminsortable2/static/adminsortable2/js/adminsortable2.min.js`` which later on is imported by the
37+
sortable-admin mixin classes. The unminimized version can be imported as
38+
``adminsortable2/static/adminsortable2/js/adminsortable2.js``
3839

3940
.. _.editorconfig: https://editorconfig.org/
4041
.. _esbuild: https://esbuild.github.io/

0 commit comments

Comments
 (0)