-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'svg:main' into apply-transform-shape
- Loading branch information
Showing
148 changed files
with
3,558 additions
and
4,065 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: 'CodeQL' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * 0' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
|
||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v3 | ||
with: | ||
languages: 'javascript' | ||
queries: +security-and-quality | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v3 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v3 | ||
with: | ||
category: '/language:javascript' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.yarn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
diff --git a/lib/sax.js b/lib/sax.js | ||
index 122ad8e5a478339d56fc86d00d21c5d142739f0e..2557c46482ff651026436cc6c7142ebfe68ddfc5 100644 | ||
--- a/lib/sax.js | ||
+++ b/lib/sax.js | ||
@@ -1,8 +1,6 @@ | ||
;(function (sax) { // wrapper for non-node envs | ||
sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } | ||
sax.SAXParser = SAXParser | ||
- sax.SAXStream = SAXStream | ||
- sax.createStream = createStream | ||
|
||
// When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. | ||
// When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), | ||
@@ -164,111 +162,6 @@ | ||
flush: function () { flushBuffers(this) } | ||
} | ||
|
||
- var Stream | ||
- try { | ||
- Stream = require('stream').Stream | ||
- } catch (ex) { | ||
- Stream = function () {} | ||
- } | ||
- if (!Stream) Stream = function () {} | ||
- | ||
- var streamWraps = sax.EVENTS.filter(function (ev) { | ||
- return ev !== 'error' && ev !== 'end' | ||
- }) | ||
- | ||
- function createStream (strict, opt) { | ||
- return new SAXStream(strict, opt) | ||
- } | ||
- | ||
- function SAXStream (strict, opt) { | ||
- if (!(this instanceof SAXStream)) { | ||
- return new SAXStream(strict, opt) | ||
- } | ||
- | ||
- Stream.apply(this) | ||
- | ||
- this._parser = new SAXParser(strict, opt) | ||
- this.writable = true | ||
- this.readable = true | ||
- | ||
- var me = this | ||
- | ||
- this._parser.onend = function () { | ||
- me.emit('end') | ||
- } | ||
- | ||
- this._parser.onerror = function (er) { | ||
- me.emit('error', er) | ||
- | ||
- // if didn't throw, then means error was handled. | ||
- // go ahead and clear error, so we can write again. | ||
- me._parser.error = null | ||
- } | ||
- | ||
- this._decoder = null | ||
- | ||
- streamWraps.forEach(function (ev) { | ||
- Object.defineProperty(me, 'on' + ev, { | ||
- get: function () { | ||
- return me._parser['on' + ev] | ||
- }, | ||
- set: function (h) { | ||
- if (!h) { | ||
- me.removeAllListeners(ev) | ||
- me._parser['on' + ev] = h | ||
- return h | ||
- } | ||
- me.on(ev, h) | ||
- }, | ||
- enumerable: true, | ||
- configurable: false | ||
- }) | ||
- }) | ||
- } | ||
- | ||
- SAXStream.prototype = Object.create(Stream.prototype, { | ||
- constructor: { | ||
- value: SAXStream | ||
- } | ||
- }) | ||
- | ||
- SAXStream.prototype.write = function (data) { | ||
- if (typeof Buffer === 'function' && | ||
- typeof Buffer.isBuffer === 'function' && | ||
- Buffer.isBuffer(data)) { | ||
- if (!this._decoder) { | ||
- var SD = require('string_decoder').StringDecoder | ||
- this._decoder = new SD('utf8') | ||
- } | ||
- data = this._decoder.write(data) | ||
- } | ||
- | ||
- this._parser.write(data.toString()) | ||
- this.emit('data', data) | ||
- return true | ||
- } | ||
- | ||
- SAXStream.prototype.end = function (chunk) { | ||
- if (chunk && chunk.length) { | ||
- this.write(chunk) | ||
- } | ||
- this._parser.end() | ||
- return true | ||
- } | ||
- | ||
- SAXStream.prototype.on = function (ev, handler) { | ||
- var me = this | ||
- if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { | ||
- me._parser['on' + ev] = function () { | ||
- var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) | ||
- args.splice(0, 0, ev) | ||
- me.emit.apply(me, args) | ||
- } | ||
- } | ||
- | ||
- return Stream.prototype.on.call(me, ev, handler) | ||
- } | ||
- | ||
// this really needs to be replaced with character classes. | ||
// XML allows all manner of ridiculous numbers and digits. | ||
var CDATA = '[CDATA[' |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.