Skip to content

fix(compiler): get to handle .cts files#6199

Merged
christian-bromann merged 7 commits intomainfrom
cb/handle-cts
Mar 13, 2025
Merged

fix(compiler): get to handle .cts files#6199
christian-bromann merged 7 commits intomainfrom
cb/handle-cts

Conversation

@christian-bromann
Copy link
Copy Markdown
Member

What is the current behavior?

fixes #6198

What is the new behavior?

Considers .cts files now as well.

Documentation

Does this introduce a breaking change?

  • Yes
  • No

Testing

n/a

Other information

n/a

@johnjenkins
Copy link
Copy Markdown
Contributor

hey @christian-bromann - do we need to add the .d.cts extension to

export const isDtsFile = (p: string) => p.endsWith('.d.ts') || p.endsWith('.d.mts');
?

Do we also need to update this line too to cope with these types?

export const isDtsFile = (filePath: string): boolean => {

Then I wonder if we could use one of these utils to replace all the inline checks in the if statements?

@christian-bromann
Copy link
Copy Markdown
Member Author

@johnjenkins good catch, I reorganised some stuff around, wdyt?

@johnjenkins
Copy link
Copy Markdown
Contributor

@christian-bromann - just some ideas .. perhaps practically they can't work 'cos the code exists at different times or whatever

Copy link
Copy Markdown
Contributor

@johnjenkins johnjenkins left a comment

Choose a reason for hiding this comment

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

presume my micro suggestions aren't workable / not practical? Tiny thing anyway - LGTM 🙂

@christian-bromann
Copy link
Copy Markdown
Member Author

I wasn't quite sure what you were referring to but you are right, updated the PR.

@christian-bromann christian-bromann merged commit 6c1804f into main Mar 13, 2025
140 of 142 checks passed
@christian-bromann christian-bromann deleted the cb/handle-cts branch March 13, 2025 00:15
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.

bug: Rollup Fails to Process .cts Files After Latest StencilJS Update

2 participants