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] rename BASE to ORIGIN and fix config handling #3423

Merged
merged 4 commits into from
Jan 20, 2022

Conversation

Conduitry
Copy link
Member

@Conduitry Conduitry commented Jan 20, 2022

This should fix #3420 and fix #3424, but also makes some other changes.

The defaults listed in the readme were out of date, and they have been updated.

This also renamed BASE to ORIGIN, per a conversation I had with Rich on Discord.

It also adds 'ORIGIN' as a default value for env.origin (previously it was undefined), to align with the readme, which indicated that you should be able to just do that without any build-time configuration.

I'd like for there to be fewer of these build-time defaults in the adapter config, but I understand that this might not be very popular.

Although the changes are pretty straightforward, this hasn't been properly tested yet. Because of this, and the decision I'd like to come to about the default env/header behavior, I haven't added changesets yet and I am marking this as draft.

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 pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

@changeset-bot
Copy link

changeset-bot bot commented Jan 20, 2022

🦋 Changeset detected

Latest commit: 3ded45d

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

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

💥 An error occurred when fetching the changed packages and changesets in this PR
Some errors occurred when validating the changesets config:
The package or glob expression "hn.svelte.dev" is specified in the `ignore` option but it is not found in the project. You may have misspelled the package name or provided an invalid glob expression. Note that glob expressions must be defined according to https://www.npmjs.com/package/micromatch.

@netlify
Copy link

netlify bot commented Jan 20, 2022

✔️ Deploy Preview for kit-demo canceled.

🔨 Explore the source changes: 3ded45d

🔍 Inspect the deploy log: https://app.netlify.com/sites/kit-demo/deploys/61e969f26b13ca0007a4a6af

@benmccann
Copy link
Member

I'd like for there to be fewer of these build-time defaults in the adapter config, but I understand that this might not be very popular

I'm not sure what you're suggesting, but I'm not sure it'd be unpopular. I'm happy to hardcode the environment variable names. I don't know if you were suggesting something else though?

@benmccann
Copy link
Member

the rename to origin is a great change!

@Conduitry
Copy link
Member Author

I was suggesting there being no default for these environment variables, but that they're still configurable, which would mean you would need to explicitly configure them at build time so that you could specify these values at runtime.

@benmccann
Copy link
Member

Ok, then I agree that'd be very unpopular 😆 At least with me

@benmccann benmccann changed the title [fix] adapter-node env config handling [fix] rename BASE to ORIGIN and fix config handling Jan 20, 2022
@benmccann benmccann marked this pull request as ready for review January 20, 2022 13:56
@benmccann benmccann merged commit c653aec into sveltejs:master Jan 20, 2022
@Conduitry Conduitry deleted the gh-3420 branch February 27, 2024 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants