Skip to content

Commit

Permalink
Upgrade escope and use the new API in js-analyze.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Newman committed Jul 23, 2015
1 parent 78d8afc commit bf353fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/dev-bundle-tool-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var packageJson = {
// https://github.com/jgm/CommonMark/issues/276 . If it does, remove the
// workaround from the tool.
"commonmark": "0.15.0",
escope: "1.0.1",
escope: "3.2.0",
// 2.4.0 (more or less, the package.json change isn't committed) plus our PR
// https://github.com/williamwicks/node-eachline/pull/4
eachline: "https://github.com/meteor/node-eachline/tarball/ff89722ff94e6b6a08652bf5f44c8fffea8a21da",
Expand Down
6 changes: 3 additions & 3 deletions tools/isobuild/js-analyze.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { parse } from 'meteor-babel';
import escope from 'escope';
import { analyze as analyzeScope } from 'escope';

// Like babel.parse, but annotates any thrown error with $ParseError = true.
function tryToParse(source) {
Expand Down Expand Up @@ -43,8 +43,8 @@ export function findAssignedGlobals(source) {
//
// But it can't pull references outward, so for our purposes it is safe to
// ignore.
const scoper = escope.analyze(ast, { ignoreEval: true });
const globalScope = scoper.scopes[0];
const scopeManager = analyzeScope(ast, { ignoreEval: true });
const globalScope = scopeManager.acquire(ast);

const assignedGlobals = {};
// Underscore is not available in this package.
Expand Down

0 comments on commit bf353fc

Please sign in to comment.