jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/359017 )

Change subject: Bump HTML version to 1.5.0
......................................................................


Bump HTML version to 1.5.0

* Now that Parsoid HTML has redlinks, disambig links, and
  redirect links marked up in its output, bump the version
  so clients that want to can specifically request this version
  from RESTbase.

Change-Id: I224e8c740c7d5666b64fac24994a81c2f12f33c9
---
M bin/roundtrip-test.js
M lib/config/MWParserEnvironment.js
M tests/mocha/api.js
M tests/mocha/templatedata.js
4 files changed, 14 insertions(+), 15 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified
  Arlolra: Looks good to me, approved



diff --git a/bin/roundtrip-test.js b/bin/roundtrip-test.js
index 6d0ff63..e8468e7 100755
--- a/bin/roundtrip-test.js
+++ b/bin/roundtrip-test.js
@@ -16,8 +16,7 @@
 
 var gzip = Promise.promisify(require('zlib').gzip, false);
 
-var defaultContentVersion = '1.4.0';
-
+var defaultContentVersion = '1.5.0';
 
 function displayDiff(type, count) {
        var pad = (10 - type.length);  // Be positive!
diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 66448a7..bca09ca 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -695,7 +695,7 @@
  *
  * @property {Array} availableVersions
  */
-MWParserEnvironment.prototype.availableVersions = ['1.4.0', '2.0.0'];
+MWParserEnvironment.prototype.availableVersions = ['1.5.0', '2.0.0'];
 
 /**
  * The default content version that Parsoid will generate.
diff --git a/tests/mocha/api.js b/tests/mocha/api.js
index 15fe03a..b8d81ec 100644
--- a/tests/mocha/api.js
+++ b/tests/mocha/api.js
@@ -22,7 +22,7 @@
 parsoidOptions.useBatchAPI = true;
 parsoidOptions.linting = true;
 
-var defaultContentVersion = '1.4.0';
+var defaultContentVersion = '1.5.0';
 
 describe('Parsoid API', function() {
        var api, runner;
@@ -236,7 +236,7 @@
                        request(api)
                        .post(mockDomain + '/v3/transform/wikitext/to/html/')
                        .set('Accept',
-                               'text/html; 
profile="https://www.mediawiki.org/wiki/Specs/HTML/1.4.0";; q=0.5,' +
+                               'text/html; 
profile="https://www.mediawiki.org/wiki/Specs/HTML/1.5.0";; q=0.5,' +
                                'text/html; 
profile="https://www.mediawiki.org/wiki/Specs/HTML/2.0.0";; q=0.8')
                        .send({ wikitext: '== h2 ==' })
                        .expect(200)
@@ -249,7 +249,7 @@
                        request(api)
                        .post(mockDomain + 
'/v3/transform/wikitext/to/pagebundle/')
                        .set('Accept',
-                               'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/1.4.0";; q=0.5,' +
+                               'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/1.5.0";; q=0.5,' +
                                'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/2.0.0";; q=0.8')
                        .send({ wikitext: '== h2 ==' })
                        .expect(200)
@@ -281,7 +281,7 @@
                        .set('Accept', 'text/html; 
profile="mediawiki.org/specs/html/1.2.1"')
                        .send({ wikitext: '{{echo|hi}}' })
                        .expect(200)
-                       .expect(acceptableHtmlResponse('1.4.0'))
+                       .expect(acceptableHtmlResponse('1.5.0'))
                        .end(done);
                });
 
@@ -291,12 +291,12 @@
                        .set('Accept', 'text/html; 
profile="mediawiki.org/specs/html/1.2.1"')
                        .send({ wikitext: '{{echo|hi}}' })
                        .expect(200)
-                       .expect(acceptablePageBundleResponse('1.4.0'))
+                       .expect(acceptablePageBundleResponse('1.5.0'))
                        .end(done);
                });
 
                it('should accept requests for content version 1.x (html)', 
function(done) {
-                       var contentVersion = '1.4.0';
+                       var contentVersion = '1.5.0';
                        request(api)
                        .post(mockDomain + '/v3/transform/wikitext/to/html/')
                        .set('Accept', 'text/html; 
profile="https://www.mediawiki.org/wiki/Specs/HTML/' + contentVersion + '"')
@@ -307,7 +307,7 @@
                });
 
                it('should accept requests for content version 1.x 
(pagebundle)', function(done) {
-                       var contentVersion = '1.4.0';
+                       var contentVersion = '1.5.0';
                        request(api)
                        .post(mockDomain + 
'/v3/transform/wikitext/to/pagebundle/')
                        .set('Accept', 'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/' + contentVersion + 
'"')
@@ -1056,7 +1056,7 @@
                                        },
                                        "data-parsoid": {
                                                headers: {
-                                                       'content-type': 
'application/json;profile="https://www.mediawiki.org/wiki/Specs/data-parsoid/1.4.0";',
+                                                       'content-type': 
'application/json;profile="https://www.mediawiki.org/wiki/Specs/data-parsoid/1.5.0";',
                                                },
                                                body: {
                                                        "counter": 14,
@@ -1333,7 +1333,7 @@
                                        },
                                        html: {
                                                headers: {
-                                                       'content-type': 
'text/html;profile="https://www.mediawiki.org/wiki/Specs/HTML/1.4.0";',
+                                                       'content-type': 
'text/html;profile="https://www.mediawiki.org/wiki/Specs/HTML/1.5.0";',
                                                },
                                                body: '<p about="#mwt1" 
typeof="mw:Transclusion" id="mwAQ">ho</p>',
                                        },
@@ -1733,7 +1733,7 @@
                });
 
                it('should refuse an unknown conversion (1.x -> 2.x)', 
function(done) {
-                       
previousRevHTML.html.headers['content-type'].should.equal('text/html;profile="https://www.mediawiki.org/wiki/Specs/HTML/1.4.0";');
+                       
previousRevHTML.html.headers['content-type'].should.equal('text/html;profile="https://www.mediawiki.org/wiki/Specs/HTML/1.5.0";');
                        request(api)
                        .post(mockDomain + 
'/v3/transform/pagebundle/to/pagebundle/Reuse_Page/100')
                        .set('Accept', 'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/2.0.0";')
@@ -1745,7 +1745,7 @@
                });
 
                it('should downgrade 2.x content to 1.x', function(done) {
-                       var contentVersion = '1.4.0';
+                       var contentVersion = '1.5.0';
                        request(api)
                        .post(mockDomain + 
'/v3/transform/pagebundle/to/pagebundle/')
                        .set('Accept', 'application/json; 
profile="https://www.mediawiki.org/wiki/Specs/pagebundle/' + contentVersion + 
'"')
diff --git a/tests/mocha/templatedata.js b/tests/mocha/templatedata.js
index baade74..27b65e5 100644
--- a/tests/mocha/templatedata.js
+++ b/tests/mocha/templatedata.js
@@ -17,7 +17,7 @@
 var parsoidOptions = yaml.load(optionsYaml).services[0].conf;
 
 var api, runner;
-var defaultContentVersion = '1.4.0';
+var defaultContentVersion = '1.5.0';
 var mockDomain = 'customwiki';
 
 function verifyTransformation(newHTML, origHTML, origWT, expectedWT, done, 
dpVersion) {

-- 
To view, visit https://gerrit.wikimedia.org/r/359017
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I224e8c740c7d5666b64fac24994a81c2f12f33c9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: C. Scott Ananian <canan...@wikimedia.org>
Gerrit-Reviewer: GWicke <gwi...@wikimedia.org>
Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org>
Gerrit-Reviewer: Ppchelko <ppche...@wikimedia.org>
Gerrit-Reviewer: Subramanya Sastry <ssas...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to