Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/plenty-cycles-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@preconstruct/cli": minor
---

Replce `fast-glob` with `tinyglobby`
27 changes: 24 additions & 3 deletions build/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,21 @@
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz#4d2d0f14820ede3b9807ea5fc36dfc8cd7da07f2"
integrity sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==

"@babel/helper-string-parser@^7.25.7":
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.25.7.tgz#d50e8d37b1176207b4fe9acedec386c565a44a54"
integrity sha512-CbkjYdsJNHFk8uqpEkpCvRs3YRp9tY6FmFY7wLMSYuGYkrdUi7r2lc4/wqsvlHoMznX3WJ9IP8giGPq68T/Y6g==

"@babel/helper-validator-identifier@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz#75b889cfaf9e35c2aaf42cf0d72c8e91719251db"
integrity sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==

"@babel/helper-validator-identifier@^7.25.7":
version "7.25.7"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.25.7.tgz#77b7f60c40b15c97df735b38a66ba1d7c3e93da5"
integrity sha512-AM6TzwYqGChO45oiuPqwL2t20/HdMC1rTPAesnBCgPCSF1x3oN9MVUwQV2iyz4xqWrctwK5RNC8LV22kaQCNYg==

"@babel/helper-validator-option@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz#24c3bb77c7a425d1742eec8fb433b5a1b38e62f6"
Expand All @@ -160,9 +170,11 @@
picocolors "^1.0.0"

"@babel/parser@^7.21.2", "@babel/parser@^7.24.7":
version "7.24.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.24.7.tgz#9a5226f92f0c5c8ead550b750f5608e766c8ce85"
integrity sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==
version "7.25.8"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.8.tgz#f6aaf38e80c36129460c1657c0762db584c9d5e2"
integrity sha512-HcttkxzdPucv3nNFmfOOMfFf64KgdJVqm1KaCm25dPGMLElo9nsLvXeJECQg8UzPuBGLyTSA0ZzqCtDSzKTEoQ==
dependencies:
"@babel/types" "^7.25.8"

"@babel/plugin-transform-modules-commonjs@^7.7.5":
version "7.24.7"
Expand Down Expand Up @@ -214,6 +226,15 @@
"@babel/helper-validator-identifier" "^7.24.7"
to-fast-properties "^2.0.0"

"@babel/types@^7.25.8":
version "7.25.8"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.8.tgz#5cf6037258e8a9bcad533f4979025140cb9993e1"
integrity sha512-JWtuCu8VQsMladxVz/P4HzHUGCAwpuqacmowgXFs5XjxIgKuNjnLokQzuVjlTvIzODaDmpjT3oxcC48vyk9EWg==
dependencies:
"@babel/helper-string-parser" "^7.25.7"
"@babel/helper-validator-identifier" "^7.25.7"
to-fast-properties "^2.0.0"

"@jridgewell/gen-mapping@^0.3.5":
version "0.3.5"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz#dcce6aff74bdf6dad1a95802b69b04a2fcb1fb36"
Expand Down
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
"enquirer": "^2.3.6",
"estree-walker": "^2.0.1",
"fast-deep-equal": "^2.0.1",
"fast-glob": "^3.2.4",
"fs-extra": "^9.0.1",
"is-reference": "^1.2.1",
"jest-worker": "^26.3.0",
Expand All @@ -70,6 +69,7 @@
"rollup": "^2.79.1",
"semver": "^7.3.4",
"terser": "^5.16.8",
"tinyglobby": "^0.2.9",
"v8-compile-cache": "^2.1.1",
"zod": "^3.21.4"
},
Expand All @@ -82,6 +82,7 @@
"devDependencies": {
"@types/estree": "*",
"escape-string-regexp": "^4.0.0",
"fast-glob": "^3.2.4",
"spawndamnit": "^2.0.0",
"strip-ansi": "^6.0.0"
}
Expand Down
8 changes: 5 additions & 3 deletions packages/cli/src/package.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// based on https://github.com/jamiebuilds/std-pkg but reading fewer things, adding setters and reading the file
import fastGlob from "fast-glob";
import { glob } from "tinyglobby";
import * as fs from "fs-extra";
import fsPromises from "fs/promises";
import nodePath from "path";
Expand Down Expand Up @@ -191,8 +191,9 @@ export class Package extends Item<{
let contents = await fs.readFile(filePath, "utf-8");
let pkg = new Package(filePath, contents, project._jsonDataByPath);
pkg.project = project;
let entrypoints = await fastGlob(pkg.configEntrypoints, {
let entrypoints = await glob(pkg.configEntrypoints, {
cwd: nodePath.join(pkg.directory, "src"),
expandDirectories: false,
onlyFiles: true,
absolute: true,
});
Expand All @@ -211,8 +212,9 @@ export class Package extends Item<{
}),
];
if (!entrypoints.length) {
let oldEntrypoints = await fastGlob(pkg.configEntrypoints, {
let oldEntrypoints = await glob(pkg.configEntrypoints, {
cwd: pkg.directory,
expandDirectories: false,
onlyDirectories: true,
absolute: true,
});
Expand Down
5 changes: 3 additions & 2 deletions packages/cli/src/project.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import nodePath from "path";
import { promptInput } from "./prompt";
import fastGlob from "fast-glob";
import { glob } from "tinyglobby";
import * as fs from "fs-extra";
import { Item } from "./item";
import { Package } from "./package";
Expand Down Expand Up @@ -123,9 +123,10 @@ export class Project extends Item<{
await this.save();
}

let filenames = await fastGlob(this.configPackages, {
let filenames = await glob(this.configPackages, {
cwd: this.directory,
onlyDirectories: true,
expandDirectories: false,
absolute: true,
});

Expand Down
15 changes: 14 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6919,6 +6919,11 @@ fbjs@^3.0.0, fbjs@^3.0.1:
setimmediate "^1.0.5"
ua-parser-js "^0.7.30"

fdir@^6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/fdir/-/fdir-6.4.0.tgz#8e80ab4b18a2ac24beebf9d20d71e1bc2627dbae"
integrity sha512-3oB133prH1o4j/L5lLW7uOCF1PlD+/It2L0eL/iAqWMB91RBbqTewABqxhj0ibBd90EEmWZq7ntIWzVaWcXTGQ==

feed@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/feed/-/feed-4.2.2.tgz#865783ef6ed12579e2c44bbef3c9113bc4956a7e"
Expand Down Expand Up @@ -10437,7 +10442,7 @@ picomatch@^2.2.3, picomatch@^2.3.1:
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==

picomatch@^4.0.1:
picomatch@^4.0.1, picomatch@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-4.0.2.tgz#77c742931e8f3b8820946c76cd0c1f13730d1dab"
integrity sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==
Expand Down Expand Up @@ -12628,6 +12633,14 @@ tiny-warning@^1.0.0, tiny-warning@^1.0.3:
resolved "https://registry.yarnpkg.com/tiny-warning/-/tiny-warning-1.0.3.tgz#94a30db453df4c643d0fd566060d60a875d84754"
integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA==

tinyglobby@^0.2.9:
version "0.2.9"
resolved "https://registry.yarnpkg.com/tinyglobby/-/tinyglobby-0.2.9.tgz#6baddd1b0fe416403efb0dd40442c7d7c03c1c66"
integrity sha512-8or1+BGEdk1Zkkw2ii16qSS7uVrQJPre5A9o/XkWPATkk23FZh/15BKFxPnlTy6vkljZxLqYCzzBMj30ZrSvjw==
dependencies:
fdir "^6.4.0"
picomatch "^4.0.2"

tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
Expand Down