ember-render-modifiers icon indicating copy to clipboard operation
ember-render-modifiers copied to clipboard

Convert to V2 Addon

Open jrjohnson opened this issue 9 months ago • 2 comments

Ran pnpx ember-cli@latest addon @ember/render-modifiers -b @embroider/addon-blueprint --pnpm --skip-install --skip-git --typescript --addon-location=ember-render-modifiers and created everything from scratch then copied in modifiers, tests, and the PNPM version setting from ci.yml

Superseeds #66

Todo:

  • [ ] I'm not a typescript user, I used the typescript blueprint, but I don't know how to move the current types into this code. I'd assume declare them officially in the modifiers, but I don't know how to do that.
  • [ ] I'm not a release-it user and it doesn't seem to be part of the add-on blueprint anymore, this will need to be configured to work with the ember process.

jrjohnson avatar Mar 17 '25 05:03 jrjohnson

Awesome, thank you for working on this!

I'm not a typescript user, I used the typescript blueprint, but I don't know how to move the current types into this code. I'd assume declare them officially in the modifiers, but I don't know how to do that.

v2 addons are configured to use the /declarations folder instead of the /types folder, so you can probably move them there, which most likely needs some gitignore changes. There is also a declarations plugin in the rollup config file which might need to be disabled, since they aren't generated from the source.

I'm not a release-it user and it doesn't seem to be part of the add-on blueprint anymore, this will need to be configured to work with the ember process.

Most official Ember projects now use release-plan, which can only be setup by maintainers AFAIK, so I don't think you need to do anything release related in this conversion PR.

Windvis avatar Mar 19 '25 09:03 Windvis

I think the embroider scenarios fail because something is still bringing in ember-source v5. Probably because their ember-source peerDep doesn't support v6 yet.

If you run the scenario locally with pnpm ember try:one embroider-optimized --skip-cleanup you should be able to see why 5.12 is there by using pnpm why ember-source. Hopefully a dep bump can resolve it, but I'm guessing some sort of overrides config can fix it as well.

Edit: Now that I think of it, you probably don't need to run the scenario first here, since I'm guessing the same happens in the default setup but the classic build system just doesn't complain about it.

Edit edit: Ok now I remember, I did run into this myself. The addon's package.json also includes ember-source (for the types) but this doesn't match the version of the test-app.

Windvis avatar Mar 19 '25 09:03 Windvis

@Windvis thanks for the review. I think, but haven't gone back to confirm yet, that all of these issues are right off the embroider addon blueprint. My feeling is we should always stick as closely to the blueprint as possible to make updating easy.

jrjohnson avatar Apr 03 '25 16:04 jrjohnson