Skip to content

Commit

Permalink
Merge branch 'main' into chore/remove-smoke-from-lockfile
Browse files Browse the repository at this point in the history
  • Loading branch information
natemoo-re authored Jun 22, 2022
2 parents 8e1b286 + b9f891b commit 48006cd
Show file tree
Hide file tree
Showing 87 changed files with 481 additions and 168 deletions.
23 changes: 23 additions & 0 deletions .changeset/neat-seas-peel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
'astro': patch
---

Allow TypeScript inside script tags

This makes it so that you can use TypeScript inside of script tags like so:

```html
<script>
interface Person {
name: string;
}
const person: Person = {
name: 'Astro'
};
console.log(person);
</script>
```

Note that the the VSCode extension does not currently support this, however.
5 changes: 5 additions & 0 deletions .changeset/spotty-rockets-grow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro': patch
---

Allow specifying entryFileNames for client JS
11 changes: 6 additions & 5 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
**/*.js
**/*.ts
!packages/astro/**/*.js
!packages/astro/**/*.ts
packages/astro/test/**/*.js
**/*.d.ts
packages/**/dist/**/*
packages/**/fixtures/**/*
packages/webapi/**/*
packages/astro/vendor/vite/**/*
examples/**/*
scripts/**/*
.github
.changeset
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['plugin:@typescript-eslint/recommended', 'prettier'],
plugins: ['@typescript-eslint', 'prettier'],
plugins: ['@typescript-eslint', 'prettier', 'no-only-tests'],
rules: {
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/camelcase': 'off',
Expand All @@ -17,5 +17,6 @@ module.exports = {
'prefer-const': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-only-tests/no-only-tests': 'error',
},
};
3 changes: 0 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
eslint: true
eslint_args: --ignore-pattern test --ignore-pattern vendor
eslint_dir: packages/astro
eslint_extensions: ts
prettier: false
auto_fix: true
git_name: github-actions[bot]
Expand Down
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/blog-multiple-authors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/blog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"preact": "^10.7.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/component/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@example/my-component": "workspace:*",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/component/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"serve": "astro --root demo preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"@astrojs/react": "^0.1.3",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/env-vars/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/framework-alpine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"alpinejs": "^3.10.2"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-lit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/lit": "^0.2.0",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-multiple/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@astrojs/solid-js": "^0.1.4",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"@webcomponents/template-shadowroot": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"preact": "^10.7.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@astrojs/react": "^0.1.3",
"@types/react": "^18.0.10",
"@types/react-dom": "^18.0.5",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"react": "^18.1.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-solid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/solid-js": "^0.1.4",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"solid-js": "^1.4.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/svelte": "^0.1.4",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"svelte": "^3.48.0"
Expand Down
2 changes: 1 addition & 1 deletion examples/framework-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"vue": "^3.2.36"
Expand Down
2 changes: 1 addition & 1 deletion examples/integrations-playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@astrojs/solid-js": "0.1.4",
"@astrojs/tailwind": "^0.2.1",
"@astrojs/turbolinks": "^0.1.3",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"solid-js": "^1.4.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/non-html-pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/portfolio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/preact": "^0.1.3",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/ssr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@astrojs/node": "^0.1.2",
"@astrojs/svelte": "^0.1.4",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"concurrently": "^7.2.1",
"lightcookie": "^1.0.25",
"unocss": "^0.15.6",
Expand Down
2 changes: 1 addition & 1 deletion examples/starter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/subpath/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/react": "^0.1.3",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"sass": "^1.52.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.11.3",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"hast-util-select": "5.0.1",
"rehype-autolink-headings": "^6.1.1",
"rehype-slug": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-markdown-shiki/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
},
"devDependencies": {
"@astrojs/markdown-remark": "^0.11.3",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/with-markdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@astrojs/react": "^0.1.3",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
},
"dependencies": {
"preact": "^10.7.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-nanostores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"@astrojs/solid-js": "^0.1.4",
"@astrojs/svelte": "^0.1.4",
"@astrojs/vue": "^0.1.5",
"astro": "^1.0.0-beta.51"
"astro": "^1.0.0-beta.52"
}
}
2 changes: 1 addition & 1 deletion examples/with-tailwindcss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"devDependencies": {
"@astrojs/tailwind": "^0.2.1",
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"autoprefixer": "^10.4.7",
"canvas-confetti": "^1.5.1",
"postcss": "^8.4.14",
Expand Down
2 changes: 1 addition & 1 deletion examples/with-vite-plugin-pwa/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"preview": "astro preview"
},
"devDependencies": {
"astro": "^1.0.0-beta.51",
"astro": "^1.0.0-beta.52",
"vite-plugin-pwa": "0.11.11",
"workbox-window": "^6.5.3"
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test:e2e": "cd packages/astro && pnpm playwright install && pnpm run test:e2e",
"test:e2e:match": "cd packages/astro && pnpm playwright install && pnpm run test:e2e:match",
"benchmark": "turbo run benchmark --scope=astro",
"lint": "eslint \"packages/**/*.ts\"",
"lint": "eslint .",
"version": "changeset version && pnpm install --no-frozen-lockfile && pnpm run format"
},
"workspaces": [
Expand Down Expand Up @@ -69,6 +69,7 @@
"esbuild": "^0.14.42",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-prettier": "^4.0.0",
"execa": "^6.1.0",
"organize-imports-cli": "^0.10.0",
Expand Down
12 changes: 12 additions & 0 deletions packages/astro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# astro

## 1.0.0-beta.52

### Patch Changes

- [#3667](https://github.com/withastro/astro/pull/3667) [`df02fad1`](https://github.com/withastro/astro/commit/df02fad13ef7c8a8a563ee3720513d437090ee2e) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Fix: add @nanostores/preact to ALWAYS_NOEXTERNAL list for easier onboarding

* [#3678](https://github.com/withastro/astro/pull/3678) [`89884540`](https://github.com/withastro/astro/commit/898845402cd82995bd4878c93d3ccfcce89ebf27) Thanks [@matthewp](https://github.com/matthewp)! - Fix regression with SSRManifest and client assets

- [#3658](https://github.com/withastro/astro/pull/3658) [`aeab8909`](https://github.com/withastro/astro/commit/aeab890971e5f425f877545c674d1cb532cee754) Thanks [@matthewp](https://github.com/matthewp)! - Inlines small hoisted scripts

This enables a perf improvement, whereby small hoisted scripts without dependencies are inlined into the HTML, rather than loaded externally. This uses `vite.build.assetInlineLimit` to determine if the script should be inlined.

## 1.0.0-beta.51

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/astro/e2e/ts-resolution.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const test = base.extend({
},
});

function runTest(test) {
test('client:idle', async ({ page, astro }) => {
function runTest(it) {
it('client:idle', async ({ page, astro }) => {
await page.goto(astro.resolveUrl('/'));

const counter = page.locator('#client-idle');
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro",
"version": "1.0.0-beta.51",
"version": "1.0.0-beta.52",
"description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
"type": "module",
"author": "withastro",
Expand Down
Loading

0 comments on commit 48006cd

Please sign in to comment.