* Unflag the static build (#2652)
* Unflag the static build
* Only set legacyBuild to false if experimentalSSR is true
* Use legacy build when we have to
* Put a few more tests into legacy mode
* Last two
* Make astro-basic use the legacy build
* Adds a changeset
* Mark the lit test as legacy
* Update yarn lock
* Update based on feedback
* Add --legacy-build flag
* Move astro-basic test to use static build (#2682)
* Move some tests over to the static build (#2677)
* Move some tests over to the static build
* Fix assets tests
* Fix the assets tests
* Fix for the client:only components
* Moves asset tests to the static build
* Move postcss test over to static build
* Bring back legacy build for astro-basic test
* Move astro-basic test to use static build
* Migrate more tests to the static build (#2693)
* fix: disable HMR during build (#2684)
* Migrate more tests to the static build
* Only prepend links in non-legacy mode
* Add the 0-css tests
* Convert all CSS tests to the static build
* Migrate Astro global tests
* Remove .only
* Fix static build tests
* Migrate a few more
* More tests
* Move the lit test back to legacy
* Increase the test timeout
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Improve `head` injection behavior (#2436)
* feat: add renderHead util to server
* feat: remove `layouts` from config, Vite plugin
* fix: improve head injection during rendering
* chore: update compiler
* fix: do not escape links
* chore: enter `pre` mode
* Replace `send` with `sirv` (#2713)
* remove send
* Create thick-ravens-chew.md
* I feel like I'm going to screw something up
* working finally!
* rewrite req.url
* Add tiny bit of doc
* Update .gitignore
Co-authored-by: Evan Boehs <evan@boehs.org>
* Move remaining tests to the static build (#2712)
* Move lit test to the static build
* Migrate astro-env plugin to work in the static build
* Do not remove vite:define
* Adds a changeset
* Add a warning when passing the --experimental-static-build flag (#2718)
* Add a warning when passing the --experimental-static-build flag
* Disable the lint warning
* [ci] release (next) (#2721)
* [ci] release (next)
* chore: update changeset
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Nate Moore <nate@skypack.dev>
* 404 page (#2719)
* Fix: build to 404.html in the static build
* Adds a changeset
* fix pnpm install missing peer deps
* fix svelte version in workspace
* fix lockfile
* fix(webapi): add dev script
* improve preview reliability (#2739)
* improve preview reliability - fix broken tests
* shamefully hoist to unblock
* remove lit from test running
* chore: update lockfile
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
Co-authored-by: Evan Boehs <evan@boehs.org>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* feat: show "localhost" for local network IPs
* refactor: remove timestamps from addr logs
* fix: hide timestamp on null types
* feat: add emoji OS helper
* feat: make logs 100% nicer
* refactor: extract isLocalHost to util
* feat: update preview logs to match
* chore: add changeset
* fix: pull pkg version from package.json
* refactor: remove 👉 guys
* fix: devStart return type
* feat: inject process.env.PACKAGE_VERSION at build time
* feat: update unit test for hostname checks
Co-authored-by: Nate Moore <nate@skypack.dev>
* Pass children to client components even if they do not render them
* Handle when no children are provided
* Adds a changeset
* Use roots directly i guess
* Use an attribute to signal that the template is needed
* Resolve relative imports from hoisted scripts
* Adds a changeset
* Windows fix
* Set a longer timeout for the Lit test
* blah
* Handle windows properly
* Only if the from is astro
* Windows debugging
* This might fix it
* another try
* use only
* More debugging
* Does this work
* Final cleanup
* Update the lockfile
* adds support for build non-html pages
* add non-html pages to the static build test suite
* adds getStaticPaths() test for non-html pages
* adds dev server tests for non-html pages
* ading a changeset
* updating changeset description
* testing for building non-html files with async data
* fixing typo in changeset docs
* Checkpoint, basics are working
* Add the `--experimental-ssr` flag
* Adds the changeset
* Fixes population of getStaticPaths results
* Pass through the imported module
* Route manifest test
* Fix remaining tests
* Fix remaining tests
* Copy server assets over
* Fix types
* Allowing passing in the request to the Node version of App
* Improve the example app
* Gets CI to pass
* Replaced `shikiTheme` with `shikiConfig`
* Code.astro now accepts custom themes/langs
* Updated docs
* Updated tests
* Fixed language loading
* Added customization examples
* Updated documentation
* Added more tests
* Changelogs
* Changed some spaces to tabs
* Fixed typo in changesets
* Moved tests fixtures
* Rolled back changes to with-markdown-shiki
* Removed lang example in docs
* Optimized Code component
* Try to fix windows errors
* Try to see if this new tests work
* [ci] yarn format
* Added shiki to markdown-remark
* Upgraded astro shiki
* Added minimal example
* Changed defaults to match <Code />
* Replace `shiki` with `astro` classes
* Added documentation
* Updated Astro code to use new `codeToHtml`
* Added changesets
* Added basic test
* Updated tests a bit
Co-authored-by: JuanM04 <JuanM04@users.noreply.github.com>
* standardize trailing subpath, and fix fetchcontent issue
* debug windows ci
* improve ci test
* fix windows test issue?
* fix only usage
* end debugging
* Handle project folders containing a space
* Adds a changeset
* Bump the test package version
* Use server relative paths as entries
* Fix windows
* A hoisted fix
* Correctly handle facadeIds on windows
* Fix HMR in static build + @import HMR
* Changeset
* Add a comment on what cleanUrl is doing
* Running prettier
* Improve comments on how the static build compilation
works differently.
* Allow pre-generated urls to be passed in rss feeds
* Fix variable name
* Add isValidURL helper function
* Remove scary RegEx and tidy up code
* add test for using pregenerated urls
* fix: allow rss to be called multiple times
* test: normalize rss feed in test
* chore: add changeset
Co-authored-by: Zade Viggers <74938858+zadeviggers@users.noreply.github.com>
Co-authored-by: zadeviggers <zade.viggers@gmail.com>
* Resolve sitemap URLs in relation to full site path
Fixes#2422
* Test generated sitemap contains base directory in URLs
* Add changeset
* test: Add `clean` helper to loaded fixture API
Adds a method that when called will remove the loaded fixture’s dist directory using `rimraf`.
* test: Clean up between sitemap/RSS tests
* See if letting rimraf retry more helps…
* Add logging to double check nothing’s running in parallel
* Remove logging & double check clean up actually succeeds
* Try using basic Node.js to clean up dist
* Remove logging/checks
* Remove stray unnecessary `async` keyword
* Supports hoisted scripts in the static build
* Adds a changeset
* Update packages/astro/src/core/build/internal.ts
Co-authored-by: Evan Boehs <evan@boehs.org>
* Update based on feedback
* Fix lint
* Fix getting hoist script for Windows
* Try with the pre compiler
* use compiler 0.8.2
* update compiler version
* update yarn.lock
Co-authored-by: Evan Boehs <evan@boehs.org>
* Add verbose logging to create-astro
* Tell user to use the verbose flag when encountering the MISSING_REF error
* Create changeset
* Add information in README
* Format
* Use switch statement instead of if and if else blocks
* Update packages/create-astro/src/logger.ts
Make if statement easier to read
Co-authored-by: Evan Boehs <evan@boehs.org>
Co-authored-by: Evan Boehs <evan@boehs.org>
* [ci] collect stats
* [ci] update lockfile (#2388)
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
* Fixes for blog and docs examples (#2373)
* Fixes for blog and docs examples
* Adds a changeset
* Upgrade the compiler version
* Use a global style tag
* Skip on windows temporarily
* [ci] yarn format
* Fixes Lit support in the static build
* Adds a changeset
* test
* Upgrade lit-labs/ssr
* Conditional
* Testing again
* remove debugging code
* changeset
Co-authored-by: FredKSchott <FredKSchott@users.noreply.github.com>
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* Fix use of frameworks in the static build
* Adding a changeset
* fix typescript
* Empty out the directory before running the builds
* Use a util to empty the directory
* Only empty the outdir if needed
* Move prepareOutDir to its own module
* Prepare outDir is actually sync
* Fix: static-build with .md pages
This fixes the `--experimental-static-build` flag to work with markdown
pages.
* Adds a changeset
* Account for difference in specifier on windows
* Fix issue with plugins running twice in dev and build
* nit: only patch plugins
* nit: only patch plugins
* nit: only solve for create-vite
* nit: only solve for create-vite
* Create seven-mice-do.md
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* Handle loading the Code package
Fixes#2329
* Use Code the normal way
* Adds a changeset
* Only resolve browser path if there is no common ancestor
* Update examples/fast-build/src/pages/index.astro
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Fix subpath support regressions
* Adds a changeset
* Update tests to reflect relative URL change
* Pick a different port and hopefully windows works
* Remove bad lint warning
* Better handling of relative paths
* or
* Fixes use with pageUrlFormat
* Update the pageDirectoryUrl test
* Update svelte version in renderer-svelte
I am having funny console logs saying that my svelte component `received an unexpected slot "default".`. This issue is described here: https://github.com/sveltejs/kit/issues/981
Supposedly, updating svelte to version 3.44.3 solves this issue. I couldn't test it, though.
* Update Svelte to 3.44.3 to get rid of console warning that component receives an unexpected slot "default".
* Revert "Revert "Implement hydrated components in the static build (#2260)""
This reverts commit 17ac18e88c.
* Only resolve specifiers in the static build
* Adding a changeset
* Fix the client-only test
* Don't overwrite the stack when using verbose logging
This makes it so that if the compiler panics and `--verbose` logging is
on (debug level), we don't replace the stack trace.
* Adds a changeset
* fix: inject `fetch` only if not declared
* test: improve fetch test
* chore(lint): Prettier fix
* chore: trigger ci
* fix: improve type narrowing
Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
* Make aliases work on windows
Change all occurrences of path.posix to path.
* Remove console log statement
* Update index.ts
* Update index.ts
* Update index.ts
* Edit changeset
* Makes Astro.resolve return root-relative paths
* Adds a changeset
* Update the compiler version and PR review
* Fix linting
* [ci] Prettier fix
* Remove use of vitifyURL
Co-authored-by: GitHub Action <github-action@users.noreply.github.com>
* Adding check to make sure the hydration directive is valid
* remove temp debug logging
* Adding a check for media query with client:media + small refactor
* adding changeset
Co-authored-by: Tony Sullivan <tony.sullivan@hyperlab.se>
* Render void elements as self-closing tags
* changeset
* nit: only check void element names if there is no child content
* nit: only check void element names if there is no child content
* add tests
* Add a helpful message for the "could not find commit hash for ..." error. This error mostly shows when someone tries to initialize a new project but git is not installed on their system.
* Bring back building of non-hoisted scripts
Scripts inside of src/, whether hoisted are not should be built. This
makes that so. If not hoisted they do *not* get bundled together, but
rather are their own standalone modules. This matches 0.20 behavior.
Closes#1968
* Adds a changeset
* Fix windows breakage
* Debug windows
* More debugging
* make it not be parallel
* More windows
* Might fix it
* ARG
* Simpler test
* Remove the debugging
* fix(lit-renderer): reactive props not init correctly
* test(renderer-lit): implement testing suggestiosn
* chore(renderer-lit): upload changeset
* fix(renderer-lit): call connCallback on server
* fix(renderer-lit): do not set reserved JSX props
* fix(renderer-lit): do not check for reserved attributes
Co-authored-by: Nate Moore <nate@skypack.dev>
* Re-add smartypants
* Updated packages
* Remove all the default plugins if there are either remark or rehype plugins
* Replace deperecated remark-slug with rehype-slug
* Added MarkdownParserResponse type
* Update documentation
* Removed type import from markdown package
* Updated remark-smartypants
* Changelog
* Missed one change
* Split changelogs
* Upgraded some MDX dependencies
* Fix typos in documentation
* Changed CHANGELOG.md package name
* Renamed smartypants