ember.js
ember.js copied to clipboard
Add public import for `uniqueId` helper
This landed as available via string resolution at unique-id but did not come with a public import, meaning it doesn't currently work in <template>/strict mode. Per discussion at the Framework team meeting a few weeks ago, it should be exported from @ember/helper, the same as the other public helpers which are not built-ins (hash, array, concat, get, and fn etc.).
It needs two things to be public:
- [ ] #20171
- [ ] A note in the blog post for that release (which should be 4.8).
Additionally, we'll want to update ecosystem support for it:
- [x] add it to the list of allowed built-ins for the
no-curly-component-invocationrule inember-template-lint- ember-template-lint/ember-template-lint#2592
- ember-template-lint/ember-template-lint#2593
I should be able to take a look at this within a day or two. Should we also add it to the list of 'allowed' built-ins for the no-curly-component-invocation ember-template-lint rule?
@geneukum good call. Let me add that to the list of tasks – and also, a colleague mentioned to me late Friday that he’s also interested in helping; let's coordinate efforts in #dev-ember-js on Discord!
I've opened up the issue: https://github.com/ember-template-lint/ember-template-lint/issues/2592 and PR: https://github.com/ember-template-lint/ember-template-lint/pull/2593 to hopefully get the ember-template-lint part of this handled.
That colleague is me! That discord channel link doesn't seem to work. Edit: Okay got it.
Question about the re-export, I see we're exposing these functions as part of global Ember object. Should we do that for this as well?
Ember._Input = Input;
Ember._hash = hash;
Ember._array = array;
Ember._concat = concat;
Ember._get = get;
Ember._on = on;
Ember._fn = fn;
does this issue still need fixing?