build(scripts): replace glob with tinyglobby (#2041)

This commit is contained in:
Eric Liu 2024-11-10 10:07:51 -08:00
commit c7529fe3f8
3 changed files with 11 additions and 9 deletions

15
package-lock.json generated
View file

@ -30,6 +30,7 @@
"sveld": "^0.21.0", "sveld": "^0.21.0",
"svelte": "^4.2.10", "svelte": "^4.2.10",
"svelte-check": "^3.8.6", "svelte-check": "^3.8.6",
"tinyglobby": "^0.2.10",
"typescript": "^5.6.3" "typescript": "^5.6.3"
} }
}, },
@ -3342,12 +3343,12 @@
} }
}, },
"node_modules/tinyglobby": { "node_modules/tinyglobby": {
"version": "0.2.6", "version": "0.2.10",
"resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.6.tgz", "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.10.tgz",
"integrity": "sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==", "integrity": "sha512-Zc+8eJlFMvgatPZTl6A9L/yht8QqdmUNtURHaKZLmKBE12hNPSrqNkUp2cs3M/UKmNVVAMFQYSjYIVHDjW5zew==",
"dev": true, "dev": true,
"dependencies": { "dependencies": {
"fdir": "^6.3.0", "fdir": "^6.4.2",
"picomatch": "^4.0.2" "picomatch": "^4.0.2"
}, },
"engines": { "engines": {
@ -3355,9 +3356,9 @@
} }
}, },
"node_modules/tinyglobby/node_modules/fdir": { "node_modules/tinyglobby/node_modules/fdir": {
"version": "6.3.0", "version": "6.4.2",
"resolved": "https://registry.npmjs.org/fdir/-/fdir-6.3.0.tgz", "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.4.2.tgz",
"integrity": "sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==", "integrity": "sha512-KnhMXsKSPZlAhp7+IjUkRZKPb4fUyccpDrdFXbi4QL1qkmFh9kVY09Yox+n4MaOb3lHZ1Tv829C3oaaXoMYPDQ==",
"dev": true, "dev": true,
"peerDependencies": { "peerDependencies": {
"picomatch": "^3 || ^4" "picomatch": "^3 || ^4"

View file

@ -61,6 +61,7 @@
"sveld": "^0.21.0", "sveld": "^0.21.0",
"svelte": "^4.2.10", "svelte": "^4.2.10",
"svelte-check": "^3.8.6", "svelte-check": "^3.8.6",
"tinyglobby": "^0.2.10",
"typescript": "^5.6.3" "typescript": "^5.6.3"
}, },
"standard-version": { "standard-version": {

View file

@ -1,5 +1,5 @@
const fs = require("node:fs"); const fs = require("node:fs");
const glob = require("glob"); const { globSync }= require("tinyglobby");
const { sveld } = require("sveld"); const { sveld } = require("sveld");
const pkg = require("../package.json"); const pkg = require("../package.json");
@ -21,7 +21,7 @@ sveld({
}, },
}); });
glob.sync("./src/**/*.d.ts").forEach((file) => { globSync(["./src/**/*.d.ts"]).forEach((file) => {
console.log("Copying", file, " to types/"); console.log("Copying", file, " to types/");
fs.copyFileSync(file, file.replace(/src/, "types")); fs.copyFileSync(file, file.replace(/src/, "types"));
}); });