diff --git a/CHANGES.md b/CHANGES.md index b95eb9a9fd..bd26a3ee33 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,6 @@ +### 17.0.10 +- Fix Mop support again + ### v17.0.5 - Fix undefined 'deprecate' in AbstractTextField and AbstractTextArea diff --git a/core/event/event-manager.js b/core/event/event-manager.js index 46325961d0..e1ed452fba 100644 --- a/core/event/event-manager.js +++ b/core/event/event-manager.js @@ -2888,6 +2888,4 @@ if (typeof window !== "undefined") { // client-side }); - defaultEventManager = new EventManager().initWithWindow(window); - } // client-side diff --git a/montage.js b/montage.js index 6264400ff7..d77ef72ee1 100644 --- a/montage.js +++ b/montage.js @@ -14,7 +14,6 @@ } }(this, function (require, exports, module) { - "use strict"; // reassigning causes eval to not use lexical scope. @@ -24,6 +23,8 @@ /*jshint evil:false */ // Here we expose global for legacy mop support. + // TODO move to mr cause it's loader role to expose + // TODO make sure mop closure has it also cause it's mop role to expose global.global = global; /** @@ -484,7 +485,7 @@ browser.load(resolve(montageLocation, pending.promise), function() { delete pending.promise; - //global.bootstrap cleans itself from window once all known are loaded. "bluebird" is not known, so needs to do it first + //global.bootstrap cleans itself from global once all known are loaded. "bluebird" is not known, so needs to do it first global.bootstrap("bluebird", function (require, exports) { return global.Promise; }); @@ -495,14 +496,15 @@ for (var id in pending) { browser.load(resolve(montageLocation, pending[id])); } + }); + } else { global.nativePromise = global.Promise; Object.defineProperty(global, "Promise", { configurable: true, set: function(PromiseValue) { - Object.defineProperty(global, "Promise", { value: PromiseValue }); @@ -579,10 +581,15 @@ montageRequire(iDependency); } - var defaultEventManager = montageRequire("core/event/event-manager").defaultEventManager; + var Montage = montageRequire("core/core").Montage; + var EventManager = montageRequire("core/event/event-manager").EventManager; var MontageReviver = montageRequire("core/serialization/deserializer/montage-reviver").MontageReviver; + var logger = montageRequire("core/logger").logger; + + var defaultEventManager, application; - var application; + // Load the event-manager + defaultEventManager = new EventManager().initWithWindow(window); // montageWillLoad is mostly for testing purposes if (typeof global.montageWillLoad === "function") { @@ -635,4 +642,4 @@ } return exports; -})); \ No newline at end of file +})); diff --git a/node.js b/node.js index c5a9ee2fd4..379b0a4776 100644 --- a/node.js +++ b/node.js @@ -63,17 +63,7 @@ MontageBoot.loadPackage = function (location, config) { config.overlays = ["node", "server", "montage"]; config.location = URL.resolve(Require.getLocation(), location); - // setup serialization compiler - config.makeCompiler = function (config) { - return Require.makeCompiler(config) - }; - - return Require.loadPackage(config.location, config).then(function (moduleRequire) { - // Inject current montage to avoid montage require - return moduleRequire.async('montage').then(function (montage) { - return moduleRequire; - }); - }); + return Require.loadPackage(config.location, config); }; MontageBoot.TemplateLoader = function (config, load) { @@ -102,6 +92,10 @@ MontageBoot.TemplateLoader = function (config, load) { if (stat.isFile()) { module.extraDependencies = [id + ".html"]; } + }, function (error) { + // not a problem + // montage/ui/loader.reel/loader.html": Error: ENOENT: no such file or directory + console.log(error.message); }); }); } else { diff --git a/package.json b/package.json index 128d875de7..7753af55d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "montage", - "version": "17.0.9", + "version": "17.0.10", "description": "Build your next application with a browser based platform that really gets the web.", "license": "BSD-3-Clause", "repository": { diff --git a/test/run-node.js b/test/run-node.js index 0769fa863d..2da8e690a6 100644 --- a/test/run-node.js +++ b/test/run-node.js @@ -39,10 +39,17 @@ jasmineEnv.addReporter({ } }); -// Execute +// Load package Montage.loadPackage(PATH.join(__dirname, "."), { mainPackageLocation: PATH.join(__dirname, "../") }) +// Preload montage to avoid montage-testing/montage to be loaded +.then(function (mr) { + return mr.async('montage').then(function (montage) { + return mr; + }); +}) +// Execute .then(function (mr) { return mr.async("all"); }).then(function () {