mirror of
https://github.com/Equicord/Equicord.git
synced 2025-02-21 23:58:52 -05:00
Merge remote-tracking branch 'upstream/dev' into dev
This commit is contained in:
commit
125a8825b3
3 changed files with 15 additions and 19 deletions
18
package.json
18
package.json
|
@ -93,7 +93,7 @@
|
||||||
"zip-local": "^0.3.5",
|
"zip-local": "^0.3.5",
|
||||||
"zustand": "^3.7.2"
|
"zustand": "^3.7.2"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@9.1.0",
|
"packageManager": "pnpm@10.4.1",
|
||||||
"pnpm": {
|
"pnpm": {
|
||||||
"patchedDependencies": {
|
"patchedDependencies": {
|
||||||
"eslint@9.20.1": "patches/eslint@9.20.1.patch",
|
"eslint@9.20.1": "patches/eslint@9.20.1.patch",
|
||||||
|
@ -109,18 +109,14 @@
|
||||||
"source-map-resolve": "*",
|
"source-map-resolve": "*",
|
||||||
"resolve-url": "*",
|
"resolve-url": "*",
|
||||||
"source-map-url": "*",
|
"source-map-url": "*",
|
||||||
"urix": "*"
|
"urix": "*",
|
||||||
}
|
"q": "*"
|
||||||
},
|
|
||||||
"webExt": {
|
|
||||||
"artifactsDir": "./dist",
|
|
||||||
"build": {
|
|
||||||
"overwriteDest": true
|
|
||||||
},
|
},
|
||||||
"sourceDir": "./dist/firefox-unpacked"
|
"onlyBuiltDependencies": [
|
||||||
|
"esbuild"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18",
|
"node": ">=18"
|
||||||
"pnpm": ">=9"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ export async function loadLazyChunks() {
|
||||||
|
|
||||||
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
|
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
.then(t => t.includes("importScripts("));
|
.then(t => /importScripts\(|self\.postMessage/.test(t));
|
||||||
|
|
||||||
if (isWorkerAsset) {
|
if (isWorkerAsset) {
|
||||||
invalidChunks.add(id);
|
invalidChunks.add(id);
|
||||||
|
@ -174,7 +174,7 @@ export async function loadLazyChunks() {
|
||||||
await Promise.all(chunksLeft.map(async id => {
|
await Promise.all(chunksLeft.map(async id => {
|
||||||
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
|
const isWorkerAsset = await fetch(wreq.p + wreq.u(id))
|
||||||
.then(r => r.text())
|
.then(r => r.text())
|
||||||
.then(t => t.includes("importScripts("));
|
.then(t => /importScripts\(|self\.postMessage/.test(t));
|
||||||
|
|
||||||
// Loads the chunk. Currently this only happens with the language packs which are loaded differently
|
// Loads the chunk. Currently this only happens with the language packs which are loaded differently
|
||||||
if (!isWorkerAsset) {
|
if (!isWorkerAsset) {
|
||||||
|
|
|
@ -298,11 +298,6 @@ function updateExistingFactory(moduleFactories: AnyWebpackRequire["m"], moduleId
|
||||||
}
|
}
|
||||||
|
|
||||||
if (existingFactory != null) {
|
if (existingFactory != null) {
|
||||||
// Sanity check to make sure these factories are equal
|
|
||||||
if (String(newFactory) !== String(existingFactory)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// If existingFactory exists in any of the Webpack instances we track, it's either wrapped in our proxy, or it has already been required.
|
// If existingFactory exists in any of the Webpack instances we track, it's either wrapped in our proxy, or it has already been required.
|
||||||
// In the case it is wrapped in our proxy, and the instance we are setting does not already have it, we need to make sure the instance contains our proxy too.
|
// In the case it is wrapped in our proxy, and the instance we are setting does not already have it, we need to make sure the instance contains our proxy too.
|
||||||
if (moduleFactoriesWithFactory !== moduleFactories && existingFactory[SYM_IS_PROXIED_FACTORY]) {
|
if (moduleFactoriesWithFactory !== moduleFactories && existingFactory[SYM_IS_PROXIED_FACTORY]) {
|
||||||
|
@ -575,8 +570,13 @@ function patchFactory(moduleId: PropertyKey, originalFactory: AnyModuleFactory):
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const pluginsList = [...patchedBy];
|
||||||
|
if (!patchedBy.has(patch.plugin)) {
|
||||||
|
pluginsList.push(patch.plugin);
|
||||||
|
}
|
||||||
|
|
||||||
code = newCode;
|
code = newCode;
|
||||||
patchedSource = `// Webpack Module ${String(moduleId)} - Patched by ${[...patchedBy, patch.plugin].join(", ")}\n${newCode}\n//# sourceURL=WebpackModule${String(moduleId)}`;
|
patchedSource = `// Webpack Module ${String(moduleId)} - Patched by ${pluginsList.join(", ")}\n${newCode}\n//# sourceURL=WebpackModule${String(moduleId)}`;
|
||||||
patchedFactory = (0, eval)(patchedSource);
|
patchedFactory = (0, eval)(patchedSource);
|
||||||
|
|
||||||
if (!patchedBy.has(patch.plugin)) {
|
if (!patchedBy.has(patch.plugin)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue