Repository navigation
Build on scratch-gui's packaging engine instead of a second copy - #2
Merged
Merged
Conversation
Deploying packagermistwarp with
|
| Latest commit: |
bc5fe6d
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://1566ef21.packagermistwarp.pages.dev |
| Branch Preview URL: | https://share-gui-packager-core.packagermistwarp.pages.dev |
Mistium
force-pushed
the
mistwarp-forks
branch
from
September 21, 2026 01:19
ad0bcc1 to
81a33c2
Compare
src/scaffolding, src/addons, src/common and most of src/packager were a second copy of what scratch-gui carries in src/packager. The two had already drifted, and MistWarp's packager work lands on the editor's copy, so this one was the stale one. Delete it and build from scratch-gui's, checked out beside this repository or found through SCRATCH_GUI. What stays is what is genuinely this repo's: the p4 interface, the webpack build, the Node API, its branding and its Svelte translations. The engine asks its host for a runtime URL and for branding through virtual:packager-runtime, so packaged projects still say MistWarp Packager and link to packager.warp.mistium.com. Three things had to change to make webpack 4 read those sources: babel now covers the engine and .mjs files, resolution prefers our node_modules over any node_modules scratch-gui happens to have, and fake-indexeddb and rotur-sdk get transpiled because they ship class fields. The website and Node bundles had no babel pass at all, which is why `npm run build` has failed since 86e2e5d added nullish coalescing to packager.js. They have one now. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CI checks scratch-gui out inside this repository, so jest collected its 300-odd suites along with ours. Limit it to test/. Engine sources resolved imports and inline loaders by walking up from their own directory. That only reaches our node_modules when the engine is nested inside this repository, as in CI; checked out beside it, as engine-path.js documents, jest could not find @turbowarp/sbdl and webpack could not find raw-loader. Resolve both against our node_modules first, as the webpack resolve config already does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mistium
force-pushed
the
share-gui-packager-core
branch
from
September 21, 2026 02:26
29a2c39 to
bc5fe6d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Needs MistWarp/scratch-gui#22 merged first: CI checks the engine out from
develop, andtest/packager/build-id.test.jsneeds its tolerantverifyBuildId.src/scaffolding,src/addons,src/commonand most ofsrc/packagerwere asecond copy of what scratch-gui carries in
src/packager— 107 of this repo's144 source files. They had already drifted apart, and since MistWarp's packager
work lands on the editor's copy, this was the stale one. The editor's copy is
also ahead: browser storage, the account host, the game shop.
What moved and what stayed
Deleted here, read from scratch-gui instead: the scaffolding runtime, the
addons,
src/common, and the packager core.Still this repo's, because it is not the engine:
src/p4— the Svelte interface behind packager.warp.mistium.comsrc/build— the webpack plumbing, service worker and standalone generatorsrc/packager/node— the@turbowarp/packagerNode APIsrc/packager/brand.js— this site calls itself the MistWarp Packager, notMistWarp, and packaged projects credit and link to it
src/locales— a Svelte store the editor's copy has no equivalent forThe engine is found beside this repository, or wherever
SCRATCH_GUIpoints.CI checks it out;
src/build/engine-path.jssays so if it cannot find it.Nothing of scratch-gui is installed or built — only
src/packageris read.Making webpack 4 read them
.mjs, whichrotur-sdkships.node_modulesover anynode_modulesscratch-guihappens to have next door, so the engine gets the dependencies this repo
declares.
fake-indexeddbandrotur-sdkare transpiled; they ship class fields, andwebpack 4 cannot parse those.
rotur-sdkandfake-indexeddbare added as dependencies.engine change still invalidates cached runtimes.
Rebased onto master
#4 already gave every config a shared
makeJavascriptRule(). The engine andfake-indexeddbare added to that rule rather than kept as a second one;rotur-sdkkeeps the rule #1 gave it.Resolving the engine from beside this repository
CI nests the engine inside this repository, so anything it imports walks up to
our
node_modules. Beside it — the layoutengine-path.jsdocuments — jestcould not find
@turbowarp/sbdland webpack could not findraw-loader. Bothnow resolve against our
node_modulesfirst, as the webpackresolveconfigalready did. Jest is also limited to
test/; with the engine nested it had beencollecting scratch-gui's 300-odd suites too.
Verified
Against MistWarp/scratch-gui#22, checked out beside this repository:
npm run build— website,scaffolding-full.js,scaffolding-min.js,addons.jsand the extension workers all emitted.npm run build-standalone-prod—dist/standalone.html.npm test— 16 suites, 48 passed, 1 skipped.Branding held:
MistWarp Packager,packager.warp.mistium.comand#d499e6are all still in the built output, and
relativeScaffoldingstill resolves toscaffolding/…rather than the editor's build-id directory.One test caught a real difference. The editor's
verifyBuildIdrejects aruntime with no build id stamped on it; this repo only stamps one in production,
so that would make a development build refuse the scaffolding it just wrote.
MistWarp/scratch-gui#22 restores the tolerant check.
Note
README.mdis currently the Node API readme —prepublishOnlyswaps it in andpostpublishnever put the original back. Left alone here, but it means thereis nowhere obvious documenting the scratch-gui checkout; the error message from
engine-path.jscarries it instead.