Skip to content

Add archiver patches back to fix following symlinks on export#3060

Open
wojtekn wants to merge 4 commits intotrunkfrom
add-archiver-patches-back
Open

Add archiver patches back to fix following symlinks on export#3060
wojtekn wants to merge 4 commits intotrunkfrom
add-archiver-patches-back

Conversation

@wojtekn
Copy link
Copy Markdown
Contributor

@wojtekn wojtekn commented Apr 10, 2026

Related issues

How AI was used in this PR

I used AI to regenerate patches and revert unnecessary changes from the previous PR.

Proposed Changes

I propose adding patches that add follow-symlinks option to archiver.

Testing Instructions

  1. Create a Studio site
  2. Symlink directory e.g. plugin
  3. Cnofirm plugin loads on site
  4. Export site
  5. Confirm directory is included in package, and it's not a symlink

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

@wojtekn wojtekn self-assigned this Apr 10, 2026
@wojtekn wojtekn requested a review from fredrikekelund April 10, 2026 14:02
@wpmobilebot
Copy link
Copy Markdown
Collaborator

wpmobilebot commented Apr 10, 2026

📊 Performance Test Results

Comparing fe1f002 vs trunk

app-size

Metric trunk fe1f002 Diff Change
App Size (Mac) 1285.76 MB 1285.76 MB 0.00 MB ⚪ 0.0%

site-editor

Metric trunk fe1f002 Diff Change
load 1909 ms 1854 ms 55 ms 🟢 -2.9%

site-startup

Metric trunk fe1f002 Diff Change
siteCreation 8114 ms 8137 ms +23 ms ⚪ 0.0%
siteStartup 4178 ms 4302 ms +124 ms 🔴 3.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@wojtekn wojtekn requested a review from a team April 10, 2026 15:24
The @types/archiver patches added followSymlinks to CoreOptions, but
this is unnecessary — ARCHIVER_OPTIONS in constants.ts uses plain object
inference so followSymlinks is never checked against CoreOptions. The CLI
patch also broke CI because install:bundle uses --omit=dev, meaning
@types/archiver is absent when patch-package runs.
Copy link
Copy Markdown
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

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

Thanks @wojtekn for adding those! I have tested running npm install and running npm start and I don't see any errors. I have tested exporting a site with symlinks and I see the symlinked plugin folder in the new site. I have added a commit that removes the types @types+archiver+7.0.0.patch because that patch was not necessary and it was also breaking the CI. Once the CI passes this could be merged. LGTM!

Symlink site Imported previously exported site
Image Image

The @types/archiver patches added followSymlinks to CoreOptions, but
@types/archiver@7 dropped followSymlinks from CoreOptions (it's still
supported at runtime). The CLI patch also broke CI because install:bundle
uses --omit=dev, meaning @types/archiver is absent when patch-package
runs. Restore the `as archiver.ArchiverOptions` casts at call sites.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants