Skip to content

Commit

Permalink
Update dependency xmldom
Browse files Browse the repository at this point in the history
Switching from package `xmldom` to `@xmldom/xmldom`, which resolves the security issue present in latest xmldom version 0.6.0:
GHSA-5fg8-2547-mr8q

The reason is that the maintainers were forced to switch to a scoped package since 0.7.0:
 xmldom/xmldom#271

- I used node 12 to run `npm install`.
- I executed `npm run test` on my machine, but it failed because of some missing file:
```
[...]
> seriate@4.0.0 test:only /run/media/karfau/hdd-data/dev/seriate
> NODE_ENV=test mocha --exit -r spec/init -R spec 'spec/**/*.spec.js'

Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating

Error: Cannot find module './local-config.json'
Require stack:
- /run/media/karfau/hdd-data/dev/seriate/spec/integration/one-connection.spec.js
[...]
```
- I executed `npm run test:ci` onmy machine without failure

I'm one of the xmldom maintainers. Don't hesitate to ask me questions.
  • Loading branch information
karfau committed Dec 27, 2021
1 parent c808f0d commit ce982b1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
}
],
"dependencies": {
"@xmldom/xmldom": "^0.8.0",
"callsite": "^1.0.0",
"debug": "^4.3.1",
"lodash": "^4.17.21",
"machina": "^4.0.2",
"mssql": "~2.3.2",
"tedious": "~1.13.2",
"xmldom": "^0.6.0"
"tedious": "~1.13.2"
},
"devDependencies": {
"chai": "^4.3.4",
Expand Down
2 changes: 1 addition & 1 deletion src/asTable.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const _ = require( "lodash" );
const sql = require( "mssql" );
const xmldom = require( "xmldom" );
const xmldom = require( "@xmldom/xmldom" );
const domImplementation = new xmldom.DOMImplementation();
const xmlSerializer = new xmldom.XMLSerializer();
const buildTableVariableSql = require( "./build-table-variable-sql" );
Expand Down

0 comments on commit ce982b1

Please sign in to comment.