Skip to content

Keep make up working with a dirty editor clone or no network - #140

Merged
erseco merged 1 commit into
feature/ci-harden-workflowsfrom
feature/make-up-offline
Sep 26, 2026
Merged

erseco merged 1 commit into
feature/ci-harden-workflowsfrom
feature/make-up-offline

Conversation

@erseco

@erseco erseco commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #139.

make up failing after the first editor build

build-editor runs bun install, which rewrites the editor clone's bun.lock. Once upstream moved, the next make up (through build-editor-if-needed → fetch-editor-source) aborted:

error: Your local changes to the following files would be overwritten by checkout:
	bun.lock

fetch-editor-source now discards that lockfile change before checkout. --frozen-lockfile is not an option, because the upstream lock is not in sync with its package.json, so a frozen install fails.

build-editor-if-needed also aborted make up whenever the fetch failed, for example when offline, even though dist/static/ held a usable build. It now warns and keeps the existing build.

Verification

Tested against a throwaway clone:

  • dirty bun.lock + fetch of main: the clone moved to the new commit and was left clean;
  • unreachable repository URL with an existing build: warning, exit 0, no rebuild.

@github-actions

github-actions Bot commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Test in WordPress Playground

Test the plugin with the code from this branch:

Preview in WordPress Playground

ℹ️ The eXeLearning editor is fetched from the shared release and unpacked into the plugin when the playground boots, so the first load may take a few extra seconds. ELP upload, shortcode, Gutenberg block and preview work normally.

@codecov-commenter

codecov-commenter commented Sep 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (feature/ci-harden-workflows@9bd0209). Learn more about missing BASE report.

Additional details and impacted files
@@                      Coverage Diff                       @@
##             feature/ci-harden-workflows     #140   +/-   ##
==============================================================
  Coverage                               ?   96.87%           
  Complexity                             ?      864           
==============================================================
  Files                                  ?       39           
  Lines                                  ?     4324           
  Branches                               ?        0           
==============================================================
  Hits                                   ?     4189           
  Misses                                 ?      135           
  Partials                               ?        0           
Flag Coverage Δ
javascript 95.71% <ø> (?)
php 97.25% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@erseco
erseco added this pull request to stack #144 September 26, 2026 07:38
@erseco
erseco force-pushed the feature/make-up-offline branch from c143d09 to 3b456e2 Compare September 26, 2026 07:43
@erseco
erseco force-pushed the feature/make-up-offline branch from 3b456e2 to 7623552 Compare September 26, 2026 08:01
build-editor runs bun install, which rewrites the editor clone's bun.lock.
The next fetch-editor-source then refused to check out the new ref ("local
changes would be overwritten"), so make up failed on every run after the
first build once upstream moved. Discard that lockfile change before checkout.

build-editor-if-needed also aborted make up whenever the fetch failed, for
example offline, even with a usable build in dist/static. It now warns and
keeps the existing build in that case.
@erseco
erseco force-pushed the feature/make-up-offline branch from 7623552 to 0fd11b7 Compare September 26, 2026 08:29
@erseco
erseco merged commit 2f5b7e9 into main Sep 26, 2026
5 checks passed
@erseco
erseco deleted the feature/make-up-offline branch September 26, 2026 08:47
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