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

feat: throw error if routes are configured in _routes.json #12360

Merged
merged 5 commits into from
Jun 18, 2024

Conversation

kettei-sproutty
Copy link
Contributor

Close #12321

I don't know if it was the best choice, but I opted for throw error only if _routes.json exists and there are no configured routes in svelte.config.

Let me know if you think Changelogs should be generated.

I don't think it's related, but pnpm test fails on

Watching src/lib for changes...

✘ • • • •   (14 / 15)

FAIL  "watches for changes"
Expected values to be deeply equal:  (equal)

Actual:
--<script·lang="ts">export·let·answer:·number</script>
Expected:
++<script>export·let·answer;
++</script>
        
@sveltejs/[email protected] test: `uvu test "^index.js$"

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. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Edits

  • Please ensure that 'Allow edits from maintainers' is checked. PRs without this option may be closed.

Copy link

changeset-bot bot commented Jun 16, 2024

🦋 Changeset detected

Latest commit: 2e99678

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

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-cloudflare Minor

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

@benmccann benmccann left a comment

Choose a reason for hiding this comment

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

will adapter-cloudflare-workers need the same change?

don't worry about the test failure. the tests are flaky

yes, we'll need a changeset

packages/adapter-cloudflare/index.js Outdated Show resolved Hide resolved
@kettei-sproutty
Copy link
Contributor Author

will adapter-cloudflare-workers need the same change?

don't worry about the test failure. the tests are flaky

yes, we'll need a changeset

The adapter-cloudflare-workers shouldn't require this change because as far as i saw its configuration is managed via wrangler.toml in both svelte and cloudflare docs.

I will generate the changelogs asap than :)
Thank you for the review!

@benmccann benmccann requested a review from eltigerchino June 18, 2024 13:17
@eltigerchino eltigerchino changed the title chore(cloudflare): throw error if routes are configured in _routes.json feat: throw error if routes are configured in _routes.json Jun 18, 2024
@eltigerchino
Copy link
Member

Thank you!

@eltigerchino eltigerchino merged commit a624bfa into sveltejs:main Jun 18, 2024
8 of 12 checks passed
@github-actions github-actions bot mentioned this pull request Jun 18, 2024
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.

adapter cloudflare overwrites user’s _routes.json without warning
3 participants