-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from glimmerjs/private-local-declaration-fix
Read scope variables from current path instead of top level program
- Loading branch information
Showing
11 changed files
with
190 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
...limmerx/babel-plugin-component-templates/test/fixtures/private-local-declarations/code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Component, { hbs } from '@glimmerx/component'; | ||
|
||
function root() { | ||
function nested() { | ||
class OtherComponent extends Component { | ||
static template = hbs`Hello World`; | ||
} | ||
|
||
class MyComponent extends Component { | ||
static template = hbs`<h1><OtherComponent/></h1>` | ||
} | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...mmerx/babel-plugin-component-templates/test/fixtures/private-local-declarations/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { setComponentTemplate as _setComponentTemplate } from "@glimmer/core"; | ||
import Component from '@glimmerx/component'; | ||
|
||
function root() { | ||
function nested() { | ||
class OtherComponent extends Component {} | ||
|
||
_setComponentTemplate({ | ||
id: "L9WxEO3m", | ||
block: "{\"symbols\":[],\"statements\":[[2,\"Hello World\"]],\"hasEval\":false,\"upvars\":[]}", | ||
meta: { | ||
scope: () => ({}) | ||
} | ||
}, OtherComponent) | ||
|
||
class MyComponent extends Component {} | ||
|
||
_setComponentTemplate({ | ||
id: "X+3KCppa", | ||
block: "{\"symbols\":[],\"statements\":[[10,\"h1\"],[12],[8,\"OtherComponent\",[],[[],[]],null],[13]],\"hasEval\":false,\"upvars\":[]}", | ||
meta: { | ||
scope: () => ({ | ||
OtherComponent: OtherComponent | ||
}) | ||
} | ||
}, MyComponent) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.