diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 86b67ce..0cccc7f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,9 +28,8 @@ jobs: uses: actions/setup-python@v3 - name: Install Dependencies run: | - npm ci --also=dev - python -m pip install --upgrade pip - python -m pip install build --user + npm ci --include=dev + pip install build --user - name: Build Client run: | npm run build @@ -38,7 +37,7 @@ jobs: - name: Patch templates run: | mkdir -p adminsortable2/templates/adminsortable2/edit_inline - DJANGO_VERSIONS=("4.0" "4.1" "4.2") + DJANGO_VERSIONS=("4.0" "4.1" "4.2", "5.0") for django_version in ${DJANGO_VERSIONS[@]}; do echo $django_version curl --silent --output adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/stacked.html diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f0b4e3c..9d9a660 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,23 +21,34 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] node-version: ["16.x"] - django-version: ["4.0.*", "4.1.*", "4.2.*"] + django-version: ["4.0.*", "4.1.*", "4.2.*", "5.0.*"] exclude: # https://docs.djangoproject.com/en/4.2/faq/install/#what-python-version-can-i-use-with-django + - python-version: "3.8" + django-version: "5.0.*" + - python-version: "3.9" + django-version: "5.0.*" - python-version: "3.11" django-version: "4.0.*" + - python-version: "3.12" + django-version: "4.0.*" + - python-version: "3.12" + django-version: "4.1.*" steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - name: Install Dependencies run: | - npm ci --also=dev + npm ci --include=dev python -m pip install --upgrade pip + python -m pip install --upgrade setuptools wheel python -m pip install "Django==${{ matrix.django-version }}" python -m pip install -r testapp/requirements.txt python -m playwright install @@ -49,7 +60,7 @@ jobs: - name: Patch templates run: | mkdir -p adminsortable2/templates/adminsortable2/edit_inline - DJANGO_VERSIONS=("4.0" "4.1" "4.2") + DJANGO_VERSIONS=("4.0" "4.1" "4.2" "5.0") for django_version in ${DJANGO_VERSIONS[@]}; do echo $django_version curl --silent --output adminsortable2/templates/adminsortable2/edit_inline/stacked-django-$django_version.html https://raw.githubusercontent.com/django/django/stable/$django_version.x/django/contrib/admin/templates/admin/edit_inline/stacked.html diff --git a/CHANGELOG.md b/CHANGELOG.md index 647b26f..4ba0547 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ ## Release history of [django-admin-sortable2](https://github.com/jrief/django-admin-sortable2/) +### 2.1.11 +- Add support for Django 5.0 + ### 2.1.10 - Do not create sourcemaps in production build. diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 9cee5cb..a0477d0 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -25,7 +25,7 @@ compiler: git clone https://github.com/jrief/django-admin-sortable2.git cd django-admin-sortable2 - npm install --also=dev + npm install npm run build # and optionally for a minimized version @@ -53,7 +53,7 @@ version of NodeJS. git clone https://github.com/jrief/django-admin-sortable2.git cd django-admin-sortable2 - npm install --include=dev + npm install npm run build npm run minify python -m pip install Django @@ -104,7 +104,7 @@ Follow these steps to run all unit- and end-to-end tests. git clone https://github.com/jrief/django-admin-sortable2.git cd django-admin-sortable2 - npm install --include=dev + npm install npm run build python -m pip install Django python -m pip install -r testapp/requirements.txt diff --git a/package-lock.json b/package-lock.json index 8b1d346..f5d5794 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,149 +1,208 @@ { "name": "django-admin-sortable2", + "lockfileVersion": 3, "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@jridgewell/gen-mapping": { + "packages": { + "": { + "name": "django-admin-sortable2", + "license": "MIT", + "devDependencies": { + "@types/sortablejs": "^1.10.7", + "esbuild": "^0.11.23", + "playwright": "^1.20.2", + "sortablejs": "^1.15.0", + "terser": "^5.15.0", + "tslib": "^2.2.0", + "typescript": "^4.1.4" + } + }, + "node_modules/@jridgewell/gen-mapping": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/set-array": "^1.0.1", "@jridgewell/sourcemap-codec": "^1.4.10", "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" } }, - "@jridgewell/resolve-uri": { + "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/set-array": { + "node_modules/@jridgewell/set-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.0.0" + } }, - "@jridgewell/source-map": { + "node_modules/@jridgewell/source-map": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz", "integrity": "sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/gen-mapping": "^0.3.0", "@jridgewell/trace-mapping": "^0.3.9" } }, - "@jridgewell/sourcemap-codec": { + "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", "dev": true }, - "@jridgewell/trace-mapping": { + "node_modules/@jridgewell/trace-mapping": { "version": "0.3.15", "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz", "integrity": "sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" } }, - "@types/sortablejs": { + "node_modules/@types/sortablejs": { "version": "1.13.0", "resolved": "https://registry.npmjs.org/@types/sortablejs/-/sortablejs-1.13.0.tgz", "integrity": "sha512-C3064MH72iEfeGCYEGCt7FCxXoAXaMPG0QPnstcxvPmbl54erpISu06d++FY37Smja64iWy5L8wOyHHBghWbJQ==", "dev": true }, - "acorn": { + "node_modules/acorn": { "version": "8.8.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", - "dev": true + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } }, - "buffer-from": { + "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, - "commander": { + "node_modules/commander": { "version": "2.20.3", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", "dev": true }, - "esbuild": { + "node_modules/esbuild": { "version": "0.11.23", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.11.23.tgz", "integrity": "sha512-iaiZZ9vUF5wJV8ob1tl+5aJTrwDczlvGP0JoMmnpC2B0ppiMCu8n8gmy5ZTGl5bcG081XBVn+U+jP+mPFm5T5Q==", - "dev": true + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + } }, - "playwright": { + "node_modules/playwright": { "version": "1.25.1", "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.25.1.tgz", "integrity": "sha512-kOlW7mllnQ70ALTwAor73q/FhdH9EEXLUqjdzqioYLcSVC4n4NBfDqeCikGuayFZrLECLkU6Hcbziy/szqTXSA==", "dev": true, - "requires": { + "hasInstallScript": true, + "dependencies": { "playwright-core": "1.25.1" }, - "dependencies": { - "playwright-core": { - "version": "1.25.1", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.1.tgz", - "integrity": "sha512-lSvPCmA2n7LawD2Hw7gSCLScZ+vYRkhU8xH0AapMyzwN+ojoDqhkH/KIEUxwNu2PjPoE/fcE0wLAksdOhJ2O5g==", - "dev": true - } + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/playwright/node_modules/playwright-core": { + "version": "1.25.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.25.1.tgz", + "integrity": "sha512-lSvPCmA2n7LawD2Hw7gSCLScZ+vYRkhU8xH0AapMyzwN+ojoDqhkH/KIEUxwNu2PjPoE/fcE0wLAksdOhJ2O5g==", + "dev": true, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=14" } }, - "sortablejs": { + "node_modules/sortablejs": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/sortablejs/-/sortablejs-1.15.0.tgz", "integrity": "sha512-bv9qgVMjUMf89wAvM6AxVvS/4MX3sPeN0+agqShejLU5z5GX4C75ow1O2e5k4L6XItUyAK3gH6AxSbXrOM5e8w==", "dev": true }, - "source-map": { + "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "source-map-support": { + "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", "dev": true, - "requires": { + "dependencies": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" } }, - "terser": { + "node_modules/terser": { "version": "5.15.0", "resolved": "https://registry.npmjs.org/terser/-/terser-5.15.0.tgz", "integrity": "sha512-L1BJiXVmheAQQy+as0oF3Pwtlo4s3Wi1X2zNZ2NxOB4wx9bdS9Vk67XQENLFdLYGCK/Z2di53mTj/hBafR+dTA==", "dev": true, - "requires": { + "dependencies": { "@jridgewell/source-map": "^0.3.2", "acorn": "^8.5.0", "commander": "^2.20.0", "source-map-support": "~0.5.20" + }, + "bin": { + "terser": "bin/terser" + }, + "engines": { + "node": ">=10" } }, - "tslib": { + "node_modules/tslib": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==", "dev": true }, - "typescript": { + "node_modules/typescript": { "version": "4.8.2", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.2.tgz", "integrity": "sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==", - "dev": true + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } } } } diff --git a/setup.py b/setup.py index 67aaf50..9338d65 100644 --- a/setup.py +++ b/setup.py @@ -24,10 +24,12 @@ def readfile(filename): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', + 'Programming Language :: Python :: 3.12', 'Framework :: Django', 'Framework :: Django :: 4.0', 'Framework :: Django :: 4.1', 'Framework :: Django :: 4.2', + 'Framework :: Django :: 5.0', ] diff --git a/testapp/requirements.txt b/testapp/requirements.txt index a1c9815..3850273 100644 --- a/testapp/requirements.txt +++ b/testapp/requirements.txt @@ -5,12 +5,12 @@ charset-normalizer==2.0.12 jinja2 idna==3.3 iniconfig==2.0.0 -greenlet==2.0.1 +greenlet==3.0.0 packaging==21.3 -playwright==1.31.1 +playwright==1.39.0 pluggy==1.0.0 py==1.11.0 -pyee==9.0.4 +pyee==11.0.1 pyparsing==3.0.9 pytest==7.2.2 pytest-base-url==2.0.0