From 174f788430cf80364e84ad0d3d0dc92e4fe7f3fa Mon Sep 17 00:00:00 2001 From: Eric Chen Date: Sun, 3 Dec 2023 20:07:43 +0800 Subject: [PATCH] fix(mdx): className bug --- lib/ast.mjs | 7 +- lib/transform.mjs | 6 +- package.json | 4 +- pnpm-lock.yaml | 191 ++++++++++++++++----------------- test/snapshots/output.mjs.md | 12 +-- test/snapshots/output.mjs.snap | Bin 3492 -> 3518 bytes 6 files changed, 108 insertions(+), 112 deletions(-) diff --git a/lib/ast.mjs b/lib/ast.mjs index 5e43f5c..90ddda6 100644 --- a/lib/ast.mjs +++ b/lib/ast.mjs @@ -1,6 +1,11 @@ function attrString(attributes = []) { return attributes.length > 0 - ? attributes.map(({ name, value }) => ` ${name}="${value}"`).join('') + ? attributes + .map( + ({ name, value }) => + ` ${name === 'className' ? 'class' : name}="${value}"`, + ) + .join('') : ''; } diff --git a/lib/transform.mjs b/lib/transform.mjs index 9671a93..8e083de 100644 --- a/lib/transform.mjs +++ b/lib/transform.mjs @@ -41,7 +41,7 @@ const modes = { }, { type: 'mdxJsxAttribute', - name: 'class', + name: 'className', value: 'kroki-object', }, { @@ -72,7 +72,7 @@ const modes = { attributes: [ { type: 'mdxJsxAttribute', - name: 'class', + name: 'className', value: 'kroki-image', }, { @@ -102,7 +102,7 @@ const modes = { attributes: [ { type: 'mdxJsxAttribute', - name: 'class', + name: 'className', value: 'kroki-inline-svg', }, { diff --git a/package.json b/package.json index 53502b7..d2997dc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "remark-kroki", - "version": "0.3.0", + "version": "0.3.1", "description": "Remark plugin for showing Kroki diagram", "license": "MIT", "author": { @@ -61,7 +61,7 @@ "@nice-move/eslint-config-base": "^0.9.24", "@nice-move/prettier-config": "^0.9.8", "ava": "^5.3.1", - "eslint": "^8.54.0", + "eslint": "^8.55.0", "eslint-plugin-ava": "^14.0.0", "garou": "^0.6.19", "prettier": "^3.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f824d43..9727926 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -30,7 +30,7 @@ devDependencies: version: 0.11.1 '@nice-move/eslint-config-base': specifier: ^0.9.24 - version: 0.9.24(eslint@8.54.0)(typescript@5.2.2) + version: 0.9.24(eslint@8.55.0)(typescript@5.2.2) '@nice-move/prettier-config': specifier: ^0.9.8 version: 0.9.8(prettier@3.1.0) @@ -38,14 +38,14 @@ devDependencies: specifier: ^5.3.1 version: 5.3.1 eslint: - specifier: ^8.54.0 - version: 8.54.0 + specifier: ^8.55.0 + version: 8.55.0 eslint-plugin-ava: specifier: ^14.0.0 - version: 14.0.0(eslint@8.54.0) + version: 14.0.0(eslint@8.55.0) garou: specifier: ^0.6.19 - version: 0.6.19(eslint@8.54.0)(typescript@5.2.2) + version: 0.6.19(eslint@8.55.0)(typescript@5.2.2) prettier: specifier: ^3.1.0 version: 3.1.0 @@ -118,7 +118,7 @@ packages: - supports-color dev: true - /@babel/eslint-parser@7.23.3(@babel/core@7.23.3)(eslint@8.54.0): + /@babel/eslint-parser@7.23.3(@babel/core@7.23.3)(eslint@8.55.0): resolution: {integrity: sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==} engines: {node: ^10.13.0 || ^12.13.0 || >=14.0.0} peerDependencies: @@ -127,7 +127,7 @@ packages: dependencies: '@babel/core': 7.23.3 '@nicolo-ribaudo/eslint-scope-5-internals': 5.1.1-v1 - eslint: 8.54.0 + eslint: 8.55.0 eslint-visitor-keys: 2.1.0 semver: 6.3.1 dev: true @@ -319,13 +319,13 @@ packages: yargs: 17.7.2 dev: true - /@eslint-community/eslint-utils@4.4.0(eslint@8.54.0): + /@eslint-community/eslint-utils@4.4.0(eslint@8.55.0): resolution: {integrity: sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.55.0 eslint-visitor-keys: 3.4.3 dev: true @@ -334,8 +334,8 @@ packages: engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} dev: true - /@eslint/eslintrc@2.1.3: - resolution: {integrity: sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==} + /@eslint/eslintrc@2.1.4: + resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 @@ -351,8 +351,8 @@ packages: - supports-color dev: true - /@eslint/js@8.54.0: - resolution: {integrity: sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==} + /@eslint/js@8.55.0: + resolution: {integrity: sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true @@ -415,28 +415,28 @@ packages: stylelint-formatter-pretty: 3.2.1 dev: true - /@nice-move/eslint-config-base@0.9.24(eslint@8.54.0)(typescript@5.2.2): + /@nice-move/eslint-config-base@0.9.24(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-oRdMZSXQ1SpGvFX+7c6O4OFfiZFNEmKzqdxS4PXyKnPK0dW+K963uLm2WZNM+ho/BWRgUDz1FbvlEI0wYmDP3g==} engines: {node: ^16.17.0 || ^18.12.0 || ^20.0.0} peerDependencies: eslint: ^8.53.0 dependencies: '@babel/core': 7.23.3 - '@babel/eslint-parser': 7.23.3(@babel/core@7.23.3)(eslint@8.54.0) + '@babel/eslint-parser': 7.23.3(@babel/core@7.23.3)(eslint@8.55.0) '@babel/plugin-syntax-import-attributes': 7.23.3(@babel/core@7.23.3) - '@nice-move/eslint-plugin-html': 0.0.0-beta.3(eslint@8.54.0) - '@typescript-eslint/eslint-plugin': 6.12.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/parser': 6.12.0(eslint@8.54.0)(typescript@5.2.2) - eslint: 8.54.0 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.0)(eslint@8.54.0) - eslint-config-prettier: 9.0.0(eslint@8.54.0) - eslint-plugin-eslint-comments: 3.2.0(eslint@8.54.0) - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0) - eslint-plugin-markdown: 3.0.1(eslint@8.54.0) - eslint-plugin-n: 16.3.1(eslint@8.54.0) - eslint-plugin-promise: 6.1.1(eslint@8.54.0) - eslint-plugin-sonarjs: 0.23.0(eslint@8.54.0) - eslint-plugin-unicorn: 49.0.0(eslint@8.54.0) + '@nice-move/eslint-plugin-html': 0.0.0-beta.3(eslint@8.55.0) + '@typescript-eslint/eslint-plugin': 6.12.0(@typescript-eslint/parser@6.12.0)(eslint@8.55.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.12.0(eslint@8.55.0)(typescript@5.2.2) + eslint: 8.55.0 + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.0)(eslint@8.55.0) + eslint-config-prettier: 9.0.0(eslint@8.55.0) + eslint-plugin-eslint-comments: 3.2.0(eslint@8.55.0) + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.55.0) + eslint-plugin-markdown: 3.0.1(eslint@8.55.0) + eslint-plugin-n: 16.3.1(eslint@8.55.0) + eslint-plugin-promise: 6.1.1(eslint@8.55.0) + eslint-plugin-sonarjs: 0.23.0(eslint@8.55.0) + eslint-plugin-unicorn: 49.0.0(eslint@8.55.0) espree: 9.6.1 resolve.exports: 2.0.2 settingz: 0.2.0 @@ -447,13 +447,13 @@ packages: - typescript dev: true - /@nice-move/eslint-plugin-html@0.0.0-beta.3(eslint@8.54.0): + /@nice-move/eslint-plugin-html@0.0.0-beta.3(eslint@8.55.0): resolution: {integrity: sha512-WzTKmdSWM6FsnM0LwsY9ucRw4hczQaN2z/6cVfCXAlrcXl53CUFsuUlF7r4KAKG7jKiAUNmDDATpEbonh9n26g==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} peerDependencies: eslint: ^8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.55.0 node-html-parser: 5.4.2 dev: true @@ -589,7 +589,7 @@ packages: /@types/unist@3.0.0: resolution: {integrity: sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==} - /@typescript-eslint/eslint-plugin@6.12.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.12.0(@typescript-eslint/parser@6.12.0)(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-XOpZ3IyJUIV1b15M7HVOpgQxPPF7lGXgsfcEIu3yDxFPaf/xZKt7s9QO/pbk7vpWQyVulpJbu4E5LwpZiQo4kA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -601,13 +601,13 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.9.1 - '@typescript-eslint/parser': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.12.0(eslint@8.55.0)(typescript@5.2.2) '@typescript-eslint/scope-manager': 6.12.0 - '@typescript-eslint/type-utils': 6.12.0(eslint@8.54.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.12.0(eslint@8.55.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.12.0(eslint@8.55.0)(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.12.0 debug: 4.3.4 - eslint: 8.54.0 + eslint: 8.55.0 graphemer: 1.4.0 ignore: 5.2.4 natural-compare: 1.4.0 @@ -618,7 +618,7 @@ packages: - supports-color dev: true - /@typescript-eslint/parser@6.12.0(eslint@8.54.0)(typescript@5.2.2): + /@typescript-eslint/parser@6.12.0(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-s8/jNFPKPNRmXEnNXfuo1gemBdVmpQsK1pcu+QIvuNJuhFzGrpD7WjOcvDc/+uEdfzSYpNu7U/+MmbScjoQ6vg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -633,7 +633,7 @@ packages: '@typescript-eslint/typescript-estree': 6.12.0(typescript@5.2.2) '@typescript-eslint/visitor-keys': 6.12.0 debug: 4.3.4 - eslint: 8.54.0 + eslint: 8.55.0 typescript: 5.2.2 transitivePeerDependencies: - supports-color @@ -647,7 +647,7 @@ packages: '@typescript-eslint/visitor-keys': 6.12.0 dev: true - /@typescript-eslint/type-utils@6.12.0(eslint@8.54.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@6.12.0(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-WWmRXxhm1X8Wlquj+MhsAG4dU/Blvf1xDgGaYCzfvStP2NwPQh6KBvCDbiOEvaE0filhranjIlK/2fSTVwtBng==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -658,9 +658,9 @@ packages: optional: true dependencies: '@typescript-eslint/typescript-estree': 6.12.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/utils': 6.12.0(eslint@8.55.0)(typescript@5.2.2) debug: 4.3.4 - eslint: 8.54.0 + eslint: 8.55.0 ts-api-utils: 1.0.3(typescript@5.2.2) typescript: 5.2.2 transitivePeerDependencies: @@ -693,19 +693,19 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.12.0(eslint@8.54.0)(typescript@5.2.2): + /@typescript-eslint/utils@6.12.0(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-LywPm8h3tGEbgfyjYnu3dauZ0U7R60m+miXgKcZS8c7QALO9uWJdvNoP+duKTk2XMWc7/Q3d/QiCuLN9X6SWyQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) '@types/json-schema': 7.0.13 '@types/semver': 7.5.3 '@typescript-eslint/scope-manager': 6.12.0 '@typescript-eslint/types': 6.12.0 '@typescript-eslint/typescript-estree': 6.12.0(typescript@5.2.2) - eslint: 8.54.0 + eslint: 8.55.0 semver: 7.5.4 transitivePeerDependencies: - supports-color @@ -1525,7 +1525,7 @@ packages: engines: {node: '>=12'} dev: true - /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.0)(eslint@8.54.0): + /eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.0)(eslint@8.55.0): resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -1533,20 +1533,20 @@ packages: eslint-plugin-import: ^2.25.2 dependencies: confusing-browser-globals: 1.0.11 - eslint: 8.54.0 - eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0) + eslint: 8.55.0 + eslint-plugin-import: 2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.55.0) object.assign: 4.1.4 object.entries: 1.1.7 semver: 6.3.1 dev: true - /eslint-config-prettier@9.0.0(eslint@8.54.0): + /eslint-config-prettier@9.0.0(eslint@8.55.0): resolution: {integrity: sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.54.0 + eslint: 8.55.0 dev: true /eslint-formatter-pretty@5.0.0: @@ -1573,7 +1573,7 @@ packages: - supports-color dev: true - /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0): + /eslint-module-utils@2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.55.0): resolution: {integrity: sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==} engines: {node: '>=4'} peerDependencies: @@ -1594,23 +1594,23 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.12.0(eslint@8.55.0)(typescript@5.2.2) debug: 3.2.7 - eslint: 8.54.0 + eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-ava@14.0.0(eslint@8.54.0): + /eslint-plugin-ava@14.0.0(eslint@8.55.0): resolution: {integrity: sha512-XmKT6hppaipwwnLVwwvQliSU6AF1QMHiNoLD5JQfzhUhf0jY7CO0O624fQrE+Y/fTb9vbW8r77nKf7M/oHulxw==} engines: {node: '>=14.17 <15 || >=16.4'} peerDependencies: eslint: '>=8.26.0' dependencies: enhance-visitors: 1.0.0 - eslint: 8.54.0 - eslint-utils: 3.0.0(eslint@8.54.0) + eslint: 8.55.0 + eslint-utils: 3.0.0(eslint@8.55.0) espree: 9.6.1 espurify: 2.1.1 import-modules: 2.1.0 @@ -1619,29 +1619,29 @@ packages: resolve-from: 5.0.0 dev: true - /eslint-plugin-es-x@7.2.0(eslint@8.54.0): + /eslint-plugin-es-x@7.2.0(eslint@8.55.0): resolution: {integrity: sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: eslint: '>=8' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) '@eslint-community/regexpp': 4.9.1 - eslint: 8.54.0 + eslint: 8.55.0 dev: true - /eslint-plugin-eslint-comments@3.2.0(eslint@8.54.0): + /eslint-plugin-eslint-comments@3.2.0(eslint@8.55.0): resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.54.0 + eslint: 8.55.0 ignore: 5.2.4 dev: true - /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.54.0): + /eslint-plugin-import@2.29.0(@typescript-eslint/parser@6.12.0)(eslint@8.55.0): resolution: {integrity: sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==} engines: {node: '>=4'} peerDependencies: @@ -1651,16 +1651,16 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.12.0(eslint@8.55.0)(typescript@5.2.2) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.54.0 + eslint: 8.55.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.55.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -1676,28 +1676,28 @@ packages: - supports-color dev: true - /eslint-plugin-markdown@3.0.1(eslint@8.54.0): + /eslint-plugin-markdown@3.0.1(eslint@8.55.0): resolution: {integrity: sha512-8rqoc148DWdGdmYF6WSQFT3uQ6PO7zXYgeBpHAOAakX/zpq+NvFYbDA/H7PYzHajwtmaOzAwfxyl++x0g1/N9A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.55.0 mdast-util-from-markdown: 0.8.5 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-n@16.3.1(eslint@8.54.0): + /eslint-plugin-n@16.3.1(eslint@8.55.0): resolution: {integrity: sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==} engines: {node: '>=16.0.0'} peerDependencies: eslint: '>=7.0.0' dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) builtins: 5.0.1 - eslint: 8.54.0 - eslint-plugin-es-x: 7.2.0(eslint@8.54.0) + eslint: 8.55.0 + eslint-plugin-es-x: 7.2.0(eslint@8.55.0) get-tsconfig: 4.7.2 ignore: 5.2.4 is-builtin-module: 3.2.1 @@ -1707,35 +1707,35 @@ packages: semver: 7.5.4 dev: true - /eslint-plugin-promise@6.1.1(eslint@8.54.0): + /eslint-plugin-promise@6.1.1(eslint@8.55.0): resolution: {integrity: sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.55.0 dev: true - /eslint-plugin-sonarjs@0.23.0(eslint@8.54.0): + /eslint-plugin-sonarjs@0.23.0(eslint@8.55.0): resolution: {integrity: sha512-z44T3PBf9W7qQ/aR+NmofOTyg6HLhSEZOPD4zhStqBpLoMp8GYhFksuUBnCxbnf1nfISpKBVkQhiBLFI/F4Wlg==} engines: {node: '>=14'} peerDependencies: eslint: ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - eslint: 8.54.0 + eslint: 8.55.0 dev: true - /eslint-plugin-unicorn@49.0.0(eslint@8.54.0): + /eslint-plugin-unicorn@49.0.0(eslint@8.55.0): resolution: {integrity: sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==} engines: {node: '>=16'} peerDependencies: eslint: '>=8.52.0' dependencies: '@babel/helper-validator-identifier': 7.22.20 - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) ci-info: 3.9.0 clean-regexp: 1.0.0 - eslint: 8.54.0 + eslint: 8.55.0 esquery: 1.5.0 indent-string: 4.0.0 is-builtin-module: 3.2.1 @@ -1768,13 +1768,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils@3.0.0(eslint@8.54.0): + /eslint-utils@3.0.0(eslint@8.55.0): resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.54.0 + eslint: 8.55.0 eslint-visitor-keys: 2.1.0 dev: true @@ -1788,15 +1788,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint@8.54.0: - resolution: {integrity: sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==} + /eslint@8.55.0: + resolution: {integrity: sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.54.0) + '@eslint-community/eslint-utils': 4.4.0(eslint@8.55.0) '@eslint-community/regexpp': 4.9.1 - '@eslint/eslintrc': 2.1.3 - '@eslint/js': 8.54.0 + '@eslint/eslintrc': 2.1.4 + '@eslint/js': 8.55.0 '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 @@ -1951,7 +1951,7 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flat-cache: 3.1.1 + flat-cache: 3.2.0 dev: true /fill-range@7.0.1: @@ -1985,15 +1985,6 @@ packages: path-exists: 5.0.0 dev: true - /flat-cache@3.1.1: - resolution: {integrity: sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==} - engines: {node: '>=12.0.0'} - dependencies: - flatted: 3.2.9 - keyv: 4.5.4 - rimraf: 3.0.2 - dev: true - /flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} @@ -2050,7 +2041,7 @@ packages: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} dev: true - /garou@0.6.19(eslint@8.54.0)(typescript@5.2.2): + /garou@0.6.19(eslint@8.55.0)(typescript@5.2.2): resolution: {integrity: sha512-aNPBiBdkqBfMA6doSzskC96c+z9+2kN+scFc286VjnnLbWvDc2Afx7UaGYw04Up5Tq8EU6m/1HJzfFRo4qUzBw==} engines: {node: '>=20.0.0 || ^16.15.0 || ^18.12.0'} hasBin: true @@ -2061,13 +2052,13 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 6.12.0(eslint@8.54.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.12.0(eslint@8.55.0)(typescript@5.2.2) '@yarnpkg/lockfile': 1.1.0 - eslint: 8.54.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.54.0) + eslint: 8.55.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.12.0)(eslint-import-resolver-node@0.3.9)(eslint@8.55.0) flat-cache: 3.2.0 typescript: 5.2.2 - vue-eslint-parser: 9.3.2(eslint@8.54.0) + vue-eslint-parser: 9.3.2(eslint@8.55.0) write-file-atomic: 5.0.1 transitivePeerDependencies: - eslint-import-resolver-node @@ -4146,14 +4137,14 @@ packages: vfile-message: 4.0.2 dev: true - /vue-eslint-parser@9.3.2(eslint@8.54.0): + /vue-eslint-parser@9.3.2(eslint@8.55.0): resolution: {integrity: sha512-q7tWyCVaV9f8iQyIA5Mkj/S6AoJ9KBN8IeUSf3XEmBrOtxOZnfTg5s4KClbZBCK3GtnT/+RyCLZyDHuZwTuBjg==} engines: {node: ^14.17.0 || >=16.0.0} peerDependencies: eslint: '>=6.0.0' dependencies: debug: 4.3.4 - eslint: 8.54.0 + eslint: 8.55.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 diff --git a/test/snapshots/output.mjs.md b/test/snapshots/output.mjs.md index cb91203..de82914 100644 --- a/test/snapshots/output.mjs.md +++ b/test/snapshots/output.mjs.md @@ -65,7 +65,7 @@ Generated by [AVA](https://avajs.dev). { attributes: [ { - name: 'class', + name: 'className', type: 'mdxJsxAttribute', value: 'kroki-inline-svg', }, @@ -93,7 +93,7 @@ Generated by [AVA](https://avajs.dev). > result - `

␊ + `

AABB

` @@ -209,7 +209,7 @@ Generated by [AVA](https://avajs.dev). { attributes: [ { - name: 'class', + name: 'className', type: 'mdxJsxAttribute', value: 'kroki-image', }, @@ -239,7 +239,7 @@ Generated by [AVA](https://avajs.dev). > result - 'plantuml' + 'plantuml' ## object-base64 | html @@ -307,7 +307,7 @@ Generated by [AVA](https://avajs.dev). value: 'image/svg+xml', }, { - name: 'class', + name: 'className', type: 'mdxJsxAttribute', value: 'kroki-object', }, @@ -340,6 +340,6 @@ Generated by [AVA](https://avajs.dev). > result - `␊ + `␊ Load SVG fail...␊ ` diff --git a/test/snapshots/output.mjs.snap b/test/snapshots/output.mjs.snap index 517977fdfcbcb4361bc9ba49067230d24fb1c1f8..d226f9e6c22ad6fe9669fca79ed4b4cfdd33c1c9 100644 GIT binary patch literal 3518 zcmV;v4MFljRzVqf00000000B+U0rM=R~7ce$?hiG-RuH|2Y8ser~-A9jK`jAoJ}IxapKtZ zPhvZy`HNc^heBiZWB+dwYpxDNvmT>>xRN< zRzp?hNHR<=ENqYw#4sl*94{%7tQiffmrse99b|Nkn7RYMG|=aXE4PW6aJ|lT2*Np< zpP%;-a~^{55Z4J}%}F$)!*2uVhd{pu`oPKHN`|jWf<;UX4sYGMhyk+=RfnGUXCsPyafvjLsJ*J{p*9=lnIMZDB*$P}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