userscript-webpack-patcher 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -68,6 +68,9 @@ var userscriptWebpackPatcher = (function (exports) {
68
68
  gPatches = patchShareCallbacks.map((callback) => callback(this)).flat();
69
69
  const proxiedModuleFactories = new Proxy(value, moduleFactoriesHandler);
70
70
  define(this, "m", { value: proxiedModuleFactories });
71
+ for (const id of Reflect.ownKeys(value)) {
72
+ moduleFactoriesHandler.set(value, id, value[id], value);
73
+ }
71
74
  Reflect.deleteProperty(Function.prototype, "m");
72
75
  }
73
76
  });
@@ -78,6 +81,24 @@ var userscriptWebpackPatcher = (function (exports) {
78
81
  });
79
82
  }
80
83
 
84
+ /*
85
+ * The contents of this file are taken directly from the Vencord
86
+ * project, with some modifications
87
+ * Copyright (c) 2022 Vendicated and contributors
88
+ *
89
+ * This program is free software: you can redistribute it and/or modify
90
+ * it under the terms of the GNU General Public License as published by
91
+ * the Free Software Foundation, either version 3 of the License, or
92
+ * (at your option) any later version.
93
+ *
94
+ * This program is distributed in the hope that it will be useful,
95
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
96
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
97
+ * GNU General Public License for more details.
98
+ *
99
+ * You should have received a copy of the GNU General Public License
100
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
101
+ */
81
102
  // Proxies demand that these properties be unmodified, so proxyLazy
82
103
  // will always return the function default for them.
83
104
  const unconfigurable = ["arguments", "caller", "prototype"];
@@ -65,6 +65,9 @@ function init({ patches }) {
65
65
  gPatches = patchShareCallbacks.map((callback) => callback(this)).flat();
66
66
  const proxiedModuleFactories = new Proxy(value, moduleFactoriesHandler);
67
67
  define(this, "m", { value: proxiedModuleFactories });
68
+ for (const id of Reflect.ownKeys(value)) {
69
+ moduleFactoriesHandler.set(value, id, value[id], value);
70
+ }
68
71
  Reflect.deleteProperty(Function.prototype, "m");
69
72
  }
70
73
  });
@@ -75,6 +78,24 @@ function init({ patches }) {
75
78
  });
76
79
  }
77
80
 
81
+ /*
82
+ * The contents of this file are taken directly from the Vencord
83
+ * project, with some modifications
84
+ * Copyright (c) 2022 Vendicated and contributors
85
+ *
86
+ * This program is free software: you can redistribute it and/or modify
87
+ * it under the terms of the GNU General Public License as published by
88
+ * the Free Software Foundation, either version 3 of the License, or
89
+ * (at your option) any later version.
90
+ *
91
+ * This program is distributed in the hope that it will be useful,
92
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
93
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
94
+ * GNU General Public License for more details.
95
+ *
96
+ * You should have received a copy of the GNU General Public License
97
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
98
+ */
78
99
  // Proxies demand that these properties be unmodified, so proxyLazy
79
100
  // will always return the function default for them.
80
101
  const unconfigurable = ["arguments", "caller", "prototype"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "userscript-webpack-patcher",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Library meant for use in userscripts that allows for the simple patching of webpack modules.",
5
5
  "homepage": "https://github.com/LeviOP/userscript-webpack-patcher#readme",
6
6
  "bugs": {
@@ -29,12 +29,11 @@
29
29
  "rollup": "^4.45.0",
30
30
  "rollup-plugin-dts": "^6.2.1",
31
31
  "tslib": "^2.8.1",
32
- "tsup": "^8.5.0",
33
32
  "typescript": "~5.8.3",
34
33
  "typescript-eslint": "^8.36.0"
35
34
  },
36
35
  "scripts": {
37
- "dev": "tsup --watch src/**/*.ts",
38
- "build": "tsup"
36
+ "dev": "rollup --config --watch",
37
+ "build": "rollup --config"
39
38
  }
40
39
  }