Comparing version 0.3.0 to 0.4.0
171
CHANGELOG.md
@@ -0,45 +1,134 @@ | ||
## 0.4.0 | ||
[Commits](https://github.com/xmldom/xmldom/compare/0.3.0...0.4.0) | ||
### Fixes | ||
- **BREAKING** Restore ` ` behavior from v0.1.27 [`#67`](https://github.com/xmldom/xmldom/pull/67) | ||
- **BREAKING** Typecheck source param before parsing [`#113`](https://github.com/xmldom/xmldom/pull/113) | ||
- Include documents in package files list [`#156`](https://github.com/xmldom/xmldom/pull/156) | ||
- Preserve doctype with sysid [`#144`](https://github.com/xmldom/xmldom/pull/144) | ||
- Remove ES6 syntax from getElementsByClassName [`#91`](https://github.com/xmldom/xmldom/pull/91) | ||
- Revert "Add lowercase of åäö in entityMap" due to duplicate entries [`#84`](https://github.com/xmldom/xmldom/pull/84) | ||
- fix: Convert all line separators to LF [`#66`](https://github.com/xmldom/xmldom/pull/66) | ||
### Docs | ||
- Update CHANGELOG.md through version 0.3.0 [`#63`](https://github.com/xmldom/xmldom/pull/63) | ||
- Update badges [`#78`](https://github.com/xmldom/xmldom/pull/78) | ||
- Add .editorconfig file [`#104`](https://github.com/xmldom/xmldom/pull/104) | ||
- Add note about import [`#79`](https://github.com/xmldom/xmldom/pull/79) | ||
- Modernize & improve the example in readme.md [`#81`](https://github.com/xmldom/xmldom/pull/81) | ||
### CI | ||
- Add Stryker Mutator [`#70`](https://github.com/xmldom/xmldom/pull/70) | ||
- Add Stryker action to update dashboard [`#77`](https://github.com/xmldom/xmldom/pull/77) | ||
- Add Node GitHub action workflow [`#64`](https://github.com/xmldom/xmldom/pull/64) | ||
- add & enable eslint [`#106`](https://github.com/xmldom/xmldom/pull/106) | ||
- Use eslint-plugin-es5 to enforce ES5 syntax [`#107`](https://github.com/xmldom/xmldom/pull/107) | ||
- Recover `vows` tests, drop `proof` tests [`#59`](https://github.com/xmldom/xmldom/pull/59) | ||
- Add jest tessuite and first tests [`#114`](https://github.com/xmldom/xmldom/pull/114) | ||
- Add jest testsuite with `xmltest` cases [`#112`](https://github.com/xmldom/xmldom/pull/112) | ||
- Configure Renovate [`#108`](https://github.com/xmldom/xmldom/pull/108) | ||
- Test European HTML entities [`#86`](https://github.com/xmldom/xmldom/pull/86) | ||
- Updated devDependencies | ||
### Other | ||
- Remove files that are not of any use [`#131`](https://github.com/xmldom/xmldom/pull/131), [`#65`](https://github.com/xmldom/xmldom/pull/65), [`#33`](https://github.com/xmldom/xmldom/pull/33) | ||
## 0.3.0 | ||
- Node >=10.x now required. | ||
- Added getElementsByClassName method. | ||
- Added Node to the list of exports | ||
- Added lowercase of åäö in entityMap. | ||
- Moved existing sources into `lib` subdirectory. | ||
- Removed `.npmignore` in favor of `files` entry in package.json. | ||
- More `package.json` refactoring. | ||
- Replaced CHANGELOG with more rigorous file. | ||
- Replaced LICENSE with more rigorous file. | ||
- Removed component.json (deprecated package manager https://github.com/componentjs/guide) | ||
- `proof` devDep updated to latest. | ||
- Fixed CI. | ||
- README updates. | ||
[Commits](https://github.com/xmldom/xmldom/compare/0.2.1...0.3.0) | ||
- **BREAKING** Node >=10.x is now required. | ||
- **BREAKING** Remove `component.json` (deprecated package manager https://github.com/componentjs/guide) | ||
- **BREAKING** Move existing sources into `lib` subdirectory. | ||
- **POSSIBLY BREAKING** Introduce `files` entry in `package.json` and remove use of `.npmignore`. | ||
- [Add `Document.getElementsByClassName`](https://github.com/xmldom/xmldom/issues/24). | ||
- [Add `Node` to the list of exports](https://github.com/xmldom/xmldom/pull/27) | ||
- [Add lowercase of åäö in `entityMap`](https://github.com/xmldom/xmldom/pull/23). | ||
- Move CHANGELOG to markdown file. | ||
- Move LICENSE to markdown file. | ||
## 0.2.1 | ||
- More package.json refactoring. | ||
[Commits](https://github.com/xmldom/xmldom/compare/0.2.0...0.2.1) | ||
- Correct `homepage`, `repository` and `bugs` URLs in `package.json`. | ||
## 0.2.0 | ||
- Now publishing under xmldom npm package again; retiring xmldom-alpha. | ||
- Remove coveralls. | ||
- Disable cache in travis. | ||
- Other refactoring. | ||
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...0.2.0) | ||
## 0.1.28 (via xmldom-alpha npm package) | ||
- Includes all **BREAKING** changes introduced in [`xmldom-alpha@v0.1.28`](#0128) by the original authors. | ||
- **POSSIBLY BREAKING** [remove the `Object.create` check from the `_extends` method of `dom.js` that added a `__proto__` property](https://github.com/xmldom/xmldom/commit/0be2ae910a8a22c9ec2cac042e04de4c04317d2a#diff-7d1c5d97786fdf9af5446a241d0b6d56L19-L22) (). | ||
- **POSSIBLY BREAKING** [remove code that added a `__proto__` property](https://github.com/xmldom/xmldom/commit/366159a76a181ce9a0d83f5dc48205686cfaf9cc) | ||
- formatting/corrections in `package.json` | ||
- Removed __proto__ accessor. | ||
- Appended HTML entities defaults. | ||
## 0.1.31 | ||
## 0.1.27 (via xmldom-alpha npm package) | ||
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...v0.1.31) | ||
The patch versions (`v0.1.29` - `v0.1.31`) that have been released on the [v0.1.x branch](https://github.com/xmldom/xmldom/tree/0.1.x), to reflect the changed maintainers, **are branched off from [`v0.1.27`](#0127) so they don't include the breaking changes introduced in [`xmldom-alpha@v0.1.28`](#0128)**: | ||
## Maintainer changes | ||
After the last commit to the original repository <https://github.com/jindw/xmldom> on the 9th of May 2017, the first commit to <https://github.com/xmldom/xmldom> is from the 19th of December 2019. [The fork has been announced in the original repository on the 2nd of March 2020.](https://github.com/jindw/xmldom/issues/259) | ||
The versions listed below have been published to one or both of the following packages: | ||
- <https://www.npmjs.com/package/xmldom-alpha> | ||
- <https://www.npmjs.com/package/xmldom> | ||
It is currently not planned to continue publishing the `xmldom-alpha` package. | ||
The new maintainers did not invest time to understand changes that led to the last `xmldom` version [`0.1.27`](#0127) published by the original maintainer, but consider it the basis for their work. | ||
A timeline of all the changes that happened from that version until `0.3.0` is available in <https://github.com/xmldom/xmldom/issues/62>. Any related questions should be asked there. | ||
## 0.1.28 | ||
[Commits](https://github.com/xmldom/xmldom/compare/v0.1.27...xmldom-alpha@v0.1.28) | ||
Published by @jindw on the 9th of May 2017 as | ||
- `xmldom-alpha@0.1.28` | ||
- **BREAKING** includes [regression regarding ` ` (issue #57)](https://github.com/xmldom/xmldom/issues/57) | ||
- [Fix `license` field in `package.json`](https://github.com/jindw/xmldom/pull/178) | ||
- [Conditional converting of HTML entities](https://github.com/jindw/xmldom/pull/80) | ||
- Fix `dom.js` serialization issue for missing document element ([example that failed on `toString()` before this change](https://github.com/xmldom/xmldom/blob/a58dcf7a265522e80ce520fe3be0cddb1b976f6f/test/parse/unclosedcomment.js#L10-L11)) | ||
- Add new module `entities.js` | ||
## 0.1.27 | ||
Published by @jindw on the 28th of Nov 2016 as | ||
- `xmldom@0.1.27` | ||
- `xmldom-alpha@0.1.27` | ||
- Various bug fixes. | ||
- Don't ask why 0.1.26 and 0.1.25 were skipped. `¯\_(ツ)_/¯` | ||
## 0.1.24 (via xmldom-alpha package) | ||
## 0.1.26 | ||
Published on the 18th of Nov 2016 | ||
as `xmldom@0.1.26` | ||
- Details unknown | ||
## 0.1.25 | ||
Published on the 18th of Nov 2016 as | ||
- `xmldom@0.1.25` | ||
- Details unknown | ||
## 0.1.24 | ||
Published on the 27th of November 2016 as | ||
- `xmldom@0.1.24` | ||
- `xmldom-alpha@0.1.24` | ||
- Added node filter. | ||
## 0.1.23 (via xmldom-alpha npm package) | ||
## 0.1.23 | ||
- Added namespace support for nest node serialize. | ||
Published on the 5th of May 2016 as | ||
- `xmldom-alpha@0.1.23` | ||
- Add namespace support for nest node serialize. | ||
- Various other bug fixes. | ||
@@ -50,3 +139,3 @@ | ||
- Merge XMLNS serialization. | ||
- Removed \r from source string. | ||
- Remove \r from source string. | ||
- Print namespaces for child elements. | ||
@@ -58,18 +147,18 @@ - Switch references to nodeType to use named constants. | ||
- Fixed serialize bug. | ||
- Fix serialize bug. | ||
## 0.1.20 | ||
- Optimized invalid XML support. | ||
- Added toString sorter for attributes output. | ||
- Added html self closed node button. | ||
- Added `*` NS support for getElementsByTagNameNS. | ||
- Converted attribute's value to string in setAttributeNS. | ||
- Added support for HTML entities for HTML docs only. | ||
- Fixed TypeError when Document is created with DocumentType. | ||
- Optimize invalid XML support. | ||
- Add toString sorter for attributes output. | ||
- Add html self closed node button. | ||
- Add `*` NS support for getElementsByTagNameNS. | ||
- Convert attribute's value to string in setAttributeNS. | ||
- Add support for HTML entities for HTML docs only. | ||
- Fix TypeError when Document is created with DocumentType. | ||
## 0.1.19 | ||
- Fixed issue #68, infinite loop on unclosed comment. | ||
- Added error report for unclosed tag. | ||
- Fix [infinite loop on unclosed comment (jindw/xmldom#68)](https://github.com/jindw/xmldom/issues/68) | ||
- Add error report for unclosed tag. | ||
- Various other fixes. | ||
@@ -79,6 +168,10 @@ | ||
- Added default `ns` support. | ||
- Add default `ns` support. | ||
- parseFromString now renders entirely plain text documents as textNode. | ||
- Enabled option to ignore white space on parsing. | ||
- Enable option to ignore white space on parsing. | ||
## 0.1.17 | ||
**Details missing for this and potential earlier version** | ||
## 0.1.16 | ||
@@ -85,0 +178,0 @@ |
@@ -24,3 +24,3 @@ function DOMParser(options){ | ||
defaultNSMap.xml = defaultNSMap.xml || 'http://www.w3.org/XML/1998/namespace'; | ||
if(source){ | ||
if(source && typeof source === 'string'){ | ||
sax.parse(source,defaultNSMap,entityMap); | ||
@@ -27,0 +27,0 @@ }else{ |
@@ -612,6 +612,6 @@ /* | ||
getElementsByClassName: function(className) { | ||
const pattern = new RegExp(`(^|\\s)${className}(\\s|$)`); | ||
return new LiveNodeList(this, base => { | ||
var pattern = new RegExp("(^|\\s)" + className + "(\\s|$)"); | ||
return new LiveNodeList(this, function(base) { | ||
var ls = []; | ||
_visitNode(base.documentElement, node => { | ||
_visitNode(base.documentElement, function(node) { | ||
if(node !== base && node.nodeType == ELEMENT_NODE) { | ||
@@ -618,0 +618,0 @@ if(pattern.test(node.getAttribute('class'))) { |
@@ -12,5 +12,3 @@ exports.entityMap = { | ||
Auml: "Ä", | ||
auml: "ä", | ||
Aring: "Å", | ||
aring: "å", | ||
AElig: "Æ", | ||
@@ -33,3 +31,2 @@ Ccedil: "Ç", | ||
Ouml: "Ö", | ||
ouml: "ö", | ||
Oslash: "Ø", | ||
@@ -74,3 +71,3 @@ Ugrave: "Ù", | ||
yuml: "ÿ", | ||
nbsp: " ", | ||
nbsp: "\u00a0", | ||
iexcl: "¡", | ||
@@ -250,2 +247,1 @@ cent: "¢", | ||
}; | ||
//for(var n in exports.entityMap){console.log(exports.entityMap[n].charCodeAt())} |
@@ -534,4 +534,12 @@ //[4] NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] | ||
var name = matchs[1][0]; | ||
var pubid = len>3 && /^public$/i.test(matchs[2][0]) && matchs[3][0] | ||
var sysid = len>4 && matchs[4][0]; | ||
var pubid = false; | ||
var sysid = false; | ||
if(len>3){ | ||
if(/^public$/i.test(matchs[2][0])){ | ||
pubid = matchs[3][0]; | ||
sysid = len>4 && matchs[4][0]; | ||
}else if(/^system$/i.test(matchs[2][0])){ | ||
sysid = matchs[3][0]; | ||
} | ||
} | ||
var lastMatch = matchs[len-1] | ||
@@ -538,0 +546,0 @@ domBuilder.startDTD(name,pubid && pubid.replace(/^(['"])(.*?)\1$/,'$2'), |
{ | ||
"name": "xmldom", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "A pure JavaScript W3C standard-based (XML DOM Level 2 Core) DOMParser and XMLSerializer module.", | ||
@@ -22,6 +22,15 @@ "keywords": [ | ||
"files": [ | ||
"CHANGELOG.md", | ||
"LICENSE.md", | ||
"readme.md", | ||
"lib" | ||
], | ||
"scripts": { | ||
"test": "proof platform win32 && proof test */*/*.t.js || t/test" | ||
"lint": "npm-run-all lint:eslint", | ||
"lint:eslint": "eslint lib test", | ||
"start": "nodemon --watch package.json --watch lib --watch test --exec 'npm --silent run test'", | ||
"stryker": "stryker run", | ||
"test": "npm-run-all test:unit lint", | ||
"test:unit": "npm-run-all test:jest", | ||
"test:jest": "jest" | ||
}, | ||
@@ -33,3 +42,16 @@ "engines": { | ||
"devDependencies": { | ||
"proof": "~7.0.9" | ||
"@stryker-mutator/core": "^3.3.1", | ||
"@stryker-mutator/javascript-mutator": "^3.3.1", | ||
"dom-js": "0.0.9", | ||
"eslint": "^7.12.0", | ||
"eslint-config-prettier": "^6.14.0", | ||
"eslint-plugin-es5": "^1.5.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"get-stream": "^6.0.0", | ||
"jest": "^26.6.1", | ||
"nodemon": "^2.0.6", | ||
"npm-run-all": "^4.1.5", | ||
"prettier": "^2.1.2", | ||
"xmltest": "^1.4.0", | ||
"yauzl": "^2.10.0" | ||
}, | ||
@@ -36,0 +58,0 @@ "maintainers": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
83754
9
2277
238
0
14