Skip to content

Commit

Permalink
remove globby, use node glob instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Jan 6, 2025
1 parent 2163d31 commit c3e7af0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 37 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"concurrently": "^9.1.0",
"consola": "^2.15.3",
"eslint-import-resolver-nuxt": "^1.0.1",
"globby": "^14.0.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-serializer-vue": "^3.1.0",
Expand Down
8 changes: 4 additions & 4 deletions utils/extractApi.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const path = require('node:path');
const fs = require('node:fs');
const docGenAPI = require('vue-docgen-api');
const globby = require('globby');
const { GlobSync } = require('glob');
const consola = require('consola');

/***********************************/
Expand All @@ -21,10 +21,10 @@ function notTest(filePath) {

async function writeApi() {
const componentFolder = path.resolve('./lib/');
const simpleFiles = await globby('**/K*.{vue,js}', { cwd: componentFolder });
const simpleFiles = Array.from(GlobSync('**/K*.{vue,js}', { cwd: componentFolder }));
const output = {};

for (const filename of simpleFiles.filter(notTest)) {
for (const filename of Array.from(simpleFiles).filter(notTest)) {
const filepath = path.resolve(componentFolder, filename);
try {
const val = await docGenAPI.parse(filepath);
Expand All @@ -34,7 +34,7 @@ async function writeApi() {
}
}

const complexFiles = await globby('**/K*/index.{vue,js}', { cwd: componentFolder });
const complexFiles = Array.from(GlobSync('**/K*/index.{vue,js}', { cwd: componentFolder }));

for (const filename of complexFiles.filter(notTest)) {
const filepath = path.resolve(componentFolder, filename);
Expand Down
32 changes: 0 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2279,11 +2279,6 @@
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e"
integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==

"@sindresorhus/merge-streams@^2.1.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz#719df7fb41766bc143369eaa0dd56d8dc87c9958"
integrity sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==

"@sinonjs/commons@^3.0.0":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.1.tgz#1029357e44ca901a615585f6d27738dbc89084cd"
Expand Down Expand Up @@ -6630,18 +6625,6 @@ globby@^11.0.4, globby@^11.1.0:
merge2 "^1.4.1"
slash "^3.0.0"

globby@^14.0.2:
version "14.0.2"
resolved "https://registry.yarnpkg.com/globby/-/globby-14.0.2.tgz#06554a54ccfe9264e5a9ff8eded46aa1e306482f"
integrity sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==
dependencies:
"@sindresorhus/merge-streams" "^2.1.0"
fast-glob "^3.3.2"
ignore "^5.2.4"
path-type "^5.0.0"
slash "^5.1.0"
unicorn-magic "^0.1.0"

globjoin@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43"
Expand Down Expand Up @@ -9796,11 +9779,6 @@ path-type@^4.0.0:
resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz"
integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==

path-type@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/path-type/-/path-type-5.0.0.tgz#14b01ed7aea7ddf9c7c3f46181d4d04f9c785bb8"
integrity sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==

pbkdf2@^3.0.3, pbkdf2@^3.1.2:
version "3.1.2"
resolved "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz"
Expand Down Expand Up @@ -11853,11 +11831,6 @@ slash@^3.0.0:
resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz"
integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==

slash@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-5.1.0.tgz#be3adddcdf09ac38eebe8dcdc7b1a57a75b095ce"
integrity sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==

slice-ansi@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b"
Expand Down Expand Up @@ -13069,11 +13042,6 @@ unicode-property-aliases-ecmascript@^2.0.0:
resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz"
integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==

unicorn-magic@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/unicorn-magic/-/unicorn-magic-0.1.0.tgz#1bb9a51c823aaf9d73a8bfcd3d1a23dde94b0ce4"
integrity sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==

union-value@^1.0.0:
version "1.0.1"
resolved "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz"
Expand Down

0 comments on commit c3e7af0

Please sign in to comment.