From 9d55a1edc7f6fd2bc44e8f5d5f7408e695fba035 Mon Sep 17 00:00:00 2001 From: Rob Wu Date: Sat, 17 Feb 2018 01:09:17 +0100 Subject: [PATCH] Ignore managed prefs documented as "Deprecated." Deprecated keys are removed from web/default_preferences.json, but still maintained in managed_preferences.json. --- gulpfile.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gulpfile.js b/gulpfile.js index 4d2bdc808..3568da316 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -192,6 +192,13 @@ function getVersionJSON() { function checkChromePreferencesFile(chromePrefsPath, webPrefsPath) { var chromePrefs = JSON.parse(fs.readFileSync(chromePrefsPath).toString()); var chromePrefsKeys = Object.keys(chromePrefs.properties); + chromePrefsKeys = chromePrefsKeys.filter(function (key) { + var description = chromePrefs.properties[key].description; + // Deprecated keys are allowed in the managed preferences file. + // The code maintained is responsible for adding migration logic to + // extensions/chromium/options/migration.js and web/chromecom.js . + return !description || !description.startsWith('DEPRECATED.'); + }); chromePrefsKeys.sort(); var webPrefs = JSON.parse(fs.readFileSync(webPrefsPath).toString()); var webPrefsKeys = Object.keys(webPrefs);