Skip to content

[ENHANCEMENT] Support converting gts files in blueprint#10332

Merged
ef4 merged 14 commits into
ember-cli:masterfrom
IgnaceMaes:blueprint-gjs-support
Oct 17, 2023
Merged

[ENHANCEMENT] Support converting gts files in blueprint#10332
ef4 merged 14 commits into
ember-cli:masterfrom
IgnaceMaes:blueprint-gjs-support

Conversation

@IgnaceMaes

Copy link
Copy Markdown
Member

Add support to convert .gts blueprint files to .gjs.

Unblocks emberjs/ember.js#20511 (comment)

Comment thread lib/models/blueprint.js Outdated

fileInfo.rendered = transformed;
// removeTypes does not support GTS file format
if (path.extname(fileInfo.displayPath) === '.ts') {

Copy link
Copy Markdown
Member Author

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?

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.

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

@IgnaceMaes IgnaceMaes Aug 21, 2023

Copy link
Copy Markdown
Member Author

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?)

@IgnaceMaes IgnaceMaes changed the title feat: support converting gts files in blueprint [ENHANCEMENT] Support converting gts files in blueprint Aug 2, 2023
@IgnaceMaes IgnaceMaes force-pushed the blueprint-gjs-support branch from b013f8c to 26099fc Compare August 22, 2023 19:03
@NullVoxPopuli NullVoxPopuli added this pull request to the merge queue Sep 19, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 19, 2023
@ef4 ef4 added this pull request to the merge queue Sep 26, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 26, 2023
@NullVoxPopuli NullVoxPopuli added this pull request to the merge queue Oct 3, 2023
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 3, 2023
@IgnaceMaes

Copy link
Copy Markdown
Member Author

Is there any action to take here, or are we just hoping CI will succeed on another retry? 😬

@ef4

ef4 commented Oct 11, 2023

Copy link
Copy Markdown
Contributor

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.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants