Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Node 12 support #13

Closed
mo4islona opened this issue Sep 7, 2019 · 4 comments
Closed

Node 12 support #13

mo4islona opened this issue Sep 7, 2019 · 4 comments

Comments

@mo4islona
Copy link

Seems libxmljs finally got Node12

libxmljs/libxmljs@5131a38

But where is no release yet. Maybe we can fetch code from master branch?

@mo4islona
Copy link
Author

dependencies": {
    "jsdom": "^8.5.0",
    "libxmljs": "https://github.com/libxmljs/libxmljs"
},

This builds correctly on Node12

info No lockfile found.
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Saved lockfile.
✨  Done in 65.93s.

But many tests are failed

✔ testParseSimpleXML
✔ testParseSimpleXMLDefaultNS
✖ testSimpleRoundtrip

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.testSimpleRoundtrip (/Users/mo4islona/Projects/node-xmlshim/test/domimplTest.js:31:29)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/domimplTest.js:7:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✔ should have access to node type constants through node instances

domparserTest
✔ should parse single element non-namespace xml
✔ should parse elements with default namespace
✔ should parse elements with namespace prefix
✔ child elements should inherit namespaces from parent
✔ child elements may override namespaces from parent
✔ should parse non-namespace attributes
✔ should parse attributes with namespace uri
✔ should parse text node
✔ should parse comments
✔ should parse text node before empty element into the enclosing element

xmlserializerTest
✖ should write single element non-namespace xml

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write single element non-namespace xml (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:21:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write elements with namespace prefix

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write elements with namespace prefix (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:36:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write non-namespace attributes

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write non-namespace attributes (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:50:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write attributes with namespace uri

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write attributes with namespace uri (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:67:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write text node

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write text node (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:82:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write comments

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write comments (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:112:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write document fragments

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write document fragments (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:126:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write single element node

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write single element node (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:138:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21

✖ should write single text node

TypeError: xml.TextWriter is not a constructor
    at exports.XMLSerializer.serializeToString (/Users/mo4islona/Projects/node-xmlshim/index.js:24:22)
    at Object.exports.should write single text node (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:150:17)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:232:20
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:168:13
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:131:25
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:165:17
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:463:34
    at Object.exports.setUp (/Users/mo4islona/Projects/node-xmlshim/test/xmlserializerTest.js:11:5)
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/lib/core.js:260:35
    at /Users/mo4islona/Projects/node-xmlshim/node_modules/nodeunit/deps/async.js:458:21


FAILURES: 10/58 assertions failed (909ms)

@znerol
Copy link
Owner

znerol commented Sep 11, 2019

Regrettably xmlshim still depends on a forked version of libxmljs. See PR libxmljs/libxmljs#493 for details.

@mo4islona
Copy link
Author

Any chance to update it to Node 12?

@znerol
Copy link
Owner

znerol commented Dec 28, 2019

Updated libxmljs fork and published xmlshim version 0.2.6. This is now compatible with node 12.

@znerol znerol closed this as completed Dec 28, 2019
rgtaylor added a commit to IntelliMedia/node-blockly that referenced this issue Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants