From 82f2b76e25a4a67e01ec67e5ebe39d14ad771ea8 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Thu, 20 Apr 2017 03:09:25 +0200 Subject: Reorganize module loading. We now use webpack instead of SystemJS, effectively bundling modules into one file (plus commons chunks) for every entry point. This results in a much smaller extension size (almost half). Furthermore we use yarn/npm even for extension run-time dependencies. This relieves us from manually vendoring and building dependencies. It's also easier to understand for new developers familiar with node. --- node_modules/sax/LICENSE-W3C.html | 188 -------------------------------------- node_modules/sax/lib/sax.js | 41 +++++---- node_modules/sax/package.json | 9 +- 3 files changed, 27 insertions(+), 211 deletions(-) delete mode 100644 node_modules/sax/LICENSE-W3C.html (limited to 'node_modules/sax') diff --git a/node_modules/sax/LICENSE-W3C.html b/node_modules/sax/LICENSE-W3C.html deleted file mode 100644 index a611e3f90..000000000 --- a/node_modules/sax/LICENSE-W3C.html +++ /dev/null @@ -1,188 +0,0 @@ - -W3C Software Notice and License
- - - -
-

- W3C - -

- -
- - - -
-
- -
- - -
-
- -
- - -
-
-
- -
-
-

W3C Software Notice and License

-
-
-

This work (and included software, documentation such as READMEs, or other -related items) is being provided by the copyright holders under the following -license.

-

License

- -

-By obtaining, using and/or copying this work, you (the licensee) -agree that you have read, understood, and will comply with the following -terms and conditions.

- -

Permission to copy, modify, and distribute this software and its -documentation, with or without modification, for any purpose and without -fee or royalty is hereby granted, provided that you include the following on -ALL copies of the software and documentation or portions thereof, including -modifications:

- -
  • The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work.
  • Any pre-existing intellectual property disclaimers, notices, or terms - and conditions. If none exist, the W3C Software Short - Notice should be included (hypertext is preferred, text is permitted) - within the body of any redistributed or derivative code.
  • Notice of any changes or modifications to the files, including the date - changes were made. (We recommend you provide URIs to the location from - which the code is derived.)
- -

Disclaimers

- -

THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT -LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR -PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE -ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.

- -

COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR -DOCUMENTATION.

- -

The name and trademarks of copyright holders may NOT be used in -advertising or publicity pertaining to the software without specific, written -prior permission. Title to copyright in this software and any associated -documentation will at all times remain with copyright holders.

- -

Notes

- -

This version: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231

- -

This formulation of W3C's notice and license became active on December 31 -2002. This version removes the copyright ownership notice such that this -license can be used with materials other than those owned by the W3C, -reflects that ERCIM is now a host of the W3C, includes references to this -specific dated version of the license, and removes the ambiguous grant of -"use". Otherwise, this version is the same as the previous -version and is written so as to preserve the Free -Software Foundation's assessment of GPL compatibility and OSI's certification -under the Open Source -Definition.

-
-
-
-
- - - -
- -
diff --git a/node_modules/sax/lib/sax.js b/node_modules/sax/lib/sax.js index f125c5fee..db0d4c316 100644 --- a/node_modules/sax/lib/sax.js +++ b/node_modules/sax/lib/sax.js @@ -267,8 +267,6 @@ // this really needs to be replaced with character classes. // XML allows all manner of ridiculous numbers and digits. - var number = '0124356789' - var letter = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' // (Letter | "_" | ":") var quote = '\'"' @@ -281,8 +279,6 @@ // turn all the string character sets into character class objects. whitespace = charClass(whitespace) - number = charClass(number) - letter = charClass(letter) // http://www.w3.org/TR/REC-xml/#NT-NameStartChar // This implementation works on strings, a single character at a time @@ -292,10 +288,10 @@ // is left as an exercise for the reader. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ - var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/ + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ - var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040\.\d-]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ quote = charClass(quote) attribEnd = charClass(attribEnd) @@ -307,12 +303,16 @@ }, {}) } - function isRegExp (c) { - return Object.prototype.toString.call(c) === '[object RegExp]' + function isMatch (regex, c) { + return regex.test(c) } function is (charclass, c) { - return isRegExp(charclass) ? !!c.match(charclass) : charclass[c] + return charclass[c] + } + + function notMatch (regex, c) { + return !isMatch(regex, c) } function not (charclass, c) { @@ -998,9 +998,11 @@ while (true) { c = charAt(chunk, i++) parser.c = c + if (!c) { break } + if (parser.trackPosition) { parser.position++ if (c === '\n') { @@ -1010,6 +1012,7 @@ parser.column++ } } + switch (parser.state) { case S.BEGIN: parser.state = S.BEGIN_WHITESPACE @@ -1080,7 +1083,7 @@ parser.sgmlDecl = '' } else if (is(whitespace, c)) { // wait for it... - } else if (is(nameStart, c)) { + } else if (isMatch(nameStart, c)) { parser.state = S.OPEN_TAG parser.tagName = c } else if (c === '/') { @@ -1283,7 +1286,7 @@ continue case S.OPEN_TAG: - if (is(nameBody, c)) { + if (isMatch(nameBody, c)) { parser.tagName += c } else { newTag(parser) @@ -1318,7 +1321,7 @@ openTag(parser) } else if (c === '/') { parser.state = S.OPEN_TAG_SLASH - } else if (is(nameStart, c)) { + } else if (isMatch(nameStart, c)) { parser.attribName = c parser.attribValue = '' parser.state = S.ATTRIB_NAME @@ -1337,7 +1340,7 @@ openTag(parser) } else if (is(whitespace, c)) { parser.state = S.ATTRIB_NAME_SAW_WHITE - } else if (is(nameBody, c)) { + } else if (isMatch(nameBody, c)) { parser.attribName += c } else { strictFail(parser, 'Invalid attribute name') @@ -1360,7 +1363,7 @@ parser.attribName = '' if (c === '>') { openTag(parser) - } else if (is(nameStart, c)) { + } else if (isMatch(nameStart, c)) { parser.attribName = c parser.state = S.ATTRIB_NAME } else { @@ -1404,7 +1407,7 @@ openTag(parser) } else if (c === '/') { parser.state = S.OPEN_TAG_SLASH - } else if (is(nameStart, c)) { + } else if (isMatch(nameStart, c)) { strictFail(parser, 'No whitespace between attributes') parser.attribName = c parser.attribValue = '' @@ -1435,7 +1438,7 @@ if (!parser.tagName) { if (is(whitespace, c)) { continue - } else if (not(nameStart, c)) { + } else if (notMatch(nameStart, c)) { if (parser.script) { parser.script += '') { closeTag(parser) - } else if (is(nameBody, c)) { + } else if (isMatch(nameBody, c)) { parser.tagName += c } else if (parser.script) { parser.script += ' (http://blog.izs.me/)", - "version": "1.2.1", + "version": "1.2.2", "main": "lib/sax.js", "license": "ISC", "scripts": { - "test": "tap test/*.js --cov", + "test": "tap test/*.js --cov -j4", "posttest": "standard -F test/*.js lib/*.js" }, "repository": "git://github.com/isaacs/sax-js.git", "files": [ "lib/sax.js", "LICENSE", - "LICENSE-W3C.html", "README.md" ], "devDependencies": { - "standard": "^5.3.1", - "tap": "^5.2.0" + "standard": "^8.6.0", + "tap": "^10.0.2" } } -- cgit v1.2.3