Colocation babel plugin drops class decorators
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- babel, javascript
- Domain
- build-system, tooling
Research direction
Start with the colocation Babel transform that handles the default export, using the provided AST Explorer example to reproduce the dropped class decorator. Preserve the decorator in the transformed class expression and verify that the generated output retains @dec.
Written by the indexing model from the issue text.
Description
With an input like
import hbs from 'ember-cli-htmlbars-inline-precompile';
const __COLOCATED_TEMPLATE__ = hbs`{{yield}}`;
export default @dec class {}
The class decorator @dec gets dropped:
import hbs from 'ember-cli-htmlbars-inline-precompile';
const __COLOCATED_TEMPLATE__ = hbs`{{yield}}`;
export default Ember._setComponentTemplate(__COLOCATED_TEMPLATE__, class {});
See example https://astexplorer.net/#/gist/4fb9360091ca6422ca0f9e4ee8ef9505/90046a397d94a8ccf8e97c17fd4f2d0cb867a129
I think all that is required to fix is to pass defaultExportDeclaration.decorators as the fourth argument to t.classExpression().
- Dominant language
- JavaScript
- Stars
- 77
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ember-cli/ember-cli-htmlbars
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
ember-cli/ember-cli-htmlbars#792 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ember-cli/ember-cli-htmlbars#787 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
ember-cli/ember-cli-htmlbars#781 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
ember-cli/ember-cli-htmlbars#779 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
ember-cli/ember-cli-htmlbars#774 · 2 comments ·
All issues in ember-cli/ember-cli-htmlbars
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100