Giter Club home page Giter Club logo

Comments (6)

g-plane avatar g-plane commented on June 12, 2024

This plugin can already list scripts that contains : as the picture in readme shows. Or, is the feature you mentioned different?

from zsh-yarn-autocompletions.

adrienharnay avatar adrienharnay commented on June 12, 2024

Hi, sorry if the description was not clear. I understand the plugin can already list scripts with : in their names, but per the docs it should also list scripts from other workspaces if they have : in their name.

Example:

root (scripts: lint, lint:all)
|____ package1 (scripts: test:local, test:package1)
|____ package2 (scripts: test:local, test:package2)
  1. If you try to run yarn lint:
    a. at the root, it works (the workspace defined it)
    b. in package1 and package2, it doesn't work (the script if not accessible from everywhere because it doesn't have : in its name

  2. If you try to run yarn lint:all
    a. at the root, it works (the workspace defined it)
    b. in package1 and package2, it works as well (the script is available from everywhere because it contains :)

  3. If you try to run yarn test:local
    a. at the root, it doesn't work (the script contains :, but it is defined in multiple workspaces and therefore can only be called from a workspace that defined it)
    b. in package1 and package2, it works (the workspaces defined it)

  4. If you try to run yarn test:package1
    a. at the root and in package2, it works (the script contains :, and is only defined by one workspace, so available everywhere)
    b. in package1, it works (the workspace defined it)

Currently, the plugin accounts for 1.a., 2.a., 3.b., 4.b.

I think it would need to also account for 2.b. and 4.a., while watching for 1.b. and 3.a.

Please let me know if this is clearer, and have a nice week-end!

from zsh-yarn-autocompletions.

g-plane avatar g-plane commented on June 12, 2024

This looks that it will increase the complexity, because this plugin should simulate as Yarn and do workspace resolution to read all packages in a workspace.

from zsh-yarn-autocompletions.

adrienharnay avatar adrienharnay commented on June 12, 2024

I think we can get the list of workspaces by reading the workspaces key in the root package.json, what do you think?

from zsh-yarn-autocompletions.

g-plane avatar g-plane commented on June 12, 2024

Actually, it allows globs. If we support globs, there will be two disadvantages:

  1. Logic will become complex for this plugin.
  2. Expanding globs will increase plugin startup time.

from zsh-yarn-autocompletions.

adrienharnay avatar adrienharnay commented on June 12, 2024

Alright, thanks anyway!

from zsh-yarn-autocompletions.

Related Issues (20)

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.