-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: implement RFC0016 * chore: update to latest compiler * chore: update compiler * test: fix script tests * test: update public tests * feat: throw a warning when referencing scripts in `public/` without `is:inline`
- Loading branch information
1 parent
42760e0
commit d55658f
Showing
18 changed files
with
46 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro': minor | ||
--- | ||
|
||
Implement [RFC0016](https://github.com/withastro/rfcs/blob/main/proposals/0016-style-script-defaults.md) which changes the default behavior of `script`, introduces `is:inline`, and changes `<style global>` to `<style is:global>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,7 @@ | |
} | ||
</style> | ||
|
||
<style global> | ||
<style is:global> | ||
html { | ||
--primary: aquamarine; | ||
} | ||
|
6 changes: 3 additions & 3 deletions
6
packages/astro/test/fixtures/astro-public/src/pages/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
<html lang="en"> | ||
<head> | ||
<title>This Site</title> | ||
<link href="/example.css" ref="stylesheet"/> | ||
<script src="/example.js"></script> | ||
<link href="/example.css" rel="stylesheet"/> | ||
<script is:inline src="/example.js"></script> | ||
</head> | ||
<body> | ||
<img src="/images/twitter.png" /> | ||
</body> | ||
</html> | ||
</html> |
4 changes: 2 additions & 2 deletions
4
packages/astro/test/fixtures/astro-scripts/src/components/Inline.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<script hoist type="module"> | ||
<script> | ||
console.log('some content here.'); | ||
</script> | ||
</script> |
2 changes: 1 addition & 1 deletion
2
packages/astro/test/fixtures/astro-scripts/src/components/NoHoistClassic.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
import url from "../scripts/no_hoist_nonmodule.js?url" | ||
--- | ||
<script src={url}></script> | ||
<script is:inline src={url}></script> |
2 changes: 1 addition & 1 deletion
2
packages/astro/test/fixtures/astro-scripts/src/components/NoHoistModule.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
--- | ||
import url from '../scripts/no_hoist_module.js?url'; | ||
--- | ||
<script type="module" src={url}></script> | ||
<script is:inline type="module" src={url}></script> |
2 changes: 1 addition & 1 deletion
2
packages/astro/test/fixtures/astro-scripts/src/components/Widget.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<script hoist type="module" src="../scripts/something.js"></script> | ||
<script src="../scripts/something.js"></script> |
2 changes: 1 addition & 1 deletion
2
packages/astro/test/fixtures/astro-scripts/src/components/Widget2.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<script hoist type="module" src="../scripts/another_external.js"></script> | ||
<script src="../scripts/another_external.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ import Widget2 from '../components/Widget2.astro'; | |
<Widget /> | ||
<Widget2 /> | ||
</body> | ||
</html> | ||
</html> |
4 changes: 2 additions & 2 deletions
4
packages/astro/test/fixtures/remote-css/src/components/CommonHead.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<style global> | ||
<style is:global> | ||
/* Testing remote imports */ | ||
@import "https://unpkg.com/open-props"; | ||
@import "https://unpkg.com/open-props/normalize.min.css"; | ||
</style> | ||
</style> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.