-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[ENHANCEMENT] Support converting gts files in blueprint #10332
Conversation
lib/models/blueprint.js
Outdated
|
||
fileInfo.rendered = transformed; | ||
// removeTypes does not support GTS file format | ||
if (path.extname(fileInfo.displayPath) === '.ts') { |
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.
Can this realistically be merged without support? For now it would unblock basic .gts
blueprint files that don't contain any types. (e.g. template-only components)
I wonder what the actual support would look like. Should we first transform it to valid TS, remove types, and transform back to GJS?
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.
I think we'd need a custom parser? or maybe a light process -- like -- extracting the template(s), running babel to remove types, placing the template(s) back
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.
I've implemented a simple, naive version of extracting the template - removing the types - and placing back the template.
It does the job for simple cases. However, as the removeTypes
function from remove-types
also does formatting it kind of messes with the replacing. Because of this I'm not confident it would handle every possible case well. But for the sake of blueprints it might be sufficient? (For now?)
b013f8c
to
26099fc
Compare
Is there any action to take here, or are we just hoping CI will succeed on another retry? 😬 |
I think we need to turn of the Merge Queue feature. It doesn't support rerunning failed tests, and we have some flaky windows tests that make it hard to get things through on a single pass. |
Add support to convert
.gts
blueprint files to.gjs
.Unblocks emberjs/ember.js#20511 (comment)