Skip to content
This repository was archived by the owner on Jan 14, 2022. It is now read-only.

Commit efe010d

Browse files
author
Esteban Lopez
authored
Merge pull request #18 from manifoldjs/edge-extension-support
Edge extension platform support
2 parents c2c2155 + cb4acd1 commit efe010d

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

lib/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,6 @@ module.exports = {
4444
CHROME_MANIFEST_FORMAT: 'chromeos',
4545
FIREFOX_MANIFEST_FORMAT: 'firefox',
4646
WINDOWS10_MANIFEST_FORMAT: 'windows10',
47-
EDGE_EXTENSION_FORMAT: 'edgeextension',
47+
EDGE_EXTENSION_MANIFEST_FORMAT: 'edgeextension',
4848
validation: validationConstants
4949
};

lib/manifestTools/manifestLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function writeToFile (manifestInfo, filePath, callback) {
157157
}
158158

159159
function listAvailableManifestFormats() {
160-
return [constants.BASE_MANIFEST_FORMAT, constants.CHROME_MANIFEST_FORMAT];
160+
return [constants.BASE_MANIFEST_FORMAT, constants.CHROME_MANIFEST_FORMAT, constants.EDGE_EXTENSION_MANIFEST_FORMAT];
161161
}
162162

163163
module.exports = {

lib/manifestTools/manifestValidator.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,15 @@ function applyValidationRules(w3cManifestInfo, platformModules, platforms) {
136136
return Q.allSettled(platformTasks);
137137
}
138138

139-
// Don't run the "All Platform" validattion for Edge Extensions since they are not w3c compliant
140-
if (platforms.length === 1 && platforms[0] === constants.EDGE_EXTENSION_FORMAT) {
141-
return validatePlatform()
142-
.thenResolve(allResults);
143-
} else {
139+
// Only run the "All Platform" validations for W3C manifests
140+
if (w3cManifestInfo.format === constants.BASE_MANIFEST_FORMAT) {
144141
return validateAllPlatforms()
145142
.then(validatePlatform)
146143
.thenResolve(allResults);
147-
}
144+
} else {
145+
return validatePlatform()
146+
.thenResolve(allResults);
147+
}
148148
}
149149

150150
function validateManifest(w3cManifestInfo, platforms, callback) {

0 commit comments

Comments
 (0)