Bug 1226810 - Modifications to tern after upgrade;r=fitzgen
authorBrian Grinstead <bgrinstead@mozilla.com>
Wed, 16 Dec 2015 10:15:23 -0800
changeset 315856 e78afd6c4ede40e282ccf88ec5994c7eb6e68475
parent 315855 1d41e4792b7d3b4317e8130be6b02ee766360fed
child 315857 09c6b51e11ef7db960db25f01853474dccf44ac4
push id8469
push userbgrinstead@mozilla.com
push dateWed, 16 Dec 2015 19:53:11 +0000
reviewersfitzgen
bugs1226810
milestone46.0a1
Bug 1226810 - Modifications to tern after upgrade;r=fitzgen
devtools/client/sourceeditor/tern/README
devtools/client/sourceeditor/tern/infer.js
devtools/client/sourceeditor/tern/tern.js
--- a/devtools/client/sourceeditor/tern/README
+++ b/devtools/client/sourceeditor/tern/README
@@ -3,8 +3,11 @@ This is the Tern code-analysis engine pa
 Tern is a stand-alone code-analysis engine for JavaScript. It is intended to be used with a code editor plugin to enhance the editor's support for intelligent JavaScript editing
 
 
 # Upgrade
 
 Currently used version is 0.6.2.  To upgrade, download the latest release from http://ternjs.net/, and copy the files from lib/ into this directory.
 
 You may also need to update the CodeMirror plugin found in devtools/client/sourceeditor/codemirror/addon/tern, but it will most likely work without updating.
+
+Replace instances of `require("acorn")` with `require("acorn/acorn")`
+Replace instances of `acorn/dist/` with `acorn/`
\ No newline at end of file
--- a/devtools/client/sourceeditor/tern/infer.js
+++ b/devtools/client/sourceeditor/tern/infer.js
@@ -9,20 +9,20 @@
 
 // For memory-saving reasons, individual types export an interface
 // similar to abstract values (which can hold multiple types), and can
 // thus be used in place abstract values that only ever contain a
 // single type.
 
 (function(root, mod) {
   if (typeof exports == "object" && typeof module == "object") // CommonJS
-    return mod(exports, require("acorn"), require("acorn/dist/acorn_loose"), require("acorn/dist/walk"),
+    return mod(exports, require("acorn/acorn"), require("acorn/acorn_loose"), require("acorn/walk"),
                require("./def"), require("./signal"));
   if (typeof define == "function" && define.amd) // AMD
-    return define(["exports", "acorn/dist/acorn", "acorn/dist/acorn_loose", "acorn/dist/walk", "./def", "./signal"], mod);
+    return define(["exports", "acorn/acorn", "acorn/acorn_loose", "acorn/walk", "./def", "./signal"], mod);
   mod(root.tern || (root.tern = {}), acorn, acorn, acorn.walk, tern.def, tern.signal); // Plain browser env
 })(this, function(exports, acorn, acorn_loose, walk, def, signal) {
   "use strict";
 
   var toString = exports.toString = function(type, maxDepth, parent) {
     if (!type || type == parent || maxDepth && maxDepth < -3) return "?";
     return type.toString(maxDepth, parent);
   };
--- a/devtools/client/sourceeditor/tern/tern.js
+++ b/devtools/client/sourceeditor/tern/tern.js
@@ -2,19 +2,19 @@
 
 // A server is a stateful object that manages the analysis for a
 // project, and defines an interface for querying the code in the
 // project.
 
 (function(root, mod) {
   if (typeof exports == "object" && typeof module == "object") // CommonJS
     return mod(exports, require("./infer"), require("./signal"),
-               require("acorn"), require("acorn/dist/walk"));
+               require("acorn/acorn"), require("acorn/walk"));
   if (typeof define == "function" && define.amd) // AMD
-    return define(["exports", "./infer", "./signal", "acorn/dist/acorn", "acorn/dist/walk"], mod);
+    return define(["exports", "./infer", "./signal", "acorn/acorn", "acorn/walk"], mod);
   mod(root.tern || (root.tern = {}), tern, tern.signal, acorn, acorn.walk); // Plain browser env
 })(this, function(exports, infer, signal, acorn, walk) {
   "use strict";
 
   var plugins = Object.create(null);
   exports.registerPlugin = function(name, init) { plugins[name] = init; };
 
   var defaultOptions = exports.defaultOptions = {