Giter Club home page Giter Club logo

Comments (12)

scinos avatar scinos commented on May 11, 2024 1

It makes a lot of sense to use the new plugin framework.

I'll try to look into writing a plugin (or reviving https://github.com/eps1lon/yarn-plugin-deduplicate) soon, first I need to understand how the plugin system works and get my hands on a few yarn v2 repos with duplicated packages to test everything.

If anyone wants to start working on it meanwhile, it would be great :)

from yarn-deduplicate.

scinos avatar scinos commented on May 11, 2024 1

There is also this yarnpkg/berry#1558

from yarn-deduplicate.

christophehurpeau avatar christophehurpeau commented on May 11, 2024 1

@JounQin note that I have working fork here https://github.com/christophehurpeau/yarn-deduplicate / https://www.npmjs.com/package/yarn-berry-deduplicate
I hope to convert it to a yarn plugin some day if this is still not implemented in yarn

from yarn-deduplicate.

Bnaya avatar Bnaya commented on May 11, 2024

yarn berry is under very active development,
I believe it will be possible to bake that into it

from yarn-deduplicate.

SimenB avatar SimenB commented on May 11, 2024

@scinos @rjatkins any thoughts on this? For v2/berry it could be designed as a plugin rather than a separate tool, so we could run yarn deduplicate instead of yarn-deduplicate. I.e. the approach of (the unmaintained?) https://github.com/eps1lon/yarn-plugin-deduplicate

from yarn-deduplicate.

SimenB avatar SimenB commented on May 11, 2024

^ just landed, so I guess this can be closed?

from yarn-deduplicate.

JounQin avatar JounQin commented on May 11, 2024

yarnplugins/yarn-plugin-deduplicate#13

I hope we can reconsider this.

I'll raise a PR for it like ds300/patch-package#507.

from yarn-deduplicate.

JounQin avatar JounQin commented on May 11, 2024

@christophehurpeau Thanks for your information, but I'd like to raise a PR for yarn-deduplicate itself to support yarn v1 and v2+ at the same time~

from yarn-deduplicate.

scinos avatar scinos commented on May 11, 2024

Yarn V2+ supports yarn dedupe natively. What's the goal of adding support for V2 to this tool?

from yarn-deduplicate.

JounQin avatar JounQin commented on May 11, 2024

Yarn V2+ supports yarn dedupe natively. What's the goal of adding support for V2 to this tool?

It doesn't support --strategy fewer, yet.

See also yarnpkg/berry#2297

from yarn-deduplicate.

scinos avatar scinos commented on May 11, 2024

Looks like nobody is opposed to add the fewer strategy to Yarn.

I haven't looked at the yarn dedupe code in ages, but, from memory, it was really similar to yarn-deduplicate. Meaning that implementing the strategy should be relatively easy.

I may have some time this week to have a look.

from yarn-deduplicate.

JounQin avatar JounQin commented on May 11, 2024

I may have some time this week to have a look.

Do you mean you want to work this this week? That would be great! I and my colleague were going to working on this feature also but on yarn-deduplicate's side.

The benefit is, we can use prepare: yarn-duplicate script to run yarn-duplicate every time on installation. But prepare: yarn dedupe will run into a dead loop, at least for now.

(For prepare script support for yarn berry, see also https://github.com/un-es/yarn-plugin-prepare-lifecycle)


Besides, can we reopen this issue first?

from yarn-deduplicate.

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.