From d5194154335d6cb30edca9b648083069faf9778c Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Mon, 10 Oct 2016 03:47:49 +0200 Subject: Squashed 'thirdparty/URI.js/' content from commit b77c167 git-subtree-dir: thirdparty/URI.js git-subtree-split: b77c167bc201575956ad409333ff032e504b8044 --- .editorconfig | 9 + .gitignore | 2 + .jshintrc | 31 + CHANGELOG.md | 332 ++++++ Gruntfile.js | 22 + LICENSE.txt | 21 + README.md | 244 +++++ about-uris.html | 189 ++++ bower.json | 16 + build.html | 71 ++ build.js | 78 ++ contributing.md | 19 + docs.html | 1399 +++++++++++++++++++++++++ index.html | 173 ++++ jquery-1.10.2.min.js | 6 + jquery-1.7.2.min.js | 4 + jquery-1.8.2.min.js | 2 + jquery-1.9.1.min.js | 5 + jquery-uri-plugin.html | 203 ++++ package.json | 78 ++ prettify/lang-apollo.js | 2 + prettify/lang-clj.js | 18 + prettify/lang-css.js | 2 + prettify/lang-go.js | 1 + prettify/lang-hs.js | 2 + prettify/lang-lisp.js | 3 + prettify/lang-lua.js | 2 + prettify/lang-ml.js | 2 + prettify/lang-n.js | 4 + prettify/lang-proto.js | 1 + prettify/lang-scala.js | 2 + prettify/lang-sql.js | 2 + prettify/lang-tex.js | 1 + prettify/lang-vb.js | 2 + prettify/lang-vhdl.js | 3 + prettify/lang-wiki.js | 2 + prettify/lang-xq.js | 3 + prettify/lang-yaml.js | 2 + prettify/prettify.css | 1 + prettify/prettify.js | 28 + prettify/prettify.sunburst.css | 52 + screen.css | 181 ++++ screen.js | 39 + src/IPv6.js | 185 ++++ src/SecondLevelDomains.js | 240 +++++ src/URI.fragmentQuery.js | 104 ++ src/URI.fragmentURI.js | 97 ++ src/URI.js | 2218 ++++++++++++++++++++++++++++++++++++++++ src/URI.min.js | 89 ++ src/URITemplate.js | 513 ++++++++++ src/jquery.URI.js | 234 +++++ src/jquery.URI.min.js | 7 + src/punycode.js | 533 ++++++++++ test/index.html | 26 + test/pre_libs.js | 7 + test/qunit/qunit-composite.css | 13 + test/qunit/qunit-composite.js | 167 +++ test/qunit/qunit.css | 244 +++++ test/qunit/qunit.js | 2212 +++++++++++++++++++++++++++++++++++++++ test/test.URI.html | 26 + test/test.fragmentQuery.html | 31 + test/test.fragmentURI.html | 31 + test/test.jQuery-1.10.html | 31 + test/test.jQuery-1.7.html | 31 + test/test.jQuery-1.8.html | 31 + test/test.jQuery-1.9.html | 31 + test/test.js | 1837 +++++++++++++++++++++++++++++++++ test/test_fragmentQuery.js | 59 ++ test/test_fragmentURI.js | 61 ++ test/test_jim.js | 146 +++ test/test_jquery.js | 141 +++ test/test_template.js | 411 ++++++++ test/urls.js | 1892 ++++++++++++++++++++++++++++++++++ uri-template.html | 234 +++++ utils/SLDs.php | 37 + utils/sld.js | 101 ++ 76 files changed, 15279 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 .jshintrc create mode 100644 CHANGELOG.md create mode 100644 Gruntfile.js create mode 100644 LICENSE.txt create mode 100644 README.md create mode 100644 about-uris.html create mode 100644 bower.json create mode 100644 build.html create mode 100644 build.js create mode 100644 contributing.md create mode 100644 docs.html create mode 100644 index.html create mode 100644 jquery-1.10.2.min.js create mode 100644 jquery-1.7.2.min.js create mode 100644 jquery-1.8.2.min.js create mode 100644 jquery-1.9.1.min.js create mode 100644 jquery-uri-plugin.html create mode 100644 package.json create mode 100644 prettify/lang-apollo.js create mode 100644 prettify/lang-clj.js create mode 100644 prettify/lang-css.js create mode 100644 prettify/lang-go.js create mode 100644 prettify/lang-hs.js create mode 100644 prettify/lang-lisp.js create mode 100644 prettify/lang-lua.js create mode 100644 prettify/lang-ml.js create mode 100644 prettify/lang-n.js create mode 100644 prettify/lang-proto.js create mode 100644 prettify/lang-scala.js create mode 100644 prettify/lang-sql.js create mode 100644 prettify/lang-tex.js create mode 100644 prettify/lang-vb.js create mode 100644 prettify/lang-vhdl.js create mode 100644 prettify/lang-wiki.js create mode 100644 prettify/lang-xq.js create mode 100644 prettify/lang-yaml.js create mode 100644 prettify/prettify.css create mode 100644 prettify/prettify.js create mode 100644 prettify/prettify.sunburst.css create mode 100644 screen.css create mode 100644 screen.js create mode 100644 src/IPv6.js create mode 100644 src/SecondLevelDomains.js create mode 100644 src/URI.fragmentQuery.js create mode 100644 src/URI.fragmentURI.js create mode 100644 src/URI.js create mode 100644 src/URI.min.js create mode 100644 src/URITemplate.js create mode 100644 src/jquery.URI.js create mode 100644 src/jquery.URI.min.js create mode 100644 src/punycode.js create mode 100644 test/index.html create mode 100644 test/pre_libs.js create mode 100644 test/qunit/qunit-composite.css create mode 100644 test/qunit/qunit-composite.js create mode 100644 test/qunit/qunit.css create mode 100644 test/qunit/qunit.js create mode 100644 test/test.URI.html create mode 100644 test/test.fragmentQuery.html create mode 100644 test/test.fragmentURI.html create mode 100644 test/test.jQuery-1.10.html create mode 100644 test/test.jQuery-1.7.html create mode 100644 test/test.jQuery-1.8.html create mode 100644 test/test.jQuery-1.9.html create mode 100644 test/test.js create mode 100644 test/test_fragmentQuery.js create mode 100644 test/test_fragmentURI.js create mode 100644 test/test_jim.js create mode 100644 test/test_jquery.js create mode 100644 test/test_template.js create mode 100644 test/urls.js create mode 100644 uri-template.html create mode 100644 utils/SLDs.php create mode 100644 utils/sld.js diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..778c1485c --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[**] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..9daa8247d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 000000000..8327de8cb --- /dev/null +++ b/.jshintrc @@ -0,0 +1,31 @@ +{ + "node": true, + "browser": false, + "esnext": false, + "bitwise": false, + "camelcase": true, + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 2, + "latedef": true, + "newcap": true, + "noarg": true, + "quotmark": "single", + "regexp": true, + "undef": true, + "unused": true, + "strict": true, + "trailing": true, + "smarttabs": true, + "expr": true, + "globals": { + "describe": false, + "it": false, + "before": false, + "beforeEach": false, + "after": false, + "afterEach": false, + "define": false + } +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..49cd3cc96 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,332 @@ +# URI.js - Changelog # + +The release notes tracked in this document are also made available on the [releases page](https://github.com/medialize/URI.js/releases) + +### 1.18.2 (September 25th 2016) ### + +* fixing [`URI.withinString()`](http://medialize.github.io/URI.js/docs.html#static-withinString) to allow callback to return `undefined` or `string` - [Issue #303](https://github.com/medialize/URI.js/issues/303) +* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) to properly resolve relative paths for fragment-only URLs + +### 1.18.1 (May 29th 2016) ### + +* fixing UMD wrapper of `jquery.URI.js` - [Issue #295](https://github.com/medialize/URI.js/issues/295) + +### 1.18.0 (April 30th 2016) ### + +* adding [`URI.joinPaths()`](http://medialize.github.io/URI.js/docs.html#static-joinPaths) to compose paths from directory tokens - [Issue #285](https://github.com/medialize/URI.js/issues/285) +* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to allow `.` in variable names - [PR #287](https://github.com/medialize/URI.js/pull/287) +* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject invalid literals - [PR #289](https://github.com/medialize/URI.js/pull/289) +* fixing [`URITemplate()`](http://medialize.github.io/URI.js/uri-template.html) to reject prefix modifier on composite values - [PR #290](https://github.com/medialize/URI.js/pull/290) +* fixing [`URI.buildUserinfo()`](http://medialize.github.io/URI.js/docs.html#static-buildUserinfo) to properly serialize password-only values - [PR #293](https://github.com/medialize/URI.js/pull/293) + +### 1.17.1 (February 25th 2016) ### + +* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly handle percent-encoded dot segments and leading dots in basename - [Issue #264](https://github.com/medialize/URI.js/issues/264), by [JordanMilne](https://github.com/JordanMilne) +* fixing [`.hasQuery()`](http://medialize.github.io/URI.js/docs.html#search-has) to accept `RegExp` for name argument - [Issue #274](https://github.com/medialize/URI.js/issues/274), [Issue #277](https://github.com/medialize/URI.js/issues/277) by [mbrodala](https://github.com/mbrodala) + +### 1.17.0 (November 13th 2015) ### + +* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to cast values to string before matching - [Issue #250](https://github.com/medialize/URI.js/pull/250), [Issue #252](https://github.com/medialize/URI.js/pull/252), by [ryanelian](https://github.com/ryanelian) and [Siltaar](https://github.com/Siltaar) +* fixing [`.segment()`](http://medialize.github.io/URI.js/docs.html#accessors-segment) to allow appending an empty element - [Issue #236](https://github.com/medialize/URI.js/issues/236), [Issue #253](https://github.com/medialize/URI.js/pull/253), by [orlando](https://github.com/orlando) +* adding [`.origin()`](http://medialize.github.io/URI.js/docs.html#accessors-origin) to get protocol and authority, counter-part to `.resource()` - [Issue #210](https://github.com/medialize/URI.js/issues/210), [Issue #263](https://github.com/medialize/URI.js/pull/263), by [justinmchase](https://github.com/justinmchase) + +### 1.16.1 (September 19th 2015) ### + +Package Management Cleanup - no changes to source code! + +* renaming package to "urijs", was "URIjs" (because npm decided to go lower-case at some point and maintaining capitals in your package name poses all sorts of stupid issues) +* removing [jam](http://jamjs.org/), [spm](http://spmjs.org/), `component.json` and `URI.jquery.json` as nobody cared that URI.js was stuck on 1.14 for a year + +### 1.16.0 (July 24th 2015) ### + +* **SECURITY** fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to rewrite `\` to `/` as Node and Browsers do - [Issue #233](https://github.com/medialize/URI.js/pull/233) +* fixing [`.host()`](http://medialize.github.io/URI.js/docs.html#accessors-host) and [`.authority()`](http://medialize.github.io/URI.js/docs.html#accessors-authority) to raise an error if they contain a path segment (extending [Issue #233](https://github.com/medialize/URI.js/pull/233)) + +### 1.15.2 (July 2nd 2015) ### + +* fixing [`URI.parseQuery()`](http://medialize.github.io/URI.js/docs.html#static-parseQuery) to accept `?foo&foo=bar` - [Issue #220](https://github.com/medialize/URI.js/issues/220) +* fixing [`.segmentCoded()`](http://medialize.github.io/URI.js/docs.html#accessors-segmentCoded) to encode (instead of decode) array input - [Issue #223](https://github.com/medialize/URI.js/issues/223) +* fixing [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly resolve `/foo/..` to `/` - [Issue #224](https://github.com/medialize/URI.js/issues/224) +* fixing [`.relativeTo()`](http://medialize.github.io/URI.js/docs.html#relativeto) to resolve `/foo/` and `/foo/bar` to `./` instead of empty string - [Issue #226](https://github.com/medialize/URI.js/issues/226) +* fixing `bower.json`'s `"main": "src/URI.js"` - [Issue #227](https://github.com/medialize/URI.js/issues/227) + +### 1.15.1 (April 5th 2015) ### + +* fixing `URI()` to match behavior of `new URI()` (caused by [#196](https://github.com/medialize/URI.js/issues/196)) - [Issue #205](https://github.com/medialize/URI.js/issues/205) +* fixing [`URI.removeQuery()`](http://medialize.github.io/URI.js/docs.html#search-remove) to accept RegExp for name and value arguments - ([Issue #204](https://github.com/medialize/URI.js/issues/204), [peterwillis](https://github.com/peterwillis)) + +### 1.15.0 (April 1st 2015 - no joke, promise!) ### + +* fixing `URI(undefined)` to throw TypeError - ([Issue #189](https://github.com/medialize/URI.js/issues/189), [Issue #196](https://github.com/medialize/URI.js/issues/196), [eakron](https://github.com/eakron)) - *tiny backward-compatibility-break* +* fixing [`.absoluteTo()`](http://medialize.github.io/URI.js/docs.html#absoluteto) - ([Issue #200](https://github.com/medialize/URI.js/issues/200), [giltayar](https://github.com/giltayar)) +* fixing [`.pathname()`](http://medialize.github.io/URI.js/docs.html#accessors-pathname) to properly en/decode URN paths - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster)) +* fixing URI normalization to properly handle URN paths based on [RFC 2141](https://www.ietf.org/rfc/rfc2141.txt) syntax - ([Issue #201](https://github.com/medialize/URI.js/pull/201), [mlefoster](https://github.com/mlefoster)) + * fixing [`.normalize()`](http://medialize.github.io/URI.js/docs.html#normalize) and [`.normalizePath()`](http://medialize.github.io/URI.js/docs.html#normalize-path) to properly normalize URN paths + * adding `URI.encodeUrnPathSegment()` + * adding `URI.decodeUrnPathSegment()` + * adding `URI.decodeUrnPath()` + * adding `URI.recodeUrnPath()` + +### 1.14.2 (February 25th 2015) ### + +* fixing inclusion of LICENSE in packages - ([Issue #174](https://github.com/medialize/URI.js/issues/174)) +* fixing [`URI.parseHost()`](http://medialize.github.io/URI.js/docs.html#static-parseHost) to not interpret colon in path as IPv6 hostname - ([Issue #190](https://github.com/medialize/URI.js/issues/190)) +* adding meta data for [SPM](http://www.spmjs.io/) package manager - ([Issue #176](https://github.com/medialize/URI.js/issues/176)) +* adding license meta to `bower.json` + +### 1.14.1 (October 1st 2014) ### + +* fixing handling of String instances (not string primitives) - ([Issue #146](https://github.com/medialize/URI.js/issues/146)) +* fixing Firefox [`.watch()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/watch) interfering with `.parseQuery()` - ([Issue #169](https://github.com/medialize/URI.js/issues/169)) +* fixing [`addQuery()`](http://medialize.github.io/URI.js/docs.html#search-add) to not throw error on null value - ([Issue #171](https://github.com/medialize/URI.js/issues/171)) + +### 1.14.0 (September 8th 2014) ### + +* adding Hungarian second level domains - ([Issue #159](https://github.com/medialize/URI.js/issues/159)) +* adding `