Skip to content

Commit

Permalink
Merge branch 'master' into default-hydratable-true
Browse files Browse the repository at this point in the history
  • Loading branch information
Rich-Harris authored Dec 8, 2022
2 parents 976ef17 + 9acd66e commit 31a5d04
Show file tree
Hide file tree
Showing 63 changed files with 1,971 additions and 291 deletions.
5 changes: 5 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"beige-eyes-poke",
"beige-gorillas-tell",
"beige-grapes-love",
"beige-kangaroos-appear",
"beige-mails-accept",
"beige-months-obey",
"beige-teachers-end",
Expand Down Expand Up @@ -426,6 +427,7 @@
"friendly-chefs-draw",
"friendly-dodos-exercise",
"friendly-eggs-cry",
"friendly-jobs-perform",
"friendly-pears-wash",
"friendly-plums-notice",
"friendly-rivers-argue",
Expand Down Expand Up @@ -1086,6 +1088,7 @@
"seven-ads-yawn",
"seven-avocados-hug",
"seven-bags-sniff",
"seven-bikes-give",
"seven-colts-build",
"seven-cows-design",
"seven-impalas-march",
Expand Down Expand Up @@ -1163,6 +1166,7 @@
"six-geese-study",
"six-melons-drive",
"six-pants-melt",
"six-ravens-attack",
"six-rules-collect",
"sixty-bees-explain",
"sixty-pianos-fix",
Expand Down Expand Up @@ -1563,6 +1567,7 @@
"witty-meals-tie",
"witty-news-dress",
"witty-shoes-know",
"witty-spies-occur",
"yellow-apricots-stare",
"yellow-coins-wash",
"yellow-eagles-carry",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/seven-bikes-give.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/kit': patch
---

[feat] split Vite plugin in two
3 changes: 2 additions & 1 deletion packages/create-svelte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ await create('my-new-app', {
types: 'checkjs', // or 'typescript' or null;
prettier: false,
eslint: false,
playwright: false
playwright: false,
vitest: false
});
```

Expand Down
18 changes: 18 additions & 0 deletions packages/kit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# @sveltejs/kit

## 1.0.0-next.574

### Patch Changes

- [feat] split Vite plugin in two ([#7990](https:/sveltejs/kit/pull/7990))

## 1.0.0-next.573

### Patch Changes

- [fix] adjust ActionData type ([#7962](https:/sveltejs/kit/pull/7962))

- [breaking] disallow unknown exports (except when starting with an underscore) from `+(layout|page)(.server)?.js` and `+server.js` files ([#7878](https:/sveltejs/kit/pull/7878))

- [fix] continuous optionals should not throw conflict error ([#7939](https:/sveltejs/kit/pull/7939))

- fix `enhance` error message when form action doesn't exist or csrf is enabled ([#7958](https:/sveltejs/kit/pull/7958))

## 1.0.0-next.572

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sveltejs/kit",
"version": "1.0.0-next.572",
"version": "1.0.0-next.574",
"repository": {
"type": "git",
"url": "https:/sveltejs/kit",
Expand All @@ -21,7 +21,7 @@
"set-cookie-parser": "^2.5.1",
"sirv": "^2.0.2",
"tiny-glob": "^0.2.9",
"undici": "5.13.0"
"undici": "5.14.0"
},
"devDependencies": {
"@playwright/test": "^1.28.1",
Expand Down
18 changes: 13 additions & 5 deletions packages/kit/src/exports/vite/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export async function sveltekit() {
...svelte_config.vitePlugin
};

return [...svelte(vite_plugin_svelte_options), kit({ svelte_config })];
return [...svelte(vite_plugin_svelte_options), ...kit({ svelte_config })];
}

/**
Expand All @@ -91,7 +91,7 @@ export async function sveltekit() {
* - https://rollupjs.org/guide/en/#output-generation-hooks
*
* @param {{ svelte_config: import('types').ValidatedConfig }} options
* @return {import('vite').Plugin}
* @return {import('vite').Plugin[]}
*/
function kit({ svelte_config }) {
/** @type {import('vite').ResolvedConfig} */
Expand Down Expand Up @@ -197,8 +197,9 @@ function kit({ svelte_config }) {
// TODO remove this for 1.0
check_vite_version();

return {
name: 'vite-plugin-svelte-kit',
/** @type {import('vite').Plugin} */
const plugin_build = {
name: 'vite-plugin-sveltekit-build',

/**
* Build the SvelteKit-provided Vite config to be merged with the user's vite.config.js file.
Expand Down Expand Up @@ -552,7 +553,12 @@ function kit({ svelte_config }) {
fs.unlinkSync(`${paths.output_dir}/client/${vite_config.build.manifest}`);
fs.unlinkSync(`${paths.output_dir}/server/${vite_config.build.manifest}`);
}
},
}
};

/** @type {import('vite').Plugin} */
const plugin_middleware = {
name: 'vite-plugin-sveltekit-middleware',

/**
* Adds the SvelteKit middleware to do SSR in dev mode.
Expand All @@ -570,6 +576,8 @@ function kit({ svelte_config }) {
return preview(vite, vite_config, svelte_config);
}
};

return [plugin_build, plugin_middleware];
}

function check_vite_version() {
Expand Down
78 changes: 74 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion sites/kit.svelte.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@sveltejs/amp": "workspace:*",
"@sveltejs/kit": "workspace:*",
"@sveltejs/site-kit": "^2.1.4",
"@types/d3-geo": "^3.0.2",
"@types/node": "^16.18.6",
"flexsearch": "^0.7.31",
"magic-string": "^0.27.0",
Expand All @@ -29,5 +30,11 @@
"vite": "^3.2.4",
"vite-imagetools": "^4.0.11"
},
"type": "module"
"type": "module",
"dependencies": {
"@vercel/edge": "^0.1.2",
"d3-geo": "^3.0.1",
"d3-geo-projection": "^4.0.0",
"topojson-client": "^3.1.0"
}
}
11 changes: 11 additions & 0 deletions sites/kit.svelte.dev/src/lib/icons/left-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions sites/kit.svelte.dev/src/lib/icons/pause.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions sites/kit.svelte.dev/src/lib/icons/play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions sites/kit.svelte.dev/src/lib/icons/plus.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions sites/kit.svelte.dev/src/lib/icons/up-small.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import { Icon, Icons, Nav, NavItem, PreloadingIndicator, SkipLink } from '@sveltejs/site-kit';
import Search from '$lib/search/Search.svelte';
import SearchBox from '$lib/search/SearchBox.svelte';
import Logo from './svelte-logo.svg';
import Logo from './home/svelte-logo.svg';
</script>

<Icons />
Expand Down
Loading

0 comments on commit 31a5d04

Please sign in to comment.