machty / ember-concurrency

ember-concurrency is an Ember Addon that enables you to write concise, worry-free, cancelable, restartable, asynchronous tasks.
http://ember-concurrency.com
MIT License
691 stars 155 forks source link

Remove re-exports for helpers #573

Closed bertdeblock closed 3 months ago

bertdeblock commented 3 months ago

Probably an oversight during the v1 -> v2 conversion?

machty commented 3 months ago

Hmm how come we don't want this? Don't we still want ember-cli apps to have {{perform ...}} {{cancel-all ...}} and {{task ...}} to be available in pre-.gts components?

bertdeblock commented 3 months ago

That's what these are for => https://github.com/machty/ember-concurrency/blob/master/packages/ember-concurrency/package.json#L121-L124

machty commented 3 months ago

I'm sure you're correct, and I'm just about to merge this, but for posterity: where does _app_ folder come from? What is the configuration/mechanism that puts these helpers into dist/_app_/?

bertdeblock commented 3 months ago

The entries in the package.json file are auto-generated AFAIK, based on https://github.com/machty/ember-concurrency/blob/master/packages/ember-concurrency/rollup.config.mjs#L23.

This is done via a custom Rollup plugin in @embroider/addon-dev. Code that does the mapping => https://github.com/embroider-build/embroider/blob/main/packages/addon-dev/src/rollup-app-reexports.ts#L33.

The _app_ folder is generated by Embroider, based on the defined app reexports and is the v2-addon equivalent of the app folder in v1 addons.

You can see it in ember-concurrency's dist folder => https://www.npmjs.com/package/ember-concurrency?activeTab=code

Also note that, the app folder that is deleted in this PR currently isn't published => https://github.com/machty/ember-concurrency/blob/master/packages/ember-concurrency/package.json#L63-L68, proving it's redundant.