All JS files are different on a friends instance

Hi all. Recently I friend of mine fired up his own instance of mobilizon (https://colsoli.org/), and I noticed that his javascript files were different from other 5.2.2 instances while visiting his site. He mentions he didn’t change anything on their code, thought I remember he said that his instance was not going to be federated, but don’t know how or if that made a different on those files. I ask my friend if he could share with me the source code but I trust when he says he didn’t move anything.

I used npm js-beutify and cargo astdiff to work with the minimized files in the mean while, and found one function is missing on my friends code. Unfortunately, minimized code doesn’t keep names, so I’m sharing astdiff result hoping some one here might be able to know why my friends code came different from my own local, and others instances. I saw some other 5.2.2 like 5.2.2-dirty and 5.2.2-1-g4351c3a9c even them use the same main.js files, and their about pages report those exact versions numbers, while my friends just says 5.2.2

Any help will be highly appreciated. Thank you in advance.

--- first.pretty.js
+++ third-beutiful.js
Structural similarity: 99.8%
Matched: 1947/1950 vs 1949
Changes: 2 added, 3 removed, 1 structural, 0 string-only (1946 unchanged)

=== Removed ===

--- Removed Px (first.pretty.js:51734-51741)
- function Px(e, t, n, r) {
-     for (let i = n; i < e.length; i += 1) try {
-         const o = r ? r.run(() => e[i](...t)) : e[i](...t);
-         if (o instanceof Promise) return o.then(() => Px(e, t, i + 1, r))
-     } catch (o) {
-         return Promise.reject(o)
-     }
- }

--- Removed vne (first.pretty.js:51743-51745)
- function vne(e, t, n) {
-     if (e.length > 0) return Px(e, t, 0, Ix(n))
- }

--- Removed bne (first.pretty.js:51757-51856)
- var bne = class {
-     _hooks;
-     _before;
-     _after;
-     _deprecatedHooks;
-     _deprecatedMessages;
-     constructor() {
-         this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this)
-     }
-     hook(e, t, n = {}) {
-         if (!e || typeof t != "function") return () => {};
-         const r = e;
-         let i;
-         for (; this._deprecatedHooks[e];) i = this._deprecatedHooks[e], e = i.to;
-         if (i && !n.allowDeprecated) {
-             let o = i.message;
-             o || (o = `${r} hook has been deprecated` + (i.to ? `, please use ${i.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = new Set), this._deprecatedMessages.has(o) || (console.warn(o), this._deprecatedMessages.add(o))
-         }
-         if (!t.name) try {
-             Object.defineProperty(t, "name", {
-                 get: () => "_" + e.replace(/\W+/g, "_") + "_hook_cb",
-                 configurable: !0
-             })
-         } catch {}
-         return this._hooks[e] = this._hooks[e] || [], this._hooks[e].push(t), () => {
-             t && (this.removeHook(e, t), t = void 0)
-         }
-     }
-     hookOnce(e, t) {
-         let n, r = (...i) => (typeof n == "function" && n(), n = void 0, r = void 0, t(...i));
-         return n = this.hook(e, r), n
-     }
-     removeHook(e, t) {
-         const n = this._hooks[e];
-         if (n) {
-             const r = n.indexOf(t);
-             r !== -1 && n.splice(r, 1), n.length === 0 && (this._hooks[e] = void 0)
-         }
-     }
-     deprecateHook(e, t) {
-         this._deprecatedHooks[e] = typeof t == "string" ? {
-             to: t
-         } : t;
-         const n = this._hooks[e] || [];
-         this._hooks[e] = void 0;
-         for (const r of n) this.hook(e, r)
-     }
-     deprecateHooks(e) {
-         for (const t in e) this.deprecateHook(t, e[t])
-     }
-     addHooks(e) {
-         const t = cg(e),
-             n = Object.keys(t).map(r => this.hook(r, t[r]));
-         return () => {
-             for (const r of n) r();
-             n.length = 0
-         }
-     }
-     removeHooks(e) {
-         const t = cg(e);
-         for (const n in t) this.removeHook(n, t[n])
-     }
-     removeAllHooks() {
-         this._hooks = {}
-     }
-     callHook(e, ...t) {
-         return this.callHookWith(vne, e, t)
-     }
-     callHookParallel(e, ...t) {
-         return this.callHookWith(gne, e, t)
-     }
-     callHookWith(e, t, n) {
-         const r = this._before || this._after ? {
-             name: t,
-             args: n,
-             context: {}
-         } : void 0;
-         this._before && zm(this._before, r);
-         const i = e(this._hooks[t] ? [...this._hooks[t]] : [], n, t);
-         return i instanceof Promise ? i.finally(() => {
-             this._after && r && zm(this._after, r)
-         }) : (this._after && r && zm(this._after, r), i)
-     }
-     beforeEach(e) {
-         return this._before = this._before || [], this._before.push(e), () => {
-             if (this._before !== void 0) {
-                 const t = this._before.indexOf(e);
-                 t !== -1 && this._before.splice(t, 1)
-             }
-         }
-     }
-     afterEach(e) {
-         return this._after = this._after || [], this._after.push(e), () => {
-             if (this._after !== void 0) {
-                 const t = this._after.indexOf(e);
-                 t !== -1 && this._after.splice(t, 1)
-             }
-         }
-     }
- };

=== Added ===

+++ Added gne (third-beutiful.js:51732-51736)
+ function gne(e, t) {
+     const n = t.shift(),
+         r = Ix(n);
+     return e.reduce((i, o) => i.then(() => r.run(() => o(...t))), Promise.resolve())
+ }

+++ Added yne (third-beutiful.js:51747-51840)
+ class yne {
+     constructor() {
+         this._hooks = {}, this._before = void 0, this._after = void 0, this._deprecatedMessages = void 0, this._deprecatedHooks = {}, this.hook = this.hook.bind(this), this.callHook = this.callHook.bind(this), this.callHookWith = this.callHookWith.bind(this)
+     }
+     hook(t, n, r = {}) {
+         if (!t || typeof n != "function") return () => {};
+         const i = t;
+         let o;
+         for (; this._deprecatedHooks[t];) o = this._deprecatedHooks[t], t = o.to;
+         if (o && !r.allowDeprecated) {
+             let a = o.message;
+             a || (a = `${i} hook has been deprecated` + (o.to ? `, please use ${o.to}` : "")), this._deprecatedMessages || (this._deprecatedMessages = new Set), this._deprecatedMessages.has(a) || (console.warn(a), this._deprecatedMessages.add(a))
+         }
+         if (!n.name) try {
+             Object.defineProperty(n, "name", {
+                 get: () => "_" + t.replace(/\W+/g, "_") + "_hook_cb",
+                 configurable: !0
+             })
+         } catch {}
+         return this._hooks[t] = this._hooks[t] || [], this._hooks[t].push(n), () => {
+             n && (this.removeHook(t, n), n = void 0)
+         }
+     }
+     hookOnce(t, n) {
+         let r, i = (...o) => (typeof r == "function" && r(), r = void 0, i = void 0, n(...o));
+         return r = this.hook(t, i), r
+     }
+     removeHook(t, n) {
+         if (this._hooks[t]) {
+             const r = this._hooks[t].indexOf(n);
+             r !== -1 && this._hooks[t].splice(r, 1), this._hooks[t].length === 0 && delete this._hooks[t]
+         }
+     }
+     deprecateHook(t, n) {
+         this._deprecatedHooks[t] = typeof n == "string" ? {
+             to: n
+         } : n;
+         const r = this._hooks[t] || [];
+         delete this._hooks[t];
+         for (const i of r) this.hook(t, i)
+     }
+     deprecateHooks(t) {
+         Object.assign(this._deprecatedHooks, t);
+         for (const n in t) this.deprecateHook(n, t[n])
+     }
+     addHooks(t) {
+         const n = cg(t),
+             r = Object.keys(n).map(i => this.hook(i, n[i]));
+         return () => {
+             for (const i of r.splice(0, r.length)) i()
+         }
+     }
+     removeHooks(t) {
+         const n = cg(t);
+         for (const r in n) this.removeHook(r, n[r])
+     }
+     removeAllHooks() {
+         for (const t in this._hooks) delete this._hooks[t]
+     }
+     callHook(t, ...n) {
+         return n.unshift(t), this.callHookWith(gne, t, ...n)
+     }
+     callHookParallel(t, ...n) {
+         return n.unshift(t), this.callHookWith(bne, t, ...n)
+     }
+     callHookWith(t, n, ...r) {
+         const i = this._before || this._after ? {
+             name: n,
+             args: r,
+             context: {}
+         } : void 0;
+         this._before && zm(this._before, i);
+         const o = t(n in this._hooks ? [...this._hooks[n]] : [], r);
+         return o instanceof Promise ? o.finally(() => {
+             this._after && i && zm(this._after, i)
+         }) : (this._after && i && zm(this._after, i), o)
+     }
+     beforeEach(t) {
+         return this._before = this._before || [], this._before.push(t), () => {
+             if (this._before !== void 0) {
+                 const n = this._before.indexOf(t);
+                 n !== -1 && this._before.splice(n, 1)
+             }
+         }
+     }
+     afterEach(t) {
+         return this._after = this._after || [], this._after.push(t), () => {
+             if (this._after !== void 0) {
+                 const n = this._after.indexOf(t);
+                 n !== -1 && this._after.splice(n, 1)
+             }
+         }
+     }
+ }

=== Structural Changes ===

@@@ function 'bne' (was 'gne') — structural (64.0%)
--- first.pretty.js:51747
+++ third-beutiful.js:51738
@@ -1,6 +1,5 @@
-function gne(e, t, n) {
-    if (e.length > 0) {
+function bne(e, t) {
+    const n = t.shift(),
         const r = Ix(n);
         return Promise.all(e.map(i => r.run(() => i(...t))))
-    }
 }