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(nuxt): handle optional params within a path segment #23070

Merged
merged 7 commits into from Sep 11, 2023

Conversation

tirojal
Copy link
Contributor

@tirojal tirojal commented Sep 7, 2023

πŸ”— Linked issue

resolves #23069

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@stackblitz
Copy link

stackblitz bot commented Sep 7, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@tirojal tirojal changed the title Fix/optional params #23069 Fix/optional params #23070 Sep 7, 2023
@tirojal tirojal changed the title Fix/optional params #23070 Fix/optional params Sep 7, 2023
@@ -205,6 +205,42 @@ describe('pages', () => {
await expectNoClientErrors('/?test=true')
})

it('/optional/[[opt]].vue', async () => {
Copy link
Member

Choose a reason for hiding this comment

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

instead, would you update packages/nuxt/test/pages.test.ts? I think we can cover this in a unit test.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added unit tests. Do you insist to replace fixtures/basic ones? They also checks the ordering of routes as well.

Copy link
Member

Choose a reason for hiding this comment

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

Thank you ❀️

I think the route ordering should be tested by vue-router rather than us. The e2e tests here are good but I think we can save the CI time.

@danielroe danielroe changed the title Fix/optional params fix(nuxt): handle optional params within a path segment Sep 8, 2023
@danielroe danielroe merged commit 48fa30a into nuxt:main Sep 11, 2023
25 checks passed
@github-actions github-actions bot mentioned this pull request Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optional params resolved incorrectly
2 participants