Mholloway has uploaded a new change for review. https://gerrit.wikimedia.org/r/297929
Change subject: Replace phpjs with locutus ...................................................................... Replace phpjs with locutus phpjs[1] does not appear to be actively maintained, and its github link on npmjs.com redirects to locutus[2], which is actively maintained[3] and effectively incorporates phpjs. We should use locutus instead. [1] https://www.npmjs.com/package/phpjs [2] https://www.npmjs.com/package/locutus [3] https://github.com/kvz/locutus Change-Id: Ib9ad8e62f4ae9781d2648f888488ce0f963c1ac3 --- M lib/anchorencode.js M package.json 2 files changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps refs/changes/29/297929/1 diff --git a/lib/anchorencode.js b/lib/anchorencode.js index 47b6304..5823e2e 100644 --- a/lib/anchorencode.js +++ b/lib/anchorencode.js @@ -1,11 +1,6 @@ 'use strict'; -/** - JS implementation of anchorencode. - - */ - -var php = require('phpjs'); +var urlencode = require('locutus/php/url/urlencode'); /** * Encodes an input string so that it can be used as an HTML anchor id (e.g. for a section in a page: <h2 id="anchor">). @@ -21,7 +16,7 @@ */ function anchorencode(input) { var id = input.replace(/\s+/g, '_'); - return php.urlencode(id) + return urlencode(id) .replace(/%3A/g, ':') .replace(/%/g, '.'); } diff --git a/package.json b/package.json index 9aa7b52..61924e4 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "domino": "^1.0.25", "express": "^4.13.4", "js-yaml": "^3.6.1", - "phpjs": "^1.3.2", + "locutus": "^2.0.5", "preq": "^0.4.9", "service-runner": "^1.3.1", "swagger-router": "^0.4.5", -- To view, visit https://gerrit.wikimedia.org/r/297929 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ib9ad8e62f4ae9781d2648f888488ce0f963c1ac3 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/mobileapps Gerrit-Branch: master Gerrit-Owner: Mholloway <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
