Previously, computed class properties would be evaluated every time a
new instance of the class was created. This means the property name
may have changed between different instances, as well as potential side
effects.
This commit fixes this by storing the computed value in a separate
variable.
* centralize plugin options
* Centralize plugins options
- move more options to the top
- move validations that depend on options to the top
* use isLoose option
* Move more validations to the top
* Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top
* fix eslint errors
* remove unused parameter
* set default systemGlobal value
* Revert "Move ref parameter for rewriteModuleStatementsAndPrepareHeader() to the top"
This reverts commit b3855302d17fa19d8acb4c8accab3680c8d2710e.
* Revert "Move more validations to the top"
This reverts commit e5861d8a034ff8f553391f55654f753bcf428a5d.
* fix allowMutablePropsOnTags option usage
* improve naming
* change Contructor definition for sake of consistency
* move allowMutablePropsOnTags validation to the top
* add missing !
Supports:
```js
// these all should produce "code;" when generated
template`code;`();
template`${0}`(t.identifier('code'));
template`${'code'}`({ code: t.identifier('code') });
template`${t.identifier('code')}`()
template({})`code`();
```
This prevents a requeued path from inheriting a totally wrong scope later on. I can't find exactly where this is happening, but either way a path should only inherit scope from it's ancestors.
* Add support for helpers dependencies.
They are used like this:
helpers.main = defineHelper(`
import dep from "dependency";
export default function main() { return dependency; }
`);
helpers.dependency = defineHelper(`ì
export default function dep() { return 0; }
`);
* Clone import references
* Don't make test helpers name depend on the order the tests are run