From 93c2b1273fc092e8d46f5ca0e31bc23cf838aa9e Mon Sep 17 00:00:00 2001 From: Tony Drake Date: Thu, 1 Jun 2023 17:27:44 -0400 Subject: [PATCH] Use fast-glob as a dependency --- package.json | 2 +- src/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 5a38b17..691390c 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,6 @@ "esbuild": "*" }, "dependencies": { - "glob": "^10.0.0" + "fast-glob": "^3.2.12" } } diff --git a/src/index.js b/src/index.js index ca0005d..bd0a5c8 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,5 @@ const path = require('path') -const { globSync } = require('glob') +const fg = require('fast-glob') // This plugin adds support for globs like "./**/*" to import an entire directory // We can use this to import arbitrary files or Stimulus controllers and ActionCable channels @@ -27,7 +27,7 @@ const railsPlugin = (options = { matcher: /.+\..+/ }) => ({ // Get a list of all files in the directory // [ 'accounts_controller.js', ... ] let files = ( - globSync(args.pluginData.path, { + fg.globSync(args.pluginData.path, { cwd: args.pluginData.resolveDir, }) )