Skip to content

Commit

Permalink
Merge pull request #286 from complexdatacollective/graphml-export-fix
Browse files Browse the repository at this point in the history
fix graphml export
  • Loading branch information
jthrilly authored Feb 5, 2025
2 parents 32bd5a8 + 5ce4a2d commit b671980
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-env jest */

import { ncUUIDProperty } from '@codaco/shared-consts';
import { DOMParser, MIME_TYPE } from '@xmldom/xmldom';
import { DOMParser } from '@xmldom/xmldom';
import { beforeEach, describe, expect, it } from 'vitest';
import {
mockCodebook,
Expand All @@ -23,7 +23,7 @@ const buildXML = (...args) => {
}

const parser = new DOMParser();
const result = parser.parseFromString(xmlString, MIME_TYPE.XML_APPLICATION);
const result = parser.parseFromString(xmlString, 'text/xml');
return result;
};

Expand Down
4 changes: 2 additions & 2 deletions lib/network-exporters/formatters/graphml/createGraphML.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
sessionProperty,
sessionStartTimeProperty,
} from '@codaco/shared-consts';
import dom, { MIME_TYPE } from '@xmldom/xmldom';
import dom from '@xmldom/xmldom';
import {
getAttributePropertyFromCodebook,
getEntityAttributes,
Expand Down Expand Up @@ -110,7 +110,7 @@ const setUpXml = (exportOptions, sessionVariables) => {
)}${xmlFooter}`;
return new globalContext.DOMParser().parseFromString(
graphMLOutline,
MIME_TYPE.XML_APPLICATION,
'text/xml',
);
};

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fresco",
"version": "2.2.0",
"version": "2.1.1",
"private": true,
"type": "module",
"packageManager": "[email protected]+sha256.9551e803dcb7a1839fdf5416153a844060c7bce013218ce823410532504ac10b",
Expand Down Expand Up @@ -47,7 +47,7 @@
"@reduxjs/toolkit": "^1.9.7",
"@tanstack/react-table": "^8.20.6",
"@uploadthing/react": "^7.1.5",
"@xmldom/xmldom": "^0.9.6",
"@xmldom/xmldom": "^0.8.10",
"animejs": "^2.2.0",
"archiver": "^7.0.1",
"async": "^3.2.6",
Expand Down
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

0 comments on commit b671980

Please sign in to comment.