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

Migrate to new config #2962

Merged
merged 46 commits into from
Apr 2, 2022
Merged

Migrate to new config #2962

merged 46 commits into from
Apr 2, 2022

Conversation

natemoo-re
Copy link
Member

@natemoo-re natemoo-re commented Apr 2, 2022

Changes

  • Implements RFC0019
  • This is a massive PR that touches a ton of files. Most changes are just renaming config, but some additional logic had to be moved around for:
    • site and base
    • pages being removed in favor of srcDir
  • At one point, this PR attempted to auto-generate the correct config for users. Turns out this is pretty difficult, so I skipped it. Instead, I focused on providing a well typed AstroUserConfig object that should point users in the right direction.
    • If we detect a legacy config, we'll exit early and point users to our migration guide.

Testing

Tests have all been updated

Docs

Not yet

@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2022

🦋 Changeset detected

Latest commit: c382bdd

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

This PR includes changesets to release 7 packages
Name Type
@astrojs/sitemap Minor
astro Minor
@astrojs/deno Minor
@astrojs/netlify Minor
@astrojs/partytown Minor
@astrojs/tailwind Minor
@astrojs/markdown-remark 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

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) feat: markdown Related to Markdown (scope) test labels Apr 2, 2022
@natemoo-re natemoo-re marked this pull request as ready for review April 2, 2022 04:53
Copy link
Contributor

@bholmesdev bholmesdev left a comment

Choose a reason for hiding this comment

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

Small comment but looks migreat!

packages/astro/src/core/config.ts Outdated Show resolved Hide resolved
packages/astro/test/test-utils.js Show resolved Hide resolved
@FredKSchott FredKSchott merged commit 17c0292 into main Apr 2, 2022
@FredKSchott FredKSchott deleted the feat/new-config branch April 2, 2022 18:30
@github-actions github-actions bot mentioned this pull request Apr 2, 2022
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* wip: config migration

* fix: formatting

* refactor: projectRoot -> root

* refactor: pageUrlFormat -> format

* refactor: buildOptions.site -> site

* refactor: public -> publicDir

* refactor: dist -> outDir

* refactor: styleOptions -> style

* fix: some dist tests -> outDir

* refactor: remove legacyBuild (with TODOs)

* refactor: more legacyBuild cleanup

* refactor: server host and port

* fix: remove experimentalStaticBuild CLI flag

* refactor: src -> srcDir

* refactor: devOptions.trailing -> trailing

* refactor: remove sitemap + related flags

* refactor: experimentalSSR -> experimental.ssr

* fix: last devOptions

* refactor: drafts -> markdown.drafts

* fix: TS error on port as const

* refactor: remove pages

* refactor: more --project-root updates

* refactor: markdownOptions -> markdown

* fix: remaining type errors

* feat: update AstroUserConfig

* refactor: update CLI flag mapper + server mapper

* fix: loadFixture projectRoot

* fix: merge CLI flags before validating / transforming

* wip: attempt to fix bad createRouteManifest config

* refactor: combine config.base and config.site

* fix: skip route manifest test for now

* fix: site and base handling

* refactor: update failing config testes

* fix: build failure

* feat: update config types with migration help

* chore: update types

* fix(deno): update deno fixture

* chore: remove config migration logic

* chore: remove logLevel

* chore: clean-up config types

* chore: update config warning

* chore: add changeset

* Sitemap Integration (withastro#2965)

* feat: add sitemap filter config option

* feat: add canonicalURL sitemap config option

* docs: update sitemap README

* fix: update for new config

* fix: filter not being applied

* chore: changeset

Co-authored-by: bholmesdev <[email protected]>

* fred pass

* fix: Astro.resolve typo

* fix: public => publicDir

Co-authored-by: bholmesdev <[email protected]>
Co-authored-by: Fred K. Schott <[email protected]>
SiriousHunter pushed a commit to SiriousHunter/astro that referenced this pull request Feb 3, 2023
* wip: config migration

* fix: formatting

* refactor: projectRoot -> root

* refactor: pageUrlFormat -> format

* refactor: buildOptions.site -> site

* refactor: public -> publicDir

* refactor: dist -> outDir

* refactor: styleOptions -> style

* fix: some dist tests -> outDir

* refactor: remove legacyBuild (with TODOs)

* refactor: more legacyBuild cleanup

* refactor: server host and port

* fix: remove experimentalStaticBuild CLI flag

* refactor: src -> srcDir

* refactor: devOptions.trailing -> trailing

* refactor: remove sitemap + related flags

* refactor: experimentalSSR -> experimental.ssr

* fix: last devOptions

* refactor: drafts -> markdown.drafts

* fix: TS error on port as const

* refactor: remove pages

* refactor: more --project-root updates

* refactor: markdownOptions -> markdown

* fix: remaining type errors

* feat: update AstroUserConfig

* refactor: update CLI flag mapper + server mapper

* fix: loadFixture projectRoot

* fix: merge CLI flags before validating / transforming

* wip: attempt to fix bad createRouteManifest config

* refactor: combine config.base and config.site

* fix: skip route manifest test for now

* fix: site and base handling

* refactor: update failing config testes

* fix: build failure

* feat: update config types with migration help

* chore: update types

* fix(deno): update deno fixture

* chore: remove config migration logic

* chore: remove logLevel

* chore: clean-up config types

* chore: update config warning

* chore: add changeset

* Sitemap Integration (withastro#2965)

* feat: add sitemap filter config option

* feat: add canonicalURL sitemap config option

* docs: update sitemap README

* fix: update for new config

* fix: filter not being applied

* chore: changeset

Co-authored-by: bholmesdev <[email protected]>

* fred pass

* fix: Astro.resolve typo

* fix: public => publicDir

Co-authored-by: bholmesdev <[email protected]>
Co-authored-by: Fred K. Schott <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: markdown Related to Markdown (scope) pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants