Skip to content

Commit

Permalink
Remove JSON polyfill, deprecate 'json' module
Browse files Browse the repository at this point in the history
All A-graded browsers now supports JSON so skip the
JSON polyfill. Krinkle investigated the current
status for 3 months on Wikimedia traffic (T141344#2784065)
with support being nearly 100%.

Bug: T141344
Change-Id: I8280faf1cbcd876ead2dafae4347b7d46e3e2acb
  • Loading branch information
soulgalore authored and legoktm committed Nov 22, 2016
1 parent 4c142e1 commit fd5c3b5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 533 deletions.
1 change: 0 additions & 1 deletion Gruntfile.js
Expand Up @@ -33,7 +33,6 @@ module.exports = function ( grunt ) {
// Skip functions aren't even parseable // Skip functions aren't even parseable
'!resources/src/dom-level2-skip.js', '!resources/src/dom-level2-skip.js',
'!resources/src/es5-skip.js', '!resources/src/es5-skip.js',
'!resources/src/json-skip.js',
'!resources/src/mediawiki.hidpi-skip.js' '!resources/src/mediawiki.hidpi-skip.js'
] ]
}, },
Expand Down
8 changes: 2 additions & 6 deletions resources/Resources.php
Expand Up @@ -334,7 +334,6 @@
'message' => 'Please use "mediawiki.storage" instead.', 'message' => 'Please use "mediawiki.storage" instead.',
], ],
'scripts' => 'resources/lib/jquery/jquery.jStorage.js', 'scripts' => 'resources/lib/jquery/jquery.jStorage.js',
'dependencies' => 'json',
], ],
'jquery.suggestions' => [ 'jquery.suggestions' => [
'scripts' => 'resources/src/jquery/jquery.suggestions.js', 'scripts' => 'resources/src/jquery/jquery.suggestions.js',
Expand Down Expand Up @@ -738,10 +737,10 @@


/* json2 */ /* json2 */


// Deprecated since MediaWiki 1.29.0
'json' => [ 'json' => [
'scripts' => 'resources/lib/json2/json2.js', 'deprecated' => 'Use of the "json" MediaWiki module is deprecated since MediaWiki 1.29.0',
'targets' => [ 'desktop', 'mobile' ], 'targets' => [ 'desktop', 'mobile' ],
'skipFunction' => 'resources/src/json-skip.js',
], ],


/* Moment.js */ /* Moment.js */
Expand Down Expand Up @@ -926,7 +925,6 @@
'dom-level2-shim', 'dom-level2-shim',
'mediawiki.api', 'mediawiki.api',
'mediawiki.api.edit', 'mediawiki.api.edit',
'json',
], ],
'targets' => [ 'desktop', 'mobile' ], 'targets' => [ 'desktop', 'mobile' ],
], ],
Expand Down Expand Up @@ -1109,7 +1107,6 @@
'dependencies' => [ 'dependencies' => [
'jquery.byteLength', 'jquery.byteLength',
'mediawiki.RegExp', 'mediawiki.RegExp',
'json',
], ],
'targets' => [ 'desktop', 'mobile' ], 'targets' => [ 'desktop', 'mobile' ],
], ],
Expand Down Expand Up @@ -2353,7 +2350,6 @@
'targets' => [ 'desktop', 'mobile' ], 'targets' => [ 'desktop', 'mobile' ],
'dependencies' => [ 'dependencies' => [
'es5-shim', 'es5-shim',
'json',
], ],
], ],


Expand Down

0 comments on commit fd5c3b5

Please sign in to comment.