diff --git a/chocimport.js b/chocimport.js index 3444f0c..e559902 100755 --- a/chocimport.js +++ b/chocimport.js @@ -97,7 +97,7 @@ const elements = { descend(el.specifiers, state); }, - ["ImportSpecifier ImportDefaultSpecifier"]: (el, {scopes}) => { + ["ImportSpecifier ImportDefaultSpecifier ImportNamespaceSpecifier"]: (el, {scopes}) => { //Mark that it's a known variable but don't attach any code to it setdefault(scopes[scopes.length - 1], el.local.name, []); }, diff --git a/chocimport.py b/chocimport.py index 3f52282..8fd93f6 100644 --- a/chocimport.py +++ b/chocimport.py @@ -119,7 +119,7 @@ def ImportDeclaration(el, **kw): @element def ImportSpec(el, *, scopes, **kw): - """ImportSpecifier ImportDefaultSpecifier""" + """ImportSpecifier ImportDefaultSpecifier ImportNamespaceSpecifier""" scopes[-1].setdefault(el.local.name, []) # Mark that it's a known variable but don't attach any code to it @element diff --git a/factory.js b/factory.js index 942cf3b..aa92aa5 100644 --- a/factory.js +++ b/factory.js @@ -356,7 +356,7 @@ function autobind(obj, prop) { choc = new Proxy(choc, {get: autobind}); lindt = new Proxy(lindt, {get: autobind}); -choc.__version__ = "1.8.0"; +choc.__version__ = "1.8.1"; //For modules, make the main entry-point easily available. export default choc; diff --git a/package.json b/package.json index 88f3008..b475d37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "chocfactory", - "version": "1.8.0", + "version": "1.8.1", "description": "Simple JS front end library", "main": "factory.js", "scripts": { diff --git a/whatsnew.md b/whatsnew.md index 3241c98..dc1fb67 100644 --- a/whatsnew.md +++ b/whatsnew.md @@ -1,5 +1,8 @@ ## Chocolate Factory version history +### v1.8.1 +* Bugfix importers not recognizing "import * as name from ..." syntax + ### v1.8.0 * fix_dialogs has been renamed to apply_fixes, with the old name retained for