From f7c557f5ce81b548504fbd2a3bfbd615847b2cec Mon Sep 17 00:00:00 2001 From: Matt Pilott Date: Sat, 2 Nov 2019 22:22:53 +0000 Subject: [PATCH 1/7] Switched to @rollup/plugin-replace --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a061cdf742..72c8fac2f2 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@types/node": "^8.10.53", "@typescript-eslint/eslint-plugin": "^1.13.0", "@typescript-eslint/parser": "^2.1.0", + "@rollup/plugin-replace": "^2.2.0", "acorn": "^7.1.0", "agadoo": "^1.1.0", "c8": "^5.0.1", @@ -81,7 +82,6 @@ "rollup-plugin-commonjs": "^10.1.0", "rollup-plugin-json": "^4.0.0", "rollup-plugin-node-resolve": "^5.2.0", - "rollup-plugin-replace": "^2.2.0", "rollup-plugin-sucrase": "^2.1.0", "rollup-plugin-typescript": "^1.0.1", "rollup-plugin-virtual": "^1.0.1", From 8998da9bc34a342c8e7b6a34dc9fc8dd22b2201c Mon Sep 17 00:00:00 2001 From: Matt Pilott Date: Sat, 2 Nov 2019 22:23:18 +0000 Subject: [PATCH 2/7] Switched to @rollup/plugin-replace --- rollup.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 4444494a5f..c55cbf2426 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import fs from 'fs'; -import replace from 'rollup-plugin-replace'; +import replace from '@rollup/plugin-replace'; import resolve from 'rollup-plugin-node-resolve'; import commonjs from 'rollup-plugin-commonjs'; import json from 'rollup-plugin-json'; From 1b8a1b22a694b244379ac1b47bd1ec3f7a71456d Mon Sep 17 00:00:00 2001 From: Leonardo Di Vittorio Date: Wed, 6 Nov 2019 15:20:51 +0100 Subject: [PATCH 3/7] fix: svelte-logo-mask correct file name --- .../tutorial/06-bindings/12-bind-this/app-a/App.svelte | 4 ++-- .../tutorial/06-bindings/12-bind-this/app-b/App.svelte | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte b/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte index c85cab9225..d40c45ef6c 100644 --- a/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte +++ b/site/content/tutorial/06-bindings/12-bind-this/app-a/App.svelte @@ -43,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } diff --git a/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte index 9a8fabc265..8e4b3c5bef 100644 --- a/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte +++ b/site/content/tutorial/06-bindings/12-bind-this/app-b/App.svelte @@ -43,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } From e467c92564f29de4187e52b1f982c4852ef04d70 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Nov 2019 11:49:40 -0500 Subject: [PATCH 4/7] fix logo-mask url, remove unused file --- site/content/examples/05-bindings/10-bind-this/App.svelte | 4 ++-- site/static/logo-mask.svg | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) delete mode 100644 site/static/logo-mask.svg diff --git a/site/content/examples/05-bindings/10-bind-this/App.svelte b/site/content/examples/05-bindings/10-bind-this/App.svelte index 9a8fabc265..8e4b3c5bef 100644 --- a/site/content/examples/05-bindings/10-bind-this/App.svelte +++ b/site/content/examples/05-bindings/10-bind-this/App.svelte @@ -43,8 +43,8 @@ width: 100%; height: 100%; background-color: #666; - -webkit-mask: url(logo-mask.svg) 50% 50% no-repeat; - mask: url(logo-mask.svg) 50% 50% no-repeat; + -webkit-mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; + mask: url(svelte-logo-mask.svg) 50% 50% no-repeat; } diff --git a/site/static/logo-mask.svg b/site/static/logo-mask.svg deleted file mode 100644 index d7919a61ab..0000000000 --- a/site/static/logo-mask.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file From 77b53b415a645191b108fdf7323f7022610f590f Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Nov 2019 13:08:22 -0500 Subject: [PATCH 5/7] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 72c8fac2f2..8754c25031 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "@types/node": "^8.10.53", "@typescript-eslint/eslint-plugin": "^1.13.0", "@typescript-eslint/parser": "^2.1.0", - "@rollup/plugin-replace": "^2.2.0", + "@rollup/plugin-replace": "^2.2.1", "acorn": "^7.1.0", "agadoo": "^1.1.0", "c8": "^5.0.1", From 82cc41a1e8c67e657a3beaa8176d375c2b621933 Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Nov 2019 13:25:45 -0500 Subject: [PATCH 6/7] encode parts of filename, not entire string --- src/compiler/compile/utils/get_name_from_filename.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/compile/utils/get_name_from_filename.ts b/src/compiler/compile/utils/get_name_from_filename.ts index 04479ce6bd..aa310c52bd 100644 --- a/src/compiler/compile/utils/get_name_from_filename.ts +++ b/src/compiler/compile/utils/get_name_from_filename.ts @@ -1,7 +1,7 @@ export default function get_name_from_filename(filename: string) { if (!filename) return null; - // eslint-disable-next-line no-useless-escape - const parts = encodeURI(filename).split(/[\/\\]/); + + const parts = filename.split(/[\/\\]/).map(encodeURI); if (parts.length > 1) { const index_match = parts[parts.length - 1].match(/^index(\.\w+)/); From 07e85c26f031b7ba04ecf73527dc4cd14c02ca1e Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Wed, 6 Nov 2019 13:27:09 -0500 Subject: [PATCH 7/7] lint --- src/compiler/compile/utils/get_name_from_filename.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/compile/utils/get_name_from_filename.ts b/src/compiler/compile/utils/get_name_from_filename.ts index aa310c52bd..d1e0e167ce 100644 --- a/src/compiler/compile/utils/get_name_from_filename.ts +++ b/src/compiler/compile/utils/get_name_from_filename.ts @@ -1,7 +1,7 @@ export default function get_name_from_filename(filename: string) { if (!filename) return null; - const parts = filename.split(/[\/\\]/).map(encodeURI); + const parts = filename.split(/[/\\]/).map(encodeURI); if (parts.length > 1) { const index_match = parts[parts.length - 1].match(/^index(\.\w+)/);