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]Continuous optionals should not throw conflict error #7939

Merged
merged 8 commits into from Dec 6, 2022

Conversation

aolose
Copy link
Contributor

@aolose aolose commented Dec 4, 2022

fix issue 7925

folder structure [[a]]/[[b]]/+page will throw routes conflict error

the error from the function prevent_conflicts

here:

permutations = [
...permutations.map((x) => x + next),
...permutations.map((x) => x + `<${matcher}>${next}`)
];

will generate permutations [ '//', '/<>/', '//<>', '/<>/<>' ]
but actually, it' impossible match route /empty/[[b]] . so '//<*>' should be remove from result.

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests

  • Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Dec 4, 2022

🦋 Changeset detected

Latest commit: c84b40e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/kit Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Thank you! Could you add a changeset and add a test in the index.spec.js file next to the changed file?

@aolose
Copy link
Contributor Author

aolose commented Dec 5, 2022

Thank you! Could you add a changeset and add a test in the index.spec.js file next to the changed file?

okay, done.

@dummdidumm
Copy link
Member

thanks for the test, however for this it's sufficient to create a unit test - you would create another unit test similar to the existing one in create_manifest_data/index.spec.js at line 718.

@aolose
Copy link
Contributor Author

aolose commented Dec 6, 2022

thanks for the test, however for this it's sufficient to create a unit test - you would create another unit test similar to the existing one in create_manifest_data/index.spec.js at line 718.

thank you, I'll try it.

@vercel
Copy link

vercel bot commented Dec 6, 2022

Someone is attempting to deploy a commit to the Svelte Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@dummdidumm dummdidumm left a comment

Choose a reason for hiding this comment

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

Thank you!

@dummdidumm dummdidumm merged commit a999fce into sveltejs:master Dec 6, 2022
@github-actions github-actions bot mentioned this pull request Dec 6, 2022
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.

None yet

2 participants