https://en.wikipedia.org/w/index.php?action=history&feed=atom&title=Module%3ADeprecated Module:Deprecated - Revision history 2025-05-26T02:32:17Z Revision history for this page on the wiki MediaWiki 1.45.0-wmf.2 https://en.wikipedia.org/w/index.php?title=Module:Deprecated&diff=1283124278&oldid=prev Awesome Aasim at 15:49, 30 March 2025 2025-03-30T15:49:00Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 15:49, 30 March 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 1:</td> <td colspan="2" class="diff-lineno">Line 1:</td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>--- Marks <del style="font-weight: bold; text-decoration: none;">functions</del> as deprecated, and provides a warning when they are called.</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>--- Marks <ins style="font-weight: bold; text-decoration: none;">items</ins> as deprecated, and provides a warning when they are called.</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- @release alpha</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- @release alpha</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- @author [[User:Awesome_Aasim|Awesome Aasim]]</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>-- @author [[User:Awesome_Aasim|Awesome Aasim]]</div></td> </tr> </table> Awesome Aasim https://en.wikipedia.org/w/index.php?title=Module:Deprecated&diff=1282678993&oldid=prev Awesome Aasim at 23:26, 27 March 2025 2025-03-27T23:26:07Z <p></p> <table style="background-color: #fff; color: #202122;" data-mw="interface"> <col class="diff-marker" /> <col class="diff-content" /> <col class="diff-marker" /> <col class="diff-content" /> <tr class="diff-title" lang="en"> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">← Previous revision</td> <td colspan="2" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 23:26, 27 March 2025</td> </tr><tr> <td colspan="2" class="diff-lineno">Line 30:</td> <td colspan="2" class="diff-lineno">Line 30:</td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> warn(</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> warn(</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> mw.ustring.format(</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> mw.ustring.format(</div></td> </tr> <tr> <td class="diff-marker" data-marker="−"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div> "Deprecated member &lt;code&gt;%s&lt;/code&gt; called ", index</div></td> <td class="diff-marker" data-marker="+"></td> <td style="color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div> "Deprecated member &lt;code&gt;%s&lt;/code&gt; called<ins style="font-weight: bold; text-decoration: none;">.</ins> ", index</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ) .. (</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> ) .. (</div></td> </tr> <tr> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> deprecatedTable[index]["replacement"]</div></td> <td class="diff-marker"></td> <td style="background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div> deprecatedTable[index]["replacement"]</div></td> </tr> </table> Awesome Aasim https://en.wikipedia.org/w/index.php?title=Module:Deprecated&diff=1281554767&oldid=prev Awesome Aasim: module to mark modules or member items as deprecated 2025-03-21T01:53:59Z <p>module to mark modules or member items as deprecated</p> <p><b>New page</b></p><div>--- Marks functions as deprecated, and provides a warning when they are called.<br /> -- @release alpha<br /> -- @author [[User:Awesome_Aasim|Awesome Aasim]]<br /> -- @function deprecated<br /> -- @param {table} p package frame<br /> -- @param deprecatedTable <br /> -- @return package<br /> <br /> return function(p, deprecatedTable, replacement)<br /> local pckg = {}<br /> --- Warn<br /> -- @param {string} text warning text<br /> function warn(text)<br /> local tb = debug.traceback()<br /> mw.log(text .. &#039;\n&#039; .. tb)<br /> mw.addWarning(text .. tb:gsub(&quot;\n&quot;, &quot;&lt;br/&gt;&quot;):gsub(&quot;\t&quot;, &quot;&amp;emsp;&quot;))<br /> end<br /> if deprecatedTable == nil or deprecatedTable == true then<br /> deprecatedTable = {}<br /> for k,_ in pairs(p) do<br /> deprecatedTable[k] = {<br /> deprecated = true,<br /> replacement = replacement or &quot;&quot;<br /> }<br /> end<br /> end<br /> setmetatable(pckg, {<br /> __index = function(t, index)<br /> if deprecatedTable[index] and deprecatedTable[index][&quot;deprecated&quot;] then<br /> warn(<br /> mw.ustring.format(<br /> &quot;Deprecated member &lt;code&gt;%s&lt;/code&gt; called &quot;, index<br /> ) .. (<br /> deprecatedTable[index][&quot;replacement&quot;]<br /> and mw.ustring.format(&quot;Please %s instead.&quot;, deprecatedTable[index][&quot;replacement&quot;])<br /> or &#039;&#039;<br /> )<br /> )<br /> end<br /> return p[index]<br /> end<br /> })<br /> return pckg<br /> end</div> Awesome Aasim