-
Notifications
You must be signed in to change notification settings - Fork 5
Embroider: Port to v2 format: fully convert to v2 native format #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The last dangling CI issues were solved by downgrading all monorepo packages to glimmer/component v1 (from v2). I think the issues is that component v2 doesn't work w/ ember before 4.8 (or 4.12?), and we are using yarn classic here which was probably doing some sort of module hosting that caused the ember 3.28 and 4.4 to want component-v1 but actually be using component-v2 and failing. |
8c05e4a
to
ca1a1fc
Compare
30cb76b
to
da4b59b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow!
Should probably update the contributing docs since those commands aren't correct anymore. There's probably a standard template for v2 addons that we can use or tweak. Moving to a v2 addon changes the developer workflow quite a bit too. For example, you have to run Also running locally, I get a ton of dependency warnings and eslint errors in the test-app. |
@eliasdawson-addepar Can you give some more details on this? |
…nstead of globally
7ec5877
to
1e4bdf3
Compare
I screenshared w/ @eliasdawson-addepar . It looks like there were some "workspace-aggregator" style yarn warnings -- I think those are typical for yarn (at least for yarn classic) and safe to ignore. We also get a warning from rollup about a possible broken sourcemap: I'll look more closely at this and address in a follow-up. The related rollup doc is here, but this doesn't give me much to go on: https://rollupjs.org/troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect And the eslint errors mentioned occur when there's a |
Paired separately. The dependency warnings we believe to be harmless for the time being and at least partially expected due to state of ember ecosystem. There is a sourcemap warning when building the addon which @bantic is going to investigate as a followup - it might be ok/just console noise, but my only concnern is that we don't break sourcemaps if they work currently. The lint errors in the test app were in |
I looked into the issue regarding the sourcemaps. The sourcemaps do seem to be there and be working correctly. I loaded the docs-app and poked around: The rollup warning mentions "rollup-hbs-plugin", which is defined here: I'm not familiar w/ embroider or rollup to know exactly what that is doing. I don't see anything explicit about a sourcemap there. |
The last step in the embroider guide: https://github.com/embroider-build/embroider/blob/main/docs/porting-addons-to-v2.md
This PR converts the addon into a fully v2-native format.
Some additional changes:
npm publish
directly and use github's "releases" to publish release notes (like we did for v0.8.1: https://github.com/Addepar/ember-json-viewer/releases/tag/v0.8.1). Longer-term we could bring it back or use embroider/release-plan instead@glimmer/component@v2
causes issues when used w/ ember before 4.8 (I think, maybe it was 4.12) and even though the ember-try scenario specified downgrading to component@v1, there were mysterious CI issues for those older ember versions. These were only fixed by specifying glimmer/component@v1 for all of the package.json files. I suspect this was a module-hoisting issue that would go away w/ a newer package managercd addon/ && yarn build
step to the CI. I think pnpm has better affordances to sync+build sibling pkgs in a monoreponot
andinc
helpers. This way they don't have to be re-exported as global helpers into the consuming app's namespace (which seems like it could cause collisions for apps; both those seem like very common helpers that might be in use already)