Skip to content

Refactored code (Part 3)#367

Merged
NullVoxPopuli merged 11 commits intoember-tooling:mainfrom
ijlee2:refactor-code-part-3
Dec 12, 2025
Merged

Refactored code (Part 3)#367
NullVoxPopuli merged 11 commits intoember-tooling:mainfrom
ijlee2:refactor-code-part-3

Conversation

@ijlee2
Copy link
Copy Markdown
Contributor

@ijlee2 ijlee2 commented Jun 13, 2025

Background

I moved the existing code around so that we can simplify src/main.ts and the file structure better matches that in prettier-plugin-ember-hbs-tag.

/* src/main.ts */
export { languages } from './languages.js';
export { options } from './options.js';
export { parsers } from './parsers.js';
export { printers } from './printers.js';

@ijlee2 ijlee2 marked this pull request as ready for review June 13, 2025 10:40
@ijlee2
Copy link
Copy Markdown
Contributor Author

ijlee2 commented Jun 19, 2025

@NullVoxPopuli Can you help with reviewing this PR and #368?

@NullVoxPopuli
Copy link
Copy Markdown
Member

matches that in prettier-plugin-ember-hbs-tag

What's the benefit of doing this though?

Much of the content that code can just be deleted (in a separate pr), and would shrink this pr (yay!)

I do like smaller files tho!

@ijlee2
Copy link
Copy Markdown
Contributor Author

ijlee2 commented Dec 11, 2025

What's the benefit of doing this though?

Currently, the files don't practice a good separation of concerns. As a result, I think the package will feel more magical to contributors than it actually is. This, in return, would make maintaining and extending the package difficult.

@evoactivity
Copy link
Copy Markdown
Member

I'm a fan of the new structure presented here

Comment thread src/printers/index.ts Outdated
@@ -0,0 +1,3 @@
export * from './ambiguity.js';
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

let's avoid export * as it hides the true api surface area size

@evoactivity
Copy link
Copy Markdown
Member

Sorry @ijlee2, you'll have to rebase again 🙈

@ijlee2
Copy link
Copy Markdown
Contributor Author

ijlee2 commented Dec 11, 2025

Rebased.

@ijlee2 ijlee2 requested a review from NullVoxPopuli December 11, 2025 18:47
@evoactivity evoactivity added the internal Internal changes that still require a mention in the changelog/release notes label Dec 11, 2025
Copy link
Copy Markdown
Member

@NullVoxPopuli NullVoxPopuli left a comment

Choose a reason for hiding this comment

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

tyty for reminding me about this <3

@NullVoxPopuli NullVoxPopuli merged commit 5d3d83a into ember-tooling:main Dec 12, 2025
16 checks passed
@github-actions github-actions Bot mentioned this pull request Dec 12, 2025
@github-actions github-actions Bot mentioned this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Internal changes that still require a mention in the changelog/release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants