refactor: simplify pypi and npm URL rewriting #18

Merged
unkinben merged 1 commits from benvin/simplify-remote-url-rewriting into master 2026-04-27 22:43:33 +10:00
Owner

Summary

  • npm: remove npm_files_url/npm_files_remote; URL rewriting now uses base_url and remote name directly (same approach as helm). Replace hardcoded .tgz extension check with immutable_patterns match for correctness
  • pypi: collapse pypi + pypi-files into a single remote — base_url points to files.pythonhosted.org; simple/ requests are transparently fetched from pypi.org with zero extra config. Remove pypi_files_url/pypi_files_remote from pypi and pypi-gitea remotes. Rewrite guard now checks immutable_patterns (consistent with npm)
  • Update README, tests, and fixtures accordingly

Test plan

  • make test passes
  • uv pip install via proxy resolves simple index and downloads wheel from same remote
  • npm metadata URL rewriting still points back to the same remote
## Summary - **npm**: remove `npm_files_url`/`npm_files_remote`; URL rewriting now uses `base_url` and remote name directly (same approach as helm). Replace hardcoded `.tgz` extension check with `immutable_patterns` match for correctness - **pypi**: collapse `pypi` + `pypi-files` into a single remote — `base_url` points to `files.pythonhosted.org`; `simple/` requests are transparently fetched from `pypi.org` with zero extra config. Remove `pypi_files_url`/`pypi_files_remote` from pypi and pypi-gitea remotes. Rewrite guard now checks `immutable_patterns` (consistent with npm) - Update README, tests, and fixtures accordingly ## Test plan - [x] `make test` passes - [x] `uv pip install` via proxy resolves simple index and downloads wheel from same remote - [x] npm metadata URL rewriting still points back to the same remote
unkinben added 1 commit 2026-04-27 22:42:36 +10:00
refactor: simplify pypi and npm URL rewriting — single remote, no redundant config keys
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/build Pipeline was successful
3352a3e886
- npm: remove npm_files_url/npm_files_remote; rewrite uses base_url and
  remote name directly (same approach as helm)
- npm: replace hardcoded .tgz extension check with immutable_patterns match
- pypi: collapse pypi + pypi-files into a single remote (base_url points
  to files.pythonhosted.org); simple/ requests are transparently fetched
  from pypi.org with no extra config required
- pypi: remove pypi_files_url/pypi_files_remote from pypi and pypi-gitea
- pypi: rewrite check now uses immutable_patterns (consistent with npm)
- Update README for both pypi and npm sections
- Update tests and fixtures to reflect single-remote pypi config
unkinben merged commit 173b5d8b10 into master 2026-04-27 22:43:33 +10:00
unkinben deleted branch benvin/simplify-remote-url-rewriting 2026-04-27 22:43:33 +10:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: unkin/artifactapi#18