diff --git a/.markdownlint-cli2.mjs b/.markdownlint-cli2.mjs deleted file mode 100644 index 552a9b5..0000000 --- a/.markdownlint-cli2.mjs +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-check -const options = { - - // Overriding default configs - config: { - default: true, - MD041: false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/md041.md - MD013: false, // https://github.com/DavidAnson/markdownlint/blob/main/doc/md013.md - "no-inline-html": { - // Add React components we want to allow here - allowed_elements: ["LoginOrUserInfo", "Info"], - }, - "relative-links": true, // Setting the custom `markdownlint-reule-relative-links` rule - }, - - // Run the lint in the following directory - globs: ["src/pages/**/*.{md,mdx}"], - - // Don't run lint in these directories - ignores: ["**/node_modules", "theme", "scripts"], - - // Import custom rules - customRules: ["markdownlint-rule-relative-links"], -}; - -export default options; \ No newline at end of file diff --git a/package.json b/package.json index ae6c49c..53ed7ff 100644 --- a/package.json +++ b/package.json @@ -33,13 +33,11 @@ "autoprefixer": "^10.4.19", "babel-jest": "^29.7.0", "dotenv": "^16.4.5", - "fast-glob": "^3.3.2", "glob": "^11.0.0", "ignore": "^6.0.2", "jest": "^29.7.0", "jest-environment-jsdom": "^29.7.0", "markdown-link-check": "^3.12.2", - "markdownlint-cli2": "^0.13.0", "markdownlint-rule-relative-links": "^3.0.0", "monocart-reporter": "^2.5.0", "open-cli": "^8.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57cc54d..2898234 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -60,9 +60,6 @@ importers: dotenv: specifier: ^16.4.5 version: 16.4.5 - fast-glob: - specifier: ^3.3.2 - version: 3.3.2 glob: specifier: ^11.0.0 version: 11.0.0 @@ -78,9 +75,6 @@ importers: markdown-link-check: specifier: ^3.12.2 version: 3.12.2 - markdownlint-cli2: - specifier: ^0.13.0 - version: 0.13.0 markdownlint-rule-relative-links: specifier: ^3.0.0 version: 3.0.0 @@ -3349,10 +3343,6 @@ packages: resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} engines: {node: '>=4'} - globby@14.0.1: - resolution: {integrity: sha512-jOMLD2Z7MAhyG8aJpNOpmziMOP4rPLcc95oQPKXBazW82z+CEgPFBQvEpRUa1KeIMUJo4Wsm+q6uzO/Q/4BksQ==} - engines: {node: '>=18'} - globby@14.0.2: resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} engines: {node: '>=18'} @@ -3952,9 +3942,6 @@ packages: engines: {node: '>=6'} hasBin: true - jsonc-parser@3.2.1: - resolution: {integrity: sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==} - jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -4203,28 +4190,10 @@ packages: markdown-table@3.0.3: resolution: {integrity: sha512-Z1NL3Tb1M9wH4XESsCDEksWoKTdlUafKc4pt0GRwjUyXaCFZ+dc3g2erqB6zm3szA2IUSi7VnPI+o/9jnxh9hw==} - markdownlint-cli2-formatter-default@0.0.4: - resolution: {integrity: sha512-xm2rM0E+sWgjpPn1EesPXx5hIyrN2ddUnUwnbCsD/ONxYtw3PX6LydvdH6dciWAoFDpwzbHM1TO7uHfcMd6IYg==} - peerDependencies: - markdownlint-cli2: '>=0.0.4' - - markdownlint-cli2@0.13.0: - resolution: {integrity: sha512-Pg4nF7HlopU97ZXtrcVISWp3bdsuc5M0zXyLp2/sJv2zEMlInrau0ZKK482fQURzVezJzWBpNmu4u6vGAhij+g==} - engines: {node: '>=18'} - hasBin: true - - markdownlint-micromark@0.1.9: - resolution: {integrity: sha512-5hVs/DzAFa8XqYosbEAEg6ok6MF2smDj89ztn9pKkCtdKHVdPQuGMH7frFfYL9mLkvfFe4pTyAMffLbjf3/EyA==} - engines: {node: '>=18'} - markdownlint-rule-relative-links@3.0.0: resolution: {integrity: sha512-+Ek2J8kXKtL8IcjmPYBsxtS37etKIbPE85aj/ehwSlxcWIlT0BCsA/SPHZlIICiZON786XVrLStMCJ1x25D3oA==} engines: {node: '>=16.0.0', npm: '>=9.0.0'} - markdownlint@0.34.0: - resolution: {integrity: sha512-qwGyuyKwjkEMOJ10XN6OTKNOVYvOIi35RNvDLNxTof5s8UmyGHlCdpngRHoRGNvQVGuxO3BJ7uNSgdeX166WXw==} - engines: {node: '>=18'} - marked@12.0.2: resolution: {integrity: sha512-qXUm7e/YKFoqFPYPa3Ukg9xlI5cyAtGmyEIzMfW//m6kXwCy2Ps9DYf5ioijFKQ8qyuscrHoY04iJGctu2Kg0Q==} engines: {node: '>= 18'} @@ -4439,10 +4408,6 @@ packages: micromark@4.0.0: resolution: {integrity: sha512-o/sd0nMof8kYff+TqcDx3VSrgBTcZpSvYcAHIfHhv5VAuNmisCxjhx6YmxS8PFEpb9z5WKWKPdzf0jM23ro3RQ==} - micromatch@4.0.5: - resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} - engines: {node: '>=8.6'} - micromatch@4.0.8: resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} engines: {node: '>=8.6'} @@ -9533,15 +9498,6 @@ snapshots: globals@11.12.0: {} - globby@14.0.1: - dependencies: - '@sindresorhus/merge-streams': 2.3.0 - fast-glob: 3.3.2 - ignore: 5.3.2 - path-type: 5.0.0 - slash: 5.1.0 - unicorn-magic: 0.1.0 - globby@14.0.2: dependencies: '@sindresorhus/merge-streams': 2.3.0 @@ -10467,8 +10423,6 @@ snapshots: json5@2.2.3: {} - jsonc-parser@3.2.1: {} - jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -10722,30 +10676,10 @@ snapshots: markdown-table@3.0.3: {} - markdownlint-cli2-formatter-default@0.0.4(markdownlint-cli2@0.13.0): - dependencies: - markdownlint-cli2: 0.13.0 - - markdownlint-cli2@0.13.0: - dependencies: - globby: 14.0.1 - js-yaml: 4.1.0 - jsonc-parser: 3.2.1 - markdownlint: 0.34.0 - markdownlint-cli2-formatter-default: 0.0.4(markdownlint-cli2@0.13.0) - micromatch: 4.0.5 - - markdownlint-micromark@0.1.9: {} - markdownlint-rule-relative-links@3.0.0: dependencies: markdown-it: 14.1.0 - markdownlint@0.34.0: - dependencies: - markdown-it: 14.1.0 - markdownlint-micromark: 0.1.9 - marked@12.0.2: {} marked@13.0.3: {} @@ -11277,11 +11211,6 @@ snapshots: transitivePeerDependencies: - supports-color - micromatch@4.0.5: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - micromatch@4.0.8: dependencies: braces: 3.0.3 diff --git a/src/generatePrivateRoutes.ts b/src/generatePrivateRoutes.ts index 056e217..189bbe0 100644 --- a/src/generatePrivateRoutes.ts +++ b/src/generatePrivateRoutes.ts @@ -1,7 +1,7 @@ import { Project, SyntaxKind, ObjectLiteralExpression, PropertyAssignment } from "ts-morph"; import path from "path"; import fs from "fs"; -import { globSync } from "fast-glob"; +import { globSync } from "glob"; import { PrivateRoutes } from './types'; /** diff --git a/tests/unit/generatePrivateRoutes.test.ts b/tests/unit/generatePrivateRoutes.test.ts index d5ba178..e417fa9 100644 --- a/tests/unit/generatePrivateRoutes.test.ts +++ b/tests/unit/generatePrivateRoutes.test.ts @@ -1,5 +1,5 @@ import { changeMiddleware, getPrivateRoutes } from "@/src/generatePrivateRoutes"; -import { globSync } from "fast-glob"; +import { globSync } from "glob"; import { existsSync, readFileSync } from "fs"; import path, { resolve } from "path"; import { Project, SyntaxKind } from "ts-morph"; @@ -14,8 +14,8 @@ jest.mock("path", () => ({ resolve: jest.fn(), })); -// Mock fast-glob -jest.mock("fast-glob", () => ({ +// Mock glob +jest.mock("glob", () => ({ globSync: jest.fn(), }));