diff --git a/.changeset/use-maintained-gray-matter.md b/.changeset/use-maintained-gray-matter.md new file mode 100644 index 0000000000000..a43fbbad2e68c --- /dev/null +++ b/.changeset/use-maintained-gray-matter.md @@ -0,0 +1,10 @@ +--- +"@refinedev/devtools-server": minor +"@refinedev/cli": minor +--- + +feat: moved to @11ty/gray-matter #7510 + +Now uses a maintained fork of gray-matter library. + +[Resolves #7510](https://github.com/refinedev/refine/issues/7510) diff --git a/packages/cli/package.json b/packages/cli/package.json index 86fc8533bad5b..a0f6a087db365 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -52,7 +52,7 @@ "figlet": "^1.5.2", "fs-extra": "^10.1.0", "globby": "^11.1.0", - "gray-matter": "^4.0.3", + "@11ty/gray-matter": "^3.0.0", "handlebars": "^4.7.7", "inquirer": "^8.2.5", "inquirer-autocomplete-prompt": "^2.0.0", diff --git a/packages/cli/src/utils/announcement/index.tsx b/packages/cli/src/utils/announcement/index.tsx index 0bbeb9477a585..3cf03ca49ec5d 100644 --- a/packages/cli/src/utils/announcement/index.tsx +++ b/packages/cli/src/utils/announcement/index.tsx @@ -1,5 +1,5 @@ import React from "react"; -import matter from "gray-matter"; +import matter from "@11ty/gray-matter"; import boxen from "boxen"; import type { Announcement } from "../../definitions/announcement"; diff --git a/packages/devtools-server/package.json b/packages/devtools-server/package.json index fd1b1ebe9b885..3c3db2e543e04 100644 --- a/packages/devtools-server/package.json +++ b/packages/devtools-server/package.json @@ -57,7 +57,7 @@ "express": "^4.21.0", "fs-extra": "^10.1.0", "globby": "^11.1.0", - "gray-matter": "^4.0.3", + "@11ty/gray-matter": "^3.0.0", "http-proxy-middleware": "^3.0.0", "jscodeshift": "^17.3.0", "lodash": "^4.17.21", diff --git a/packages/devtools-server/src/feed/get-feed.ts b/packages/devtools-server/src/feed/get-feed.ts index 01bcf05e301ef..33984a1fe34bd 100644 --- a/packages/devtools-server/src/feed/get-feed.ts +++ b/packages/devtools-server/src/feed/get-feed.ts @@ -1,5 +1,5 @@ import fetch from "node-fetch"; -import matter from "gray-matter"; +import matter from "@11ty/gray-matter"; import { marked } from "marked"; import sanitizeHtml from "sanitize-html"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dcd09693de6b2..a08661346a6d5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11419,6 +11419,9 @@ importers: packages/cli: dependencies: + '@11ty/gray-matter': + specifier: ^3.0.0 + version: 3.0.0 '@npmcli/package-json': specifier: ^5.2.0 version: 5.2.0 @@ -11473,9 +11476,6 @@ importers: globby: specifier: ^11.1.0 version: 11.1.0 - gray-matter: - specifier: ^4.0.3 - version: 4.0.3 handlebars: specifier: ^4.7.7 version: 4.7.8 @@ -11956,6 +11956,9 @@ importers: packages/devtools-server: dependencies: + '@11ty/gray-matter': + specifier: ^3.0.0 + version: 3.0.0 '@refinedev/devtools-shared': specifier: 2.0.2 version: link:../devtools-shared @@ -11995,9 +11998,6 @@ importers: globby: specifier: ^11.1.0 version: 11.1.0 - gray-matter: - specifier: ^4.0.3 - version: 4.0.3 http-proxy-middleware: specifier: ^3.0.0 version: 3.0.0 @@ -14066,6 +14066,10 @@ packages: graphql: optional: true + '@11ty/gray-matter@3.0.0': + resolution: {integrity: sha512-mi6KB36DZCpCfCb9XP3NtDDNXe1N0jKtuFj9mTCZNy5H7vTabODyMgFmmOiGIGJKt+i8mJqEb/REtK+JTEzlpQ==} + engines: {node: '>=11'} + '@aashutoshrathi/word-wrap@1.2.6': resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} engines: {node: '>=0.10.0'} @@ -22528,6 +22532,7 @@ packages: conventional-changelog-core@5.0.1: resolution: {integrity: sha512-Rvi5pH+LvgsqGwZPZ3Cq/tz4ty7mjijhr3qR4m9IBXNbxGGYgTVVO+duXzz9aArmHxFtwZ+LRkrNIMDQzgoY4A==} engines: {node: '>=14'} + deprecated: Deprecated and no longer maintained. Please use conventional-changelog instead. conventional-changelog-preset-loader@3.0.0: resolution: {integrity: sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==} @@ -24647,13 +24652,13 @@ packages: git-raw-commits@2.0.11: resolution: {integrity: sha512-VnctFhw+xfj8Va1xtfEqCUD2XDrbAPSJx+hSrE5K7fGdjZruW7XV+QOrN7LF/RJyvspRiD2I0asWsxFp0ya26A==} engines: {node: '>=10'} - deprecated: This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead. + deprecated: Deprecated and no longer maintained. Use @conventional-changelog/git-client instead. hasBin: true git-raw-commits@3.0.0: resolution: {integrity: sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==} engines: {node: '>=14'} - deprecated: This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead. + deprecated: Deprecated and no longer maintained. Use @conventional-changelog/git-client instead. hasBin: true git-remote-origin-url@2.0.0: @@ -24663,7 +24668,7 @@ packages: git-semver-tags@5.0.1: resolution: {integrity: sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==} engines: {node: '>=14'} - deprecated: This package is no longer maintained. For the JavaScript API, please use @conventional-changelog/git-client instead. + deprecated: Deprecated and no longer maintained. Use @conventional-changelog/git-client instead. hasBin: true git-up@7.0.0: @@ -24859,10 +24864,6 @@ packages: resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} - gray-matter@4.0.3: - resolution: {integrity: sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q==} - engines: {node: '>=6.0'} - groqd@0.15.11: resolution: {integrity: sha512-i1JBi6CnRAVbsld9pThccvEg0jEq+xDiZE1OAkbTTt6bakpic5nv3QASvdgA+nWAoaX754q1ACvntgB7Pf83VQ==} engines: {node: '>= 14'} @@ -26157,14 +26158,22 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-yaml@3.14.1: - resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} + js-yaml@3.15.0: + resolution: {integrity: sha512-ttBQIIQPDeLjpPOohtUdXuXUVoA2uIB6fEH9HyJ7234s5mBJ5wTx20njxplLZQgLaOfpmPQA7X2t5AX6tIPbog==} hasBin: true js-yaml@4.1.0: resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} hasBin: true + js-yaml@4.3.0: + resolution: {integrity: sha512-1td788aAnnZ5qs7V2QIRl1owjtYpbKt749Y3xauqQgwIIGF/xXWz1wMTEBx5O3LK3lXLVuqXPdPxj2BoFHaW9Q==} + hasBin: true + + js-yaml@5.2.2: + resolution: {integrity: sha512-dayzUzKkJ1MkuUtZglSebU43utNXH0OWQByK9rKOOuYIO8M5TV1y+n8ALMdG0rdzBnfNkOmZEqrURepb0ejqBw==} + hasBin: true + jsbn@0.1.1: resolution: {integrity: sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==} @@ -31259,10 +31268,6 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom-string@1.0.0: - resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} - engines: {node: '>=0.10.0'} - strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} @@ -31818,6 +31823,7 @@ packages: tsconfck@3.0.3: resolution: {integrity: sha512-4t0noZX9t6GcPTfBAbIbbIU4pfpCwh0ueq3S4O/5qXI1VwK1outmxhe9dOiEWqMz3MW2LKgDTpqWV+37IWuVbA==} engines: {node: ^18 || >=20} + deprecated: unmaintained hasBin: true peerDependencies: typescript: ^5.0.0 @@ -33177,6 +33183,11 @@ snapshots: optionalDependencies: graphql: 16.9.0 + '@11ty/gray-matter@3.0.0': + dependencies: + js-yaml: 5.2.2 + section-matter: 1.0.0 + '@aashutoshrathi/word-wrap@1.2.6': {} '@ably/msgpack-js@0.4.0': @@ -37102,7 +37113,7 @@ snapshots: '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 - js-yaml: 3.14.1 + js-yaml: 3.15.0 '@changesets/pre@2.0.0': dependencies: @@ -37886,7 +37897,7 @@ snapshots: globals: 13.24.0 ignore: 5.3.1 import-fresh: 3.3.0 - js-yaml: 4.1.0 + js-yaml: 4.3.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -37900,7 +37911,7 @@ snapshots: globals: 14.0.0 ignore: 5.3.1 import-fresh: 3.3.0 - js-yaml: 4.1.0 + js-yaml: 4.3.0 minimatch: 3.1.2 strip-json-comments: 3.1.1 transitivePeerDependencies: @@ -38956,7 +38967,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 jose: 5.2.4 - js-yaml: 4.1.0 + js-yaml: 4.3.0 json-stable-stringify: 1.1.1 lodash: 4.17.21 scuid: 1.1.0 @@ -38984,7 +38995,7 @@ snapshots: http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.4 jose: 5.2.4 - js-yaml: 4.1.0 + js-yaml: 4.3.0 json-stable-stringify: 1.1.1 lodash: 4.17.21 scuid: 1.1.0 @@ -39344,7 +39355,7 @@ snapshots: camelcase: 5.3.1 find-up: 4.1.0 get-package-type: 0.1.0 - js-yaml: 3.14.1 + js-yaml: 3.15.0 resolve-from: 5.0.0 '@istanbuljs/schema@0.1.3': {} @@ -43807,7 +43818,7 @@ snapshots: '@yarnpkg/parsers@3.0.0-rc.46': dependencies: - js-yaml: 3.14.1 + js-yaml: 3.15.0 tslib: 2.6.2 '@zag-js/dom-query@0.16.0': {} @@ -45749,7 +45760,7 @@ snapshots: cosmiconfig@8.3.6(typescript@5.8.3): dependencies: import-fresh: 3.3.0 - js-yaml: 4.1.0 + js-yaml: 4.3.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: @@ -45759,7 +45770,7 @@ snapshots: dependencies: env-paths: 2.2.1 import-fresh: 3.3.0 - js-yaml: 4.1.0 + js-yaml: 4.3.0 parse-json: 5.2.0 optionalDependencies: typescript: 5.8.3 @@ -47007,7 +47018,7 @@ snapshots: '@typescript-eslint/parser': 5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.35.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-import: 2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-typescript@3.10.1)(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-jsx-a11y: 6.10.2(eslint@9.35.0(jiti@2.5.1)) eslint-plugin-react: 7.37.5(eslint@9.35.0(jiti@2.5.1)) @@ -47058,7 +47069,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)): + eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)): dependencies: '@nolyfill/is-core-module': 1.0.39 debug: 4.4.3(supports-color@8.1.1) @@ -47073,14 +47084,14 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-module-utils@2.12.1(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)): + eslint-module-utils@2.12.1(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)): dependencies: debug: 3.2.7(supports-color@8.1.1) optionalDependencies: '@typescript-eslint/parser': 5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3) eslint: 9.35.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)) + eslint-import-resolver-typescript: 3.10.1(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)) transitivePeerDependencies: - supports-color @@ -47177,7 +47188,7 @@ snapshots: doctrine: 2.1.0 eslint: 9.35.0(jiti@2.5.1) eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.12.1(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)) + eslint-module-utils: 2.12.1(@typescript-eslint/parser@5.48.0(eslint@9.35.0(jiti@2.5.1))(typescript@5.8.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.10.1(eslint-plugin-import@2.32.0)(eslint@9.35.0(jiti@2.5.1)))(eslint@9.35.0(jiti@2.5.1)) hasown: 2.0.2 is-core-module: 2.16.1 is-glob: 4.0.3 @@ -47389,7 +47400,7 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 - js-yaml: 4.1.0 + js-yaml: 4.3.0 json-stable-stringify-without-jsonify: 1.0.1 levn: 0.4.1 lodash.merge: 4.6.2 @@ -48676,13 +48687,6 @@ snapshots: graphql@16.9.0: {} - gray-matter@4.0.3: - dependencies: - js-yaml: 3.14.1 - kind-of: 6.0.3 - section-matter: 1.0.0 - strip-bom-string: 1.0.0 - groqd@0.15.11: dependencies: zod: 3.22.4 @@ -50362,7 +50366,7 @@ snapshots: js-tokens@4.0.0: {} - js-yaml@3.14.1: + js-yaml@3.15.0: dependencies: argparse: 1.0.10 esprima: 4.0.1 @@ -50371,6 +50375,14 @@ snapshots: dependencies: argparse: 2.0.1 + js-yaml@4.3.0: + dependencies: + argparse: 2.0.1 + + js-yaml@5.2.2: + dependencies: + argparse: 2.0.1 + jsbn@0.1.1: {} jsbn@1.1.0: {} @@ -50927,7 +50939,7 @@ snapshots: load-yaml-file@0.2.0: dependencies: graceful-fs: 4.2.11 - js-yaml: 3.14.1 + js-yaml: 3.15.0 pify: 4.0.1 strip-bom: 3.0.0 @@ -55441,13 +55453,13 @@ snapshots: read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 - js-yaml: 3.14.1 + js-yaml: 3.15.0 pify: 4.0.1 strip-bom: 3.0.0 read-yaml-file@2.1.0: dependencies: - js-yaml: 4.1.0 + js-yaml: 4.3.0 strip-bom: 4.0.0 read@2.1.0: @@ -55747,7 +55759,7 @@ snapshots: dependencies: estree-util-is-identifier-name: 1.1.0 estree-util-value-to-estree: 1.3.0 - js-yaml: 4.1.0 + js-yaml: 4.3.0 toml: 3.0.0 remark-mdx@2.3.0: @@ -57024,8 +57036,6 @@ snapshots: dependencies: ansi-regex: 6.0.1 - strip-bom-string@1.0.0: {} - strip-bom@3.0.0: {} strip-bom@4.0.0: {} @@ -57224,7 +57234,7 @@ snapshots: css-select-base-adapter: 0.1.1 css-tree: 1.0.0-alpha.37 csso: 4.2.0 - js-yaml: 3.14.1 + js-yaml: 3.15.0 mkdirp: 0.5.6 object.values: 1.2.0 sax: 1.2.4