Skip to content

use relative imports inside ember-debug #2671

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

Merged
merged 1 commit into from
Jul 22, 2025

Conversation

mansona
Copy link
Member

@mansona mansona commented Jul 21, 2025

Description

This converts local imports inside ember-debug to use relative. I'm not exactly sure why it doesn't work very well but when we move to ESM (for top level await support) this breaks without relative imports 🤷

This PR essentially splits out the work to make the following change simpler 👍

@mansona mansona force-pushed the relative-imports branch from 385086c to e7dd425 Compare July 21, 2025 13:19
Comment on lines +2 to +3
import DebugPort from './debug-port.js';
import { compareVersion } from './utils/version';
Copy link
Contributor

Choose a reason for hiding this comment

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

I can see that source ember-debug was changed to relative, and what was already relative now has the .js extension. But can you please remind me where the difference lies in the first place?

Copy link
Member Author

Choose a reason for hiding this comment

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

to be perfectly honest I don't really know why some of them are .js and some have no extension 🤔 I'm pretty sure it's doing extension searching with @rollup/plugin-node-resolve in a similar way that node would.

Do you think we should remove or add the extensions? personally I think it's fine to mix and match 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

it all gets rolled into one (or a few) file(s) anyway

Copy link
Contributor

Choose a reason for hiding this comment

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

That's fine, my comment was not request change, just an honest question.

@mansona mansona merged commit 4b5ac6d into emberjs:main Jul 22, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants