Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ export default {
testPathIgnorePatterns: ['/node_modules/', '/cli/'],
moduleNameMapper: {
'@/(.*)': '<rootDir>/src/$1',
// @stringsync/mdom only exposes an ESM "import" export condition, which jest's CJS resolver can't follow. Point the
// bare specifier at its dist entry and let babel transform it (see transformIgnorePatterns).
'^@stringsync/mdom$': '<rootDir>/node_modules/@stringsync/mdom/dist/index.js',
},
transformIgnorePatterns: ['/node_modules/(?!(@stringsync/mdom)/)'],
reporters: ['default', 'jest-image-snapshot/src/outdated-snapshot-reporter.js'],
};
34 changes: 34 additions & 0 deletions package-lock.json

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

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"license": "MIT",
"scripts": {},
"dependencies": {
"@stringsync/mdom": "^0.1.0",
"jszip": "3.10.1",
"vexflow": "5.0.0"
},
Expand Down
7 changes: 5 additions & 2 deletions src/parsing/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
export * from './mxl';
export * from './musicxml';
// Production parsing is powered by the mdom adapter (@stringsync/mdom). The class names are kept for API compatibility:
// `MusicXMLParser`/`MXLParser` still parse MusicXML/MXL, now by reading mdom instead of the @/musicxml DOM wrappers.
// The legacy readers remain importable from '@/parsing/musicxml' and '@/parsing/mxl' for the IR-equivalence test.
export { MdomParser as MusicXMLParser, type MdomParserOptions as MusicXMLParserOptions } from './mdom';
export { MdomMXLParser as MXLParser, type MdomMXLParserOptions as MXLParserOptions } from './mdom';
Loading
Loading