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
7 changes: 7 additions & 0 deletions .changeset/replace-glob-with-tinyglobby.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"create-cloudflare": patch
"@cloudflare/pages-shared": patch
---

Replace `glob` with `tinyglobby` in build tooling. Remove unused `glob`
dependency from pages-shared.
2 changes: 1 addition & 1 deletion packages/create-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"execa": "^7.1.1",
"exit-hook": "2.2.1",
"get-port": "^7.1.0",
"glob": "^10.3.3",
"tinyglobby": "catalog:default",
"haikunator": "^2.1.2",
"indent-string": "^5.0.0",
"jsonc-parser": "catalog:default",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-cloudflare/scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { cp } from "fs/promises";
import { build, BuildOptions, context } from "esbuild";
import * as glob from "glob";
import { globSync } from "tinyglobby";

const run = async () => {
const argv = process.argv.slice(2);
Expand Down Expand Up @@ -28,7 +28,7 @@ const run = async () => {
// The latter has been added to the project's .gitignore file
// This renaming will be reversed when each template is used
// We can continue to author ".gitignore" files in each template
for (const filepath of glob.sync("templates*/**/.gitignore")) {
for (const filepath of globSync("templates*/**/.gitignore")) {
await cp(filepath, filepath.replace(".gitignore", "__dot__gitignore"));
}
};
Expand Down
1 change: 0 additions & 1 deletion packages/pages-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"concurrently": "^8.2.2",
"esbuild": "catalog:default",
"eslint": "catalog:default",
"glob": "^10.4.5",
"html-rewriter-wasm": "^0.4.1",
"typescript": "catalog:default",
"vitest": "catalog:default"
Expand Down
2 changes: 1 addition & 1 deletion packages/vite-plugin-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"mlly": "^1.7.4",
"picocolors": "^1.1.1",
"semver": "^7.7.1",
"tinyglobby": "^0.2.12",
"tinyglobby": "catalog:default",
"tree-kill": "catalog:default",
"tsdown": "0.16.3",
"typescript": "catalog:default",
Expand Down
113 changes: 13 additions & 100 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ catalog:
eslint: "^9.39.1"
jsonc-parser: "^3.2.0"
smol-toml: "^1.5.2"
tinyglobby: "^0.2.12"
"tree-kill": "^1.2.2"
# CAUTION: Most usage of @cloudflare/vitest-pool-workers in this mono repo should use workspace:* instead of this catalog version
# However, some packages (pages-shared, workers-shared, etc...) need to be tested using vitest-pool-workers but are themselves
Expand Down
2 changes: 1 addition & 1 deletion tools/deployments/validate-package-dependencies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import { existsSync, readFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { glob } from "glob";
import { glob } from "tinyglobby";

export interface PackageJSON {
name: string;
Expand Down
2 changes: 1 addition & 1 deletion tools/deployments/validate-private-packages.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { readFileSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { glob } from "glob";
import { glob } from "tinyglobby";
import type { PackageJSON } from "./validate-fixtures";

if (require.main === module) {
Expand Down
12 changes: 4 additions & 8 deletions tools/e2e/runIndividualE2EFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import assert from "node:assert";
import { execSync } from "node:child_process";
import { statSync } from "node:fs";
import path from "node:path";
import { globIterateSync } from "glob";
import { globSync } from "tinyglobby";
import type { ExecSyncOptionsWithBufferEncoding } from "node:child_process";

// Turbo only supports caching on the individual task level, but for Wrangler's
Expand Down Expand Up @@ -34,13 +34,9 @@ const command =
const wranglerPath = path.join(__dirname, "../../packages/wrangler");
assert(statSync(wranglerPath).isDirectory());

let tests = Array.from(
globIterateSync("e2e/**/*.test.ts", {
cwd: wranglerPath,
// Return `/` delimited paths, even on Windows.
posix: true,
})
);
let tests = globSync("e2e/**/*.test.ts", {
cwd: wranglerPath,
});

const failedTest = new Set<string>();

Expand Down
Loading
Loading