From bd50bd56519864758ee5c36a8839c9c3f505a540 Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Fri, 18 Oct 2019 23:12:55 +0700 Subject: [PATCH] remove `gopher` from `URL` special cases per https://github.com/whatwg/url/issues/342 and https://github.com/whatwg/url/pull/453 --- CHANGELOG.md | 3 + packages/core-js/modules/web.url.js | 1 - tests/wpt-url-resources/setters.js | 24 ------- tests/wpt-url-resources/urltestdata.js | 90 -------------------------- 4 files changed, 3 insertions(+), 115 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c45879bcd458..4396473bc674 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## Changelog +##### Unreleased +- `gopher` removed from `URL` special cases per [this issue](https://github.com/whatwg/url/issues/342) and [this PR](https://github.com/whatwg/url/pull/453) + ##### 3.3.2 - 2019.10.14 - Fixed compatibility of `core-js-compat` with Node 6 and Yarn, [#669](https://github.com/zloirock/core-js/issues/669) diff --git a/packages/core-js/modules/web.url.js b/packages/core-js/modules/web.url.js index 2d4a92498591..6f29c0856aef 100644 --- a/packages/core-js/modules/web.url.js +++ b/packages/core-js/modules/web.url.js @@ -260,7 +260,6 @@ var percentEncode = function (char, set) { var specialSchemes = { ftp: 21, file: null, - gopher: 70, http: 80, https: 443, ws: 80, diff --git a/tests/wpt-url-resources/setters.js b/tests/wpt-url-resources/setters.js index 7cf14108bc98..60a656b089de 100644 --- a/tests/wpt-url-resources/setters.js +++ b/tests/wpt-url-resources/setters.js @@ -97,14 +97,6 @@ export default { protocol: 'http:', }, }, - { - href: 'gopher://example.net:1234', - newValue: 'file', - expected: { - href: 'gopher://example.net:1234/', - protocol: 'gopher:', - }, - }, { href: 'wss://x:x@example.net:1234', newValue: 'file', @@ -122,14 +114,6 @@ export default { protocol: 'file:', }, }, - { - href: 'file:///test', - newValue: 'gopher', - expected: { - href: 'file:///test', - protocol: 'file:', - }, - }, { href: 'file:', newValue: 'wss', @@ -189,14 +173,6 @@ export default { protocol: 'ssh:', }, }, - { - href: 'ssh://me@example.net', - newValue: 'gopher', - expected: { - href: 'ssh://me@example.net', - protocol: 'ssh:', - }, - }, { href: 'ssh://me@example.net', newValue: 'file', diff --git a/tests/wpt-url-resources/urltestdata.js b/tests/wpt-url-resources/urltestdata.js index ea8445b04bdb..41a8cc18402b 100644 --- a/tests/wpt-url-resources/urltestdata.js +++ b/tests/wpt-url-resources/urltestdata.js @@ -1074,21 +1074,6 @@ export default [ search: '', hash: '', }, - { - input: 'gopher:/example.com/', - base: 'http://example.org/foo/bar', - href: 'gopher://example.com/', - origin: 'gopher://example.com', - protocol: 'gopher:', - username: '', - password: '', - host: 'example.com', - hostname: 'example.com', - port: '', - pathname: '/', - search: '', - hash: '', - }, { input: 'ws:/example.com/', base: 'http://example.org/foo/bar', @@ -1239,21 +1224,6 @@ export default [ search: '', hash: '', }, - { - input: 'gopher:example.com/', - base: 'http://example.org/foo/bar', - href: 'gopher://example.com/', - origin: 'gopher://example.com', - protocol: 'gopher:', - username: '', - password: '', - host: 'example.com', - hostname: 'example.com', - port: '', - pathname: '/', - search: '', - hash: '', - }, { input: 'ws:example.com/', base: 'http://example.org/foo/bar', @@ -2493,36 +2463,6 @@ export default [ search: '', hash: '', }, - { - input: 'gopher://foo:70/', - base: 'about:blank', - href: 'gopher://foo/', - origin: 'gopher://foo', - protocol: 'gopher:', - username: '', - password: '', - host: 'foo', - hostname: 'foo', - port: '', - pathname: '/', - search: '', - hash: '', - }, - { - input: 'gopher://foo:443/', - base: 'about:blank', - href: 'gopher://foo:443/', - origin: 'gopher://foo:443', - protocol: 'gopher:', - username: '', - password: '', - host: 'foo:443', - hostname: 'foo', - port: '443', - pathname: '/', - search: '', - hash: '', - }, { input: 'ws://foo:80/', base: 'about:blank', @@ -2732,21 +2672,6 @@ export default [ search: '', hash: '', }, - { - input: 'gopher:/example.com/', - base: 'about:blank', - href: 'gopher://example.com/', - origin: 'gopher://example.com', - protocol: 'gopher:', - username: '', - password: '', - host: 'example.com', - hostname: 'example.com', - port: '', - pathname: '/', - search: '', - hash: '', - }, { input: 'ws:/example.com/', base: 'about:blank', @@ -2897,21 +2822,6 @@ export default [ search: '', hash: '', }, - { - input: 'gopher:example.com/', - base: 'about:blank', - href: 'gopher://example.com/', - origin: 'gopher://example.com', - protocol: 'gopher:', - username: '', - password: '', - host: 'example.com', - hostname: 'example.com', - port: '', - pathname: '/', - search: '', - hash: '', - }, { input: 'ws:example.com/', base: 'about:blank',