Skip to content

refactor(deps): migrate from mholt/archiver/v3 to mholt/archives#1787

Merged
anthony-gomez-fastly merged 1 commit into
mainfrom
refactor-mholt-archiver-to-archives
May 11, 2026
Merged

refactor(deps): migrate from mholt/archiver/v3 to mholt/archives#1787
anthony-gomez-fastly merged 1 commit into
mainfrom
refactor-mholt-archiver-to-archives

Conversation

@anthony-gomez-fastly
Copy link
Copy Markdown
Member

@anthony-gomez-fastly anthony-gomez-fastly commented May 8, 2026

Change summary

Replace the deprecated mholt/archiver/v3 library with the newer mholt/archives library. This migration updates all archive handling code to use the new stream-oriented API.

Changes:

  • Replace archiver.Unarchive() with archives.Identify() + archives.Extract()
  • Replace archiver.NewTarGz().Archive() with archives.CompressedArchive
  • Create shared ExtractArchive() utility in pkg/file/archive.go to eliminate code duplication across archive.go, github.go, and deploy.go
  • Update all file iteration to use archives.FileInfo instead of archiver.File
  • Add createTarGz() helper for creating tar.gz archives

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  • Does your submission pass tests?

Changes to Core Features:

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?

@anthony-gomez-fastly anthony-gomez-fastly force-pushed the refactor-mholt-archiver-to-archives branch 4 times, most recently from 4044712 to c1240bb Compare May 11, 2026 15:14
Replace the deprecated mholt/archiver/v3 library with the newer
mholt/archives library. This migration updates all archive handling
code to use the new stream-oriented API.

Changes:
- Replace archiver.Unarchive() with archives.Identify() + archives.Extract()
- Replace archiver.NewTarGz().Archive() with archives.CompressedArchive
- Create shared ExtractArchive() utility in pkg/file/archive.go to
  eliminate code duplication across archive.go, github.go, and deploy.go
- Update all file iteration to use archives.FileInfo instead of archiver.File
- Add createTarGz() helper for creating tar.gz archives
@anthony-gomez-fastly anthony-gomez-fastly force-pushed the refactor-mholt-archiver-to-archives branch from c1240bb to 84128f7 Compare May 11, 2026 15:42
@anthony-gomez-fastly anthony-gomez-fastly marked this pull request as ready for review May 11, 2026 15:56
@anthony-gomez-fastly anthony-gomez-fastly requested a review from a team as a code owner May 11, 2026 15:56
Copy link
Copy Markdown
Member

@kpfleming kpfleming left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder how many projects using this package are having to write their own copies of these helper functions that do exactly the same thing.

@anthony-gomez-fastly anthony-gomez-fastly merged commit 831429a into main May 11, 2026
13 checks passed
@anthony-gomez-fastly anthony-gomez-fastly deleted the refactor-mholt-archiver-to-archives branch May 11, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants