Skip to content

Convert to v2 addon#296

Merged
chriskrycho merged 3 commits intoember-modifier:masterfrom
SergeAstapov:v2-addon
Apr 21, 2022
Merged

Convert to v2 addon#296
chriskrycho merged 3 commits intoember-modifier:masterfrom
SergeAstapov:v2-addon

Conversation

@SergeAstapov
Copy link
Copy Markdown
Collaborator

@SergeAstapov SergeAstapov commented Apr 11, 2022

Last part of #203

Follows Porting an Addon to V2 guide

@SergeAstapov
Copy link
Copy Markdown
Collaborator Author

@chriskrycho if you'd like, I can split PR into two:

  • one, to convert to monrepo
  • second, to convert to v2 addon

@SergeAstapov SergeAstapov mentioned this pull request Apr 11, 2022
19 tasks
@chriskrycho chriskrycho added the enhancement New feature or request label Apr 13, 2022
@SergeAstapov
Copy link
Copy Markdown
Collaborator Author

SergeAstapov commented Apr 20, 2022

closes #102

@chriskrycho
Copy link
Copy Markdown
Contributor

Will review (at last!!!) tomorrow!

Copy link
Copy Markdown
Contributor

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much! Bunch of small tweaks, and we should be able to land this!

Comment on lines +12 to +29
"exports": {
".": "./dist/index.js",
"./*": "./dist/*",
"./addon-main.js": "./addon-main.js"
},
"typesVersions": {
"*": {
".": [
"./dist/index.d.ts"
],
"*": [
"./dist/*"
],
"./-private/signature": [
"./dist/-private/signature.d.d.ts"
]
}
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I'm fine with landing this as is for now, but we may want to revisit. Among other things, it'd be good not to expose the -private bit at all.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chriskrycho the only reason for exposing -private/signature is used in tests to import DefaultSignature, NamedArgs, PositionalArgs and seem like DefaultSignature is not available for import from ember-modifier.

Do you think we can make DefaultSignature importable?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not make it importable, and we should use import maps to make the others available for import instead!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again, though, it's fine to land this way for now; we can tweak it after landing the PR!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chriskrycho agree! there is always room for improvement :)

@SergeAstapov
Copy link
Copy Markdown
Collaborator Author

Thanks so much! Bunch of small tweaks, and we should be able to land this!

at your convenience, please give another look. I think I've addressed everything you called out.

Copy link
Copy Markdown
Contributor

@chriskrycho chriskrycho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏🏼 Thank you so much for all of this work! Let's do it!

@chriskrycho chriskrycho merged commit d61fbbe into ember-modifier:master Apr 21, 2022
@SergeAstapov SergeAstapov deleted the v2-addon branch April 21, 2022 01:25
@SergeAstapov
Copy link
Copy Markdown
Collaborator Author

SergeAstapov commented Apr 21, 2022

@chriskrycho btw this is breaking change, as it requires consuming app/addon to have ember-auto-import v2 or consuming side should be v2 addon hence may worth add respective label

@chriskrycho
Copy link
Copy Markdown
Contributor

Doing so! Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants