Commit graph

181 commits

Author SHA1 Message Date
Matthew Phillips
2023a26725
Fix issue with proxy imports not reloading on change (#462)
Underlying issue fixed in Snowpack here: https://github.com/snowpackjs/snowpack/pull/3449
2021-06-16 08:35:09 -04:00
Nurettin Kaya
251b0b5c06
Less verbose HMR script (#457)
* Less verbose HMR script

* push changeset
2021-06-16 08:17:06 -04:00
Drew Powers
54c291efa0
Handle script module resolution (#438)
Fixes #104
2021-06-15 15:06:29 -06:00
Drew Powers
272769d723
Improve asset resolution in Astro (#437)
* Improve asset resolution in Astro

Fixes #96

* Add docs, changeset

* Fix collection resolution
2021-06-15 14:53:16 -06:00
natemoo-re
266e447e01 [ci] yarn format 2021-06-15 16:34:46 +00:00
Nate Moore
490f2bebbc
Add <> fragment support for expressions (#433)
* feat: add support for `<>` and `</>` Fragments

* docs: explain Fragments

* test: add fragment test
2021-06-15 11:33:27 -05:00
github-actions[bot]
28c2d74dc3
Version Packages (#446)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-15 08:25:29 -04:00
github-actions[bot]
5222460719
Version Packages (#431)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 16:12:55 -04:00
matthewp
ddd86f8ab2 [ci] yarn format 2021-06-14 20:11:42 +00:00
Matthew Phillips
016833a3bc
Honor user's hmr settings (#436)
* 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
2021-06-14 16:10:29 -04:00
matthewp
40720b2c1e [ci] yarn format 2021-06-14 18:18:59 +00:00
Matthew Phillips
73a43d9301
Prevent postcss from crashing when scoping class without a body (#430)
* 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
2021-06-14 14:17:56 -04:00
github-actions[bot]
3d3d4cfe0b
Version Packages (#428)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 13:28:40 -04:00
Matthew Phillips
af03c90c2b
Fix usage of arrow functions as components (#426)
* 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
2021-06-14 13:24:37 -04:00
github-actions[bot]
5602aabfe0
Version Packages (#425)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 12:54:33 -04:00
Brad Cornes
e0989c696a
Fix scoped CSS selector when class contains a colon (#383)
* 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
2021-06-14 10:36:33 -06:00
Matthew Phillips
2d854092a4
Serialize boolean attributes without a value (#422)
* Serialize boolean attributes without a value

Fixes #307

* Update the attrs test

* Adds a changeset

* Adds test that components receive booleans
2021-06-14 12:29:34 -04:00
matthewp
3db6914137 [ci] yarn format 2021-06-14 16:01:54 +00:00
Matthew Phillips
0b16b2ddd0
Make doctype be case insensitive (#419)
* 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
2021-06-14 12:00:51 -04:00
github-actions[bot]
0ef0c99b10
Version Packages (#418)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-14 08:43:03 -04:00
matthewp
a5d6e434ab [ci] yarn format 2021-06-14 12:36:32 +00:00
Matthew Phillips
271cfe6ce3
Improved JSX framework detection (#382)
* 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
2021-06-14 08:35:25 -04:00
Fred K. Schott
ab2972be83
add engines for esm support (#415) 2021-06-14 08:20:14 -04:00
Fred K. Schott
37200eba7c
Update README.md 2021-06-13 14:30:39 -07:00
github-actions[bot]
416e8484b5
Version Packages (#402)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-12 11:36:31 -07:00
Drew Powers
c374a549b5
Allow createCollection() to fetch remote data (#400)
* 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>
2021-06-11 18:31:36 -07:00
Drew Powers
9d3cd49410
Improve templates test (#377) 2021-06-11 15:07:30 -06:00
duncanhealy
8d72862a98
update node min version to 14.15.1 for codesandbox (#395) 2021-06-11 16:29:31 -04:00
github-actions[bot]
e7eab4e9d9
Version Packages (#386)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-11 16:24:07 -04:00
Drew Powers
fb02a482c3
Fix baseUrl passed to Snowpack (#391) 2021-06-11 11:36:41 -06:00
Drew Powers
61b5590b95
Pass Astro site to snowpack baseUrl (#384) 2021-06-11 10:57:32 -06:00
github-actions[bot]
6eacdbae42
Version Packages (#381)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-11 09:15:16 -04:00
Matthew Phillips
1bab906539
Remove second snowpack instance (#368)
* Remove second snowpack instance

* Document import.meta.env.SSR

* Remove unnecessary Promise.all
2021-06-11 09:03:22 -04:00
Matthew Phillips
ce9336115e
Document the minimum node version (#379)
* Document the minimum node version

* Adds the changeset
2021-06-11 09:03:06 -04:00
matthewp
cc5d000fdc [ci] yarn format 2021-06-10 18:11:17 +00:00
Matthew Phillips
afa09ee9dc
Add HMR port script when needed (#375)
* 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
2021-06-10 14:10:15 -04:00
Drew Powers
a660e49f80
Add integration test for templates (#372) 2021-06-10 10:30:48 -06:00
Kevin (Kun) "Kassimo" Qian
5fbc1cb641
nit: ask user to modify devOptions.port when addr in use for dev (#347)
* nit: ask user to modify devOptions.port when addr in use for dev

* unnecessary import of red

* changeset
2021-06-09 16:48:25 -04:00
Jeff
74d67b52c1
Fix broken link in README (#359)
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.
2021-06-09 16:37:59 -04:00
Fred K. Schott
5973cc763d add anayltics script 2021-06-08 14:28:29 -07:00
Fred K. Schott
57e0938cfa
Update README.md 2021-06-08 13:06:09 -07:00
Nate Moore
8af8b86f0b
WIP: Launch Post (#333)
* 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>
2021-06-08 14:01:46 -05:00
github-actions[bot]
3c71fad17d
Version Packages (#337)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-08 13:56:29 -04:00
Fred K. Schott
5cda571999
watch files during development both frontend and backend (#336) 2021-06-08 10:54:10 -07:00
github-actions[bot]
8dd3f106ca
Version Packages (#335)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-08 12:58:50 -04:00
Fred K. Schott
d6a7349e74
fix create-astro template issue (#334) 2021-06-08 12:56:37 -04:00
Fred K. Schott
91ce5383a9
Update README.md 2021-06-08 09:29:53 -07:00
matthewp
9c7f07aebd [ci] yarn format 2021-06-08 15:24:57 +00:00
github-actions[bot]
955be013b2
Version Packages (#331)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-06-08 11:23:33 -04:00
matthewp
a7594cfcdf [ci] yarn format 2021-06-08 15:12:07 +00:00