Skip to content

Commit d067484

Browse files
committed
Re-bundle JS in a fresh environment
`npm`/`yarn` is non-deterministic when it comes to bundling dependencies, and so you can very easily end up with a dependency drift (especially when you're being strict about what you build elsewhere). It turns out that this is what #2680 was showing. If we clean the whole environment (`git clean -fdx`), then run `setup` and the other steps that the Action runs through, we get the same result.
1 parent 34834ac commit d067484

File tree

2 files changed

+7
-29
lines changed

2 files changed

+7
-29
lines changed

app/assets/builds/administrate/application.js

Lines changed: 5 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14372,47 +14372,25 @@
1437214372
}
1437314373
start() {
1437414374
this.directUpload.create(this.directUploadDidComplete.bind(this));
14375-
this.dispatch("start");
1437614375
}
1437714376
directUploadWillStoreFileWithXHR(xhr) {
1437814377
xhr.upload.addEventListener("progress", (event) => {
1437914378
const progress = event.loaded / event.total * 100;
1438014379
this.attachment.setUploadProgress(progress);
14381-
if (progress) {
14382-
this.dispatch("progress", {
14383-
progress
14384-
});
14385-
}
1438614380
});
1438714381
}
1438814382
directUploadDidComplete(error2, attributes) {
1438914383
if (error2) {
14390-
this.dispatchError(error2);
14391-
} else {
14392-
this.attachment.setAttributes({
14393-
sgid: attributes.attachable_sgid,
14394-
url: this.createBlobUrl(attributes.signed_id, attributes.filename)
14395-
});
14396-
this.dispatch("end");
14384+
throw new Error(`Direct upload failed: ${error2}`);
1439714385
}
14386+
this.attachment.setAttributes({
14387+
sgid: attributes.attachable_sgid,
14388+
url: this.createBlobUrl(attributes.signed_id, attributes.filename)
14389+
});
1439814390
}
1439914391
createBlobUrl(signedId, filename) {
1440014392
return this.blobUrlTemplate.replace(":signed_id", signedId).replace(":filename", encodeURIComponent(filename));
1440114393
}
14402-
dispatch(name, detail = {}) {
14403-
detail.attachment = this.attachment;
14404-
return dispatchEvent2(this.element, `direct-upload:${name}`, {
14405-
detail
14406-
});
14407-
}
14408-
dispatchError(error2) {
14409-
const event = this.dispatch("error", {
14410-
error: error2
14411-
});
14412-
if (!event.defaultPrevented) {
14413-
alert(error2);
14414-
}
14415-
}
1441614394
get directUploadUrl() {
1441714395
return this.element.dataset.directUploadUrl;
1441814396
}

app/assets/builds/administrate/application.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)