diff --git a/.nvmrc b/.nvmrc index 3f430af8..0828ab79 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18 +v18 \ No newline at end of file diff --git a/package.json b/package.json index fa5126d2..92ca3fa5 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,9 @@ "@babel/cli": "^7.12.10", "@babel/core": "^7.14.2", "@babel/preset-env": "^7.14.2", - "@rollup/plugin-commonjs": "^24.0.1", + "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.0.1", - "@size-limit/preset-small-lib": "^8.0.1", + "@size-limit/preset-small-lib": "^10.0.2", "babel-jest": "^29.0.1", "babel-loader": "^9.1.2", "cartesian": "^1.0.1", @@ -28,14 +28,14 @@ "jest": "^29.0.1", "jest-environment-jsdom": "^29.0.1", "jsdoc-to-markdown": "^8.0.0", - "lerna": "^6.0.1", + "lerna": "^7.4.2", "lerna-changelog": "^2.2.0", "markdown-toc": "^1.2.0", - "prettier": "^2.3.0", - "rollup": "^3.2.3", - "size-limit": "^8.0.1", - "sloc": "^0.2.1", - "typescript": "^4.1.3", + "prettier": "^3.0.3", + "rollup": "^4.3.0", + "size-limit": "^10.0.2", + "sloc": "^0.3.0", + "typescript": "^5.2.2", "webpack": "^5.37.0", "webpack-bundle-analyzer": "^4.8.0", "webpack-cli": "^5.0.1" diff --git a/packages/chord-symbol-ultimateguitar/lib/chord-symbol-ultimateguitar.js.map b/packages/chord-symbol-ultimateguitar/lib/chord-symbol-ultimateguitar.js.map index 554c4885..97e1c4cb 100644 --- a/packages/chord-symbol-ultimateguitar/lib/chord-symbol-ultimateguitar.js.map +++ b/packages/chord-symbol-ultimateguitar/lib/chord-symbol-ultimateguitar.js.map @@ -1 +1 @@ -{"version":3,"file":"chord-symbol-ultimateguitar.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;UCVA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;ACNA;AACA;AACA;AACA;AACA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAAyB,GAAS;EACvC,OAAO,UAACC,KAAK,EAAK;IACjBA,KAAK,CAACC,SAAS,CAACC,MAAM,GAAGF,KAAK,CAACC,SAAS,CAACC,MAAM,CAC7CC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;IAErB,OAAOH,KAAK;EACb,CAAC;AACF,CAAC;AAED,iEAAeD,yBAAyB,E","sources":["webpack://chord-symbol-ultimateguitar/webpack/universalModuleDefinition","webpack://chord-symbol-ultimateguitar/webpack/bootstrap","webpack://chord-symbol-ultimateguitar/webpack/runtime/define property getters","webpack://chord-symbol-ultimateguitar/webpack/runtime/hasOwnProperty shorthand","webpack://chord-symbol-ultimateguitar/webpack/runtime/make namespace object","webpack://chord-symbol-ultimateguitar/./src/chordSymbolUltimateGuitar.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chord-symbol-ultimateguitar\"] = factory();\n\telse\n\t\troot[\"chord-symbol-ultimateguitar\"] = factory();\n})(typeof self !== 'undefined' ? self : this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Create a renderer filter function that modifies the rendered chord to be closer to the style used by Ultimate Guitar.\n * @returns {import(\"../../chord-symbol\").CustomFilter} The filter function\n */\nconst chordSymbolUltimateGuitar = () => {\n\treturn (chord) => {\n\t\tchord.formatted.symbol = chord.formatted.symbol\n\t\t\t.replace(/[() ]/g, '')\n\t\t\t.replace('mM', 'mMaj')\n\t\t\t.replace('°', 'dim');\n\n\t\treturn chord;\n\t};\n};\n\nexport default chordSymbolUltimateGuitar;\n"],"names":["chordSymbolUltimateGuitar","chord","formatted","symbol","replace"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"chord-symbol-ultimateguitar.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;;UCVA;UACA;;;;;WCDA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;ACNA;AACA;AACA;AACA;AACA,IAAMA,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAA,EAAS;EACvC,OAAO,UAACC,KAAK,EAAK;IACjBA,KAAK,CAACC,SAAS,CAACC,MAAM,GAAGF,KAAK,CAACC,SAAS,CAACC,MAAM,CAC7CC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CACrBA,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CACrBA,OAAO,CAAC,GAAG,EAAE,KAAK,CAAC;IAErB,OAAOH,KAAK;EACb,CAAC;AACF,CAAC;AAED,iEAAeD,yBAAyB,E","sources":["webpack://chord-symbol-ultimateguitar/webpack/universalModuleDefinition","webpack://chord-symbol-ultimateguitar/webpack/bootstrap","webpack://chord-symbol-ultimateguitar/webpack/runtime/define property getters","webpack://chord-symbol-ultimateguitar/webpack/runtime/hasOwnProperty shorthand","webpack://chord-symbol-ultimateguitar/webpack/runtime/make namespace object","webpack://chord-symbol-ultimateguitar/./src/chordSymbolUltimateGuitar.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"chord-symbol-ultimateguitar\"] = factory();\n\telse\n\t\troot[\"chord-symbol-ultimateguitar\"] = factory();\n})(typeof self !== 'undefined' ? self : this, () => {\nreturn ","// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","/**\n * Create a renderer filter function that modifies the rendered chord to be closer to the style used by Ultimate Guitar.\n * @returns {import(\"../../chord-symbol\").CustomFilter} The filter function\n */\nconst chordSymbolUltimateGuitar = () => {\n\treturn (chord) => {\n\t\tchord.formatted.symbol = chord.formatted.symbol\n\t\t\t.replace(/[() ]/g, '')\n\t\t\t.replace('mM', 'mMaj')\n\t\t\t.replace('°', 'dim');\n\n\t\treturn chord;\n\t};\n};\n\nexport default chordSymbolUltimateGuitar;\n"],"names":["chordSymbolUltimateGuitar","chord","formatted","symbol","replace"],"sourceRoot":""} \ No newline at end of file diff --git a/packages/chord-symbol-ultimateguitar/yarn.lock b/packages/chord-symbol-ultimateguitar/yarn.lock index fcbb4a4c..672ef597 100644 --- a/packages/chord-symbol-ultimateguitar/yarn.lock +++ b/packages/chord-symbol-ultimateguitar/yarn.lock @@ -2,10 +2,10 @@ # yarn lockfile v1 -chord-symbol@^4.0.0-beta.1: - version "4.0.0-beta.1" - resolved "https://registry.yarnpkg.com/chord-symbol/-/chord-symbol-4.0.0-beta.1.tgz#5d844cbfb9b82a30837a5d8ff2d7d7274b81bcba" - integrity sha512-aXBhb9PwuMf6KDYYhaiX6JcCzM5ECU77NN3aKXFFzH/CqUrExzUJ8Wez7JC7hHhE4iGtkfmGjsdMsRxB6zYvRQ== +chord-symbol@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/chord-symbol/-/chord-symbol-4.0.0.tgz#916603db52b028384991898217be9c89c3bcafdb" + integrity sha512-GeECWgVsAAC85G1qpvZo9eLkhfN/9cfX1gD7IXiYFary+JvMIhef3w/Wrm9O6tmjdP5nNeIb3pKDYuA1z25SLg== dependencies: lodash "^4.17.21" diff --git a/packages/chord-symbol/API.md b/packages/chord-symbol/API.md index 3c3821df..04975944 100644 --- a/packages/chord-symbol/API.md +++ b/packages/chord-symbol/API.md @@ -72,7 +72,7 @@ after all built-in filters have been applied.

For maximum compatibility, your best bet is to always rely on the existing chord object structure.
  • To fail the parsing, throw an exception and it will use the Error API. If you want to be able to filter your exception in error handling, or to pass the chord object in its current state, use -custom error types
  • +custom error types

    Rendering filter