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

feat(nx): Some files declare dependencies or tasks (Nx targets) of a project and should render the project affected if changed #27

Closed

Conversation

NexZhu
Copy link
Contributor

@NexZhu NexZhu commented Dec 21, 2023

Some files declare dependencies or tasks (Nx targets) of a project and should render the project affected if changed. Currently considered:

['package.json', 'nx.json', 'project.json']

@EladBezalel
Copy link
Collaborator

EladBezalel commented Dec 21, 2023

Hey, thanks for this!

My approach in this project is less specific and more generic kind of approach, i try to auto-detect all changed files based on the repo instead of relying on nx config.

Also, the core project is meant to be generic and not related to nx or any other monorepo management tool

This pr just got merged,
It automatically detects changes to package-lock files and triggers affected. i think it will solve your need.

@NexZhu NexZhu force-pushed the feat/dep-task-declaration-files branch from 40cf9b0 to 7af5a10 Compare December 21, 2023 12:29
…asks (Nx targets) of a project and should render the project affected if changed
@NexZhu NexZhu force-pushed the feat/dep-task-declaration-files branch from 7af5a10 to d08e406 Compare December 22, 2023 02:58
@NexZhu
Copy link
Contributor Author

NexZhu commented Dec 22, 2023

The problem is the build/test/lint... comamnds are defined in Nx nx.json project.json etc so if they are changed, the tasks definately need to be re-run (for example in CI).

Maybe we can add a option in the core to detect if certain files have canged and pass nxjson project.json to core from @traf/nx?

@EladBezalel
Copy link
Collaborator

@NexZhu
Copy link
Contributor Author

NexZhu commented Dec 26, 2023

We have the includeFiles options in the nx cli https://github.com/lemonade-hq/traf/blob/684b4b27b2268715bc84cbb2fda6fca470062c6c/libs/nx/src/cli.ts#L46C53-L46C53

OK, I think this will work for us for now, thank you!

@NexZhu NexZhu closed this Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants