-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: don't serialize the fileName as undefined: when not present
BREAKING CHANGE: when ``fileName`` is undefined in the parser options saxes does not show a file name in error messages. Previously it was showing the name ``undefined``. To get the previous behavior, in all cases where you'd leave ``fileName`` undefined, you must set it to the string ``"undefined"`` instead.
- Loading branch information
1 parent
5266d0d
commit 4ff2365
Showing
19 changed files
with
95 additions
and
36 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
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
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
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,52 @@ | ||
"use strict"; | ||
|
||
require(".").test({ | ||
name: "without fileName", | ||
xml: "<doc>", | ||
expect: [ | ||
["opentagstart", { name: "doc", attributes: {} }], | ||
["opentag", { name: "doc", isSelfClosing: false, attributes: {} }], | ||
["error", "1:5: unclosed tag: doc"], | ||
], | ||
opt: {}, | ||
}); | ||
|
||
require(".").test({ | ||
name: "without fileName, when not tracking position position", | ||
xml: "<doc>", | ||
expect: [ | ||
["opentagstart", { name: "doc", attributes: {} }], | ||
["opentag", { name: "doc", isSelfClosing: false, attributes: {} }], | ||
["error", "unclosed tag: doc"], | ||
], | ||
opt: { | ||
position: false, | ||
}, | ||
}); | ||
|
||
require(".").test({ | ||
name: "with fileName", | ||
xml: "<doc>", | ||
expect: [ | ||
["opentagstart", { name: "doc", attributes: {} }], | ||
["opentag", { name: "doc", isSelfClosing: false, attributes: {} }], | ||
["error", "foobar.xml:1:5: unclosed tag: doc"], | ||
], | ||
opt: { | ||
fileName: "foobar.xml", | ||
}, | ||
}); | ||
|
||
require(".").test({ | ||
name: "with fileName, when not tracking position position", | ||
xml: "<doc>", | ||
expect: [ | ||
["opentagstart", { name: "doc", attributes: {} }], | ||
["opentag", { name: "doc", isSelfClosing: false, attributes: {} }], | ||
["error", "foobar.xml: unclosed tag: doc"], | ||
], | ||
opt: { | ||
fileName: "foobar.xml", | ||
position: false, | ||
}, | ||
}); |
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
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
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
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