* Pass in scoped class name to child components
If a class is being passed into child components, pass in the scoped class name as well.
* Adds the changeset
* fix: 🐛 Fixes bug #532
Matching for collection routes should look for exact filename matches
* test: ✅ Adding test coverage to make sure collection routes are matched exactly
* chore: Adding changeset
* Fix code from bad merge
* Dont wrap the raw
* Wrap the expression in quotes
* remove react-dom just to test
* Add back react-dom as a known entrypoint
* Make startup time even longer
* wip: update props api
* feat(#139, #309): enable new props api
* chore: migrate examples to new props API
* docs: update syntax guide for new props API
* chore: update examples to new props API
* chore: update docs to new Props API
* fix: hide __astroInternal from `Astro.props` consumers
* chore: remove scratchpad file
* chore: fix script error
* test: fix failing collection tests
* fix: set __astroInternal to `enumerable: false`
* chore: add changeset
* feat: warn users using old props api
* fix(#521): allow spread props
* chore: add spread prop tests
* fix: falsy expressions should only be skipped in 'Expression' case
* fix: support primitives in expressions (objects, arrays)
* Start of allowing node builtins issue
* Allow use of node:builtin
* Produce an error in Astro files with bare builtin usage
* Upgrade snowpack version
bug fixes for packages that use `node:`
* Document node builtins
* Use the provided builtins list
* Fix pageSize calculation when Infinity is given
* test grouping collection with pageSize: Infinity
* test individual pages for collection items
* Revert "update docs, remove reference to Inifinity"
This reverts commit e8a976a543.
* Adding changeset
* fix output issues uncovered by snowpack warnings
* Update the snowpack version
* Load Prism dep as the default
* Rename srcRoot to src
* Document the src option
* Add the changeset
Co-authored-by: Matthew Phillips <matthew@skypack.dev>
* Start of warnings
* Provide knownEntrypoints by renderers
This allows renderers to provide knownEntrypoints that will be forwarded to snowpack. This gets rid of renderer-specific warnings and allows us to remove the snowpack logging hacks we were doing.
* Adds a changeset
* First take
* Allow omitting head element
This makes it possible to omit the head element but still inject the style and HMR script into the right place.
* Add changeset
* More progress on this
* Only render if it's a page
* Include fragments in compiled jsx
* Adds a changeset
* feat(#472): do not inject `astro-xxx` class for components without styles
* test: add test for skipped scoped classes
* chore: add changeset
* Update happy-cougars-scream.md
* Fix README header aspect ratio
* add changeset
* bring back img and try responsive width and height
* Remove `width` and `height` attrs
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
* Add repository remotes for all astro packages
* Add repository.directory key instead of adding the path to repository.url
* Include changeset
* Add repository key to create-astro
* Honor user's hmr settings
This contains 2 fixes:
* If the user sets the hmrPort in their own snowpack config we use that port.
* If the user sets `window.HMR_WEBSOCKET_URL` we defer to that
* Adds the changeset
* Prevent postcss from crashing when scoping class without a body
For some reason postcss will keep running the plugin over and over on a class without a body if we modify the `selector` (this triggers it as being "dirty"). It doesn't do this for selectors with a body. But the fix was easy enough, only scope a rule once.
Closes#340
* Add a changeset
* Fix usage of arrow functions as components
This fixes the React and Preact component as arrow function use-case by checking for the prototype property (arrow functions don't)
* Check the prototype
* fix scoped selector when using escaped colon
* update scoped styles test
* add changeset
* update `scopeRule` test
* update `scopeRule` test
* update css minifier to account for windows-style line breaks
* Make doctype be case insensitive
Fixes#413
* Make doctype completely case insensitive
* Make check for style scoping doctype override be case insensitive
* Check for doctype in the right place
* Improved JSX framework detection
This improves the JSX detection and adds a bunch of test. The following is improved:
* If an error throws because of a coding mistake, those errors will be reported.
* We properly detect class components for both Preact and React. We don't have to "try to render" these.
It's still possible that error messages might be obscured in this scenario:
A Preact function component that uses hooks (or another preact specific feature) that has a coding mistake. The React renderer might throw when it uses the Preact hook. That error will be reported rather than the real coding mistake.
This is because we can't distinguish between errors that are due to the wrong framework and errors that the user caused.
I might reach out to the Preact community and see if they can think of a better solution to this problem. This will come up when other JSX based frameworks have renderers. I still think that having multiple frameworks in the same project is a feature worth trying to preserve.
* Move try/catch into the __astro_component
* Allow createCollection() to fetch remote data
Fixes#378
* Update docs
* revert isomorphic-fetch, see if ci passes
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
* Always add HMR port script when HMR is enabled
* Add it only if there are client side components
* Fix the test
* Add a test where HMR port not set
* Upgrade snowpack version
* Fix snowpack semver
The link to the "Partial Hydration" section from "Markdown" was missing a hyphen. Since I was changing it, I also moved it to the list of link reference definitions at the bottom.
* feat: add blog to `www`
* feat: add BlogHeader
* wip: add heroImage support
* feat: update hero image styling
* finalize blog post
* use site index instead of blog index
* fix: don't use float
* chore: copy cleanup
* fix: scroll issue on landing page
Co-authored-by: Fred K. Schott <fkschott@gmail.com>