Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace glob-all with fast-glob #7348

Merged
merged 3 commits into from
Dec 9, 2024
Merged
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
2 changes: 1 addition & 1 deletion buildprocess/generate-cesium-declarations.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

const fs = require("fs");
const path = require("path");
const glob = require("glob-all");
const glob = require("fast-glob");

const cesiumDeclarationFile = require.resolve("terriajs-cesium/index.d.ts");
const cesiumDirectory = path.dirname(cesiumDeclarationFile);
Expand Down
15 changes: 9 additions & 6 deletions buildprocess/webpack.config.make.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,25 @@
var glob = require("glob-all");
"use strict";

var glob = require("fast-glob");
var configureWebpack = require("./configureWebpack");
var path = require("path");
var MiniCssExtractPlugin = require("mini-css-extract-plugin");

//var testGlob = ['./test/**/*.js', './test/**/*.jsx', '!./test/Utility/*.js'];
var testGlob = [
//const testGlob = ['./test/**/*.js', './test/**/*.jsx', '!./test/Utility/*.js'];
const testGlob = [
"./test/SpecMain.ts",
"./test/**/*Spec.ts",
"./test/**/*Spec.tsx",
"./test/Models/Experiment.ts"
];

console.log(glob.sync(testGlob));
const files = glob.sync(testGlob);
console.log(files);
module.exports = function (hot, dev) {
const terriaJSBasePath = path.resolve(__dirname, "../");
var config = {
let config = {
mode: dev ? "development" : "production",
entry: glob.sync(testGlob),
entry: files,
output: {
path: path.resolve(__dirname, "..", "wwwroot", "build"),
filename: "TerriaJS-specs.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,10 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-react": "^7.19.0",
"eslint-plugin-react-hooks": "^4.6.0",
"fast-glob": "^3.3.2",
"fetch-mock": "^11.1.5",
"fork-ts-checker-notifier-webpack-plugin": "^6.0.0",
"fork-ts-checker-webpack-plugin": "^6.0.0",
"glob-all": "^3.0.1",
"husky": "^8.0.3",
"istanbul-instrumenter-loader": "^3.0.1",
"jasmine-ajax": "^4.0.0",
Expand Down
21 changes: 12 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5674,6 +5674,17 @@ fast-glob@^3.2.4, fast-glob@^3.2.9:
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-glob@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129"
integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==
dependencies:
"@nodelib/fs.stat" "^2.0.2"
"@nodelib/fs.walk" "^1.2.3"
glob-parent "^5.1.2"
merge2 "^1.3.0"
micromatch "^4.0.4"

fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
Expand Down Expand Up @@ -6226,14 +6237,6 @@ getpass@^0.1.1:
dependencies:
assert-plus "^1.0.0"

glob-all@^3.0.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/glob-all/-/glob-all-3.2.1.tgz#082ca81afd2247cbd3ed2149bb2630f4dc877d95"
integrity sha512-x877rVkzB3ipid577QOp+eQCR6M5ZyiwrtaYgrX/z3EThaSPFtLDwBXFHc3sH1cG0R0vFYI5SRYeWMMSEyXkUw==
dependencies:
glob "^7.1.2"
yargs "^15.3.1"

glob-parent@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae"
Expand Down Expand Up @@ -6283,7 +6286,7 @@ glob-watcher@^6.0.0:
async-done "^2.0.0"
chokidar "^3.5.3"

glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7:
glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7:
version "7.2.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b"
integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==
Expand Down
Loading