Skip to content

Commit

Permalink
Quick bugfix of an untagged parse node
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosuav committed Oct 17, 2024
1 parent f24b5bc commit a8b4c42
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion chocimport.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, []);
},
Expand Down
2 changes: 1 addition & 1 deletion chocimport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chocfactory",
"version": "1.8.0",
"version": "1.8.1",
"description": "Simple JS front end library",
"main": "factory.js",
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions whatsnew.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit a8b4c42

Please sign in to comment.