Compare commits

...

5 Commits

Author SHA1 Message Date
Rich Harris
499b377bfd -> v0.19.3 2018-09-03 07:55:30 -04:00
Rich Harris
1baeb79d4b Merge branch 'master' of github.com:sveltejs/sapper 2018-09-03 07:54:42 -04:00
Rich Harris
0cc5ff95d6 minor tidy up 2018-09-03 07:54:39 -04:00
Rich Harris
e90525c1e8 Merge pull request #413 from sveltejs/gh-347
better unicode handling - fixes #347, i think
2018-09-03 07:47:41 -04:00
Rich Harris
6ccae0cd33 better unicode handling - fixes #347, i think 2018-09-02 23:00:39 -04:00
6 changed files with 28 additions and 4 deletions

View File

@@ -1,5 +1,9 @@
# sapper changelog
## 0.19.3
* Better unicode route handling ([#347](https://github.com/sveltejs/sapper/issues/347))
## 0.19.2
* Ignore editor tmp files ([#220](https://github.com/sveltejs/sapper/issues/220))

View File

@@ -1,6 +1,6 @@
{
"name": "sapper",
"version": "0.19.2",
"version": "0.19.3",
"description": "Military-grade apps, engineered by Svelte",
"main": "dist/middleware.js",
"bin": {

View File

@@ -185,7 +185,8 @@ function serve({ prefix, pathname, cache_control }: {
const type = lookup(req.path);
try {
const data = read(req.path.slice(1));
const file = decodeURIComponent(req.path.slice(1));
const data = read(file);
res.setHeader('Content-Type', type);
res.setHeader('Cache-Control', cache_control);

View File

@@ -1 +1,11 @@
<h1>I'm afraid I just blue myself</h1>
<h1>{phrase}</h1>
<script>
export default {
preload() {
return this.fetch('fünke.json').then(r => r.json()).then(phrase => {
return { phrase };
});
}
};
</script>

View File

@@ -0,0 +1,9 @@
export function get(req, res) {
res.writeHead(200, {
'Content-Type': 'application/json'
});
res.end(JSON.stringify(
"I'm afraid I just blue myself"
));
}

View File

@@ -746,7 +746,7 @@ function run({ mode, basepath = '' }) {
it('allows reserved words as route names', () => {
return nightmare.goto(`${base}/const`).init()
.then(() => nightmare.page.title())
.page.title()
.then(title => {
assert.equal(title, 'reserved words are okay as routes');
});