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

globAsync (devkit) does not have same behavior as glob #29564

Open
1 of 4 tasks
mpsanchis opened this issue Jan 9, 2025 · 0 comments
Open
1 of 4 tasks

globAsync (devkit) does not have same behavior as glob #29564

mpsanchis opened this issue Jan 9, 2025 · 0 comments

Comments

@mpsanchis
Copy link
Contributor

Current Behavior

Hi guys!

While developing my own plugin, I found the following issue:

Passing a "mock" tree in a test to globAsync returns files that match the glob in the repo where the test is being executed.

Expected Behavior

globAsync should only return files matching in the tree being passed, as glob does

GitHub Repo

https://github.com/mpsanchis/nx-basic-repo

Steps to Reproduce

  1. Run npx nx run my-plugin:test
  2. Verify that tests being run with glob (deprecated) run OK because they only found the mock files. The globAsync fails because it finds the local files of the repo, that have nothing to do with the test.

Nx Report

Node           : 18.20.2
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 8.8.0

nx                 : 19.6.2
@nx/js             : 19.6.2
@nx/jest           : 19.6.2
@nx/linter         : 19.6.2
@nx/eslint         : 19.6.2
@nx/workspace      : 19.6.2
@nx/devkit         : 19.6.2
@nx/eslint-plugin  : 19.6.2
@nx/playwright     : 19.6.2
@nx/plugin         : 19.6.2
@nx/react          : 19.6.2
@nrwl/tao          : 19.6.2
@nx/vite           : 19.6.2
@nx/web            : 19.6.2
@nx/webpack        : 19.6.2
typescript         : 5.5.4
---------------------------------------
Registered Plugins:
@nx/webpack/plugin
@nx/eslint/plugin
@nx/playwright/plugin
@nx/jest/plugin

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant