Giter VIP home page Giter VIP logo

traf's People

Contributors

arkus7 avatar dependabot[bot] avatar eladbezalel avatar itayper avatar mamatsunami avatar nexzhu avatar raz-ezra-lmnd avatar shaydavidson avatar yharaskrik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

traf's Issues

Support non-buildable projects/packages

Hi!
Thanks for the tool ๐Ÿ™‚
I recommend that you open the discussion section for Q&A.

I have an nx workspace with buildable apps that consume non-buildable packages.
Looking at the code these packages are filtered out which causes the command to not work properly.
The tsconfig path can be easily resolved once you have the project path.

nx graph

what is the command to run nx affected:graph ?

feature request: include library root folder changes as affected

Both in NX and Traf right now, if I change for example the package.json of a library (which can affect its build) - it doesn't end up in the "affected" list, hence I need to manually change something silly in the code (a comment, ordering) in order to trigger a build.

Can we somehow add that these kind of changes do count as "affected"? it doesn't need to add into the affected results the libraries that depend on my change, but only the library itself

Nx enhancement - Add option to list only affected libs/apps

When using regular nx print-affected you have an option to specify the --type option which allows you to filter only libs or only apps from the output.

It would be good to have a similar interface in traf so @traf/nx affected could be used as almost a drop-in replacement for nx print-affected.

Another option would be to specify in the JSON output the type of project so that users could filter it themselves but this approach is a breaking change as @traf/nx affected --json=true results in a JSON array with names of projects (array of strings).

Unable to resolve affected projects in Nx workspace (undefined `project.sourceRoot` because `project` is a string)

Hi,

Thanks for building this tool. I wanted to test this on my monorepo to see how it works. Unfortunately, I can't run the base command npx @traf/nx@latest affected as there is some issue with finding the project root.

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:121:11)
    at join (node:path:1172:7)
    at file:///Users/arkus/Projects/<project-name>/node_modules/@traf/nx/cli.js:237:27
    at Array.map (<anonymous>)
    at getNxTrueAffectedProjects (file:///Users/arkus/Projects/<project-name>/node_modules/@traf/nx/cli.js:233:19)
    at async affectedAction (file:///Users/arkus/Projects/<project-name>/node_modules/@traf/nx/cli.js:271:20)
    at async Object.handler (file:///Users/arkus/Projects/<project-name>/node_modules/@traf/nx/cli.js:361:5)

So it seems the issue is in this line

const projectRoot = join(project.sourceRoot, '..');

It seems like in my project the types are a bit different than traf expects them to be.

traf/libs/nx/src/nx.ts

Lines 7 to 19 in f49cdec

interface NxProject {
name: string;
sourceRoot: string;
projectType: 'application' | 'library';
implicitDependencies?: string[];
targets?: {
build?: {
options: {
tsConfig: string;
};
};
};
}

When I run the CLI command on my project, the project (which is expected to be of NxProject type) is just a string with the path to the project directory.

If I understood it correctly, the projects come from the workspace.json file, which is (at least for me) a map of { [projectName]: [pathToTheProject] }.

Is there something I'm missing in my setup to allow this tool to work? I updated the nx version to the 16.2.2 as it's here in package.json dependencies, but no luck.

Tasks

package.json and lock file changes

Hi,

The affected projects support for package lock changes is currently experimental, but when I tried with the experimental flag, it does not return the expected output.

I am using Nx version 18.2.3. I have 2 packages (is-even and is-odd) and 1 app (products) in my Nx integrated monorepo. The is-even package is being used by the products app.
When I upgrade a dependency (for exp - lodash) in is-even package.json, and run the affected command, it does not return the app name which will be affected for sure.

Expected output -
is-even
products

Received output -
Empty or is-even after making a few changes in the traf package code.

Angular - Support affected template change

Hi,

In Angular a component can be sperated into .ts and .html ( AKA template file ), I noticed that if I only make a change to the template file it doesn't pick up any affected libs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.