Skip to content
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

fix: handle extensions like page.tsx #421

Merged
merged 5 commits into from
May 31, 2023

Conversation

kota65535
Copy link
Contributor

Description

fixes #319

Additional context


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@kota65535 kota65535 changed the title Handle extensions like page.tsx fix: handle extensions like page.tsx May 24, 2023
src/options.ts Outdated Show resolved Hide resolved
@kota65535
Copy link
Contributor Author

kota65535 commented May 25, 2023

@hannoeru Thank you for running CI.
Hmm, I have no idea why some workflows fail. Simply unstable for now?

@hannoeru
Copy link
Owner

@kota65535 Yes, e2e test are unstable now, just ignore it.

@hannoeru
Copy link
Owner

@kota65535

Currently we have two options that can filter pages file, one is filePattern, and the other one is extensions which generate default filePattern under the hood.

Maybe we should find a more simple and consistent way to defined these two options.

@kota65535
Copy link
Contributor Author

@hannoeru
At first, I tried considering the rest of the string as the extension after the first dot, but then I realized that it cannot handle file names like v1.2.pages.tsx to be mapped to the path /v1.2.
So I think both of two options filePattern and extensions are needed to define the mapping from file names to paths correctly.
Any ideas to simplify it?

src/context.ts Outdated Show resolved Hide resolved
@kota65535
Copy link
Contributor Author

@hannoeru Fixed, please check.

@kota65535 kota65535 requested a review from hannoeru May 29, 2023 02:44
src/context.ts Outdated Show resolved Hide resolved
Co-authored-by: ハン / Han <16288797+hannoeru@users.noreply.github.com>
@kota65535 kota65535 requested a review from hannoeru May 30, 2023 05:39
@kota65535
Copy link
Contributor Author

@hannoeru Oh sorry, I didn't make sure to work properly after fixing it, thanks.
I've added the change you suggested.

@hannoeru hannoeru merged commit c875838 into hannoeru:main May 31, 2023
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.

Unexpected path name when using page.tsx as extension
2 participants