Skip to content

Commit

Permalink
Ignore managed prefs documented as "Deprecated."
Browse files Browse the repository at this point in the history
Deprecated keys are removed from web/default_preferences.json,
but still maintained in managed_preferences.json.
  • Loading branch information
Rob--W committed Feb 17, 2018
1 parent 6e646b8 commit 14d1b96
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. 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);
Expand Down

0 comments on commit 14d1b96

Please sign in to comment.