Giter VIP home page Giter VIP logo

midgard-yarn-strict's Introduction

midgard-yarn-strict

midgard-yarn-strict is a fork of midgard-yarn, which is itself a fork of yarn v1.

Improvements over yarn

  • midgard-yarn improves reliability and performance of yarn for large repositories.

  • midgard-yarn-strict adds strictness, which is necessary for a more deterministic package installations.

  • Scoping, midgard-yarn-strict can install only the dependencies of a subset of the workspaces. (eg. npx midgard-yarn-strict "build-tools-*" will only install the dependencies needed by the workspaces with name starting by "build-tools-")

Usage

Install

Instead of yarn install, run

$ npx midgard-yarn-strict

The installation flags supported by yarn are not supported by the CLI but some are still supported via the yarn config file.

Upgrade or add a dependency

Manual edits to the package.json files is the only current supported way to manage dependencies, no CLI tool is available yet.

yarn link

Not supported (yet).

yarn run

The yarn-run command is not affected by midgard-yarn-strict, so you can still run yarn test for example.

Strictness

Strictness means that workspaces can only use the dependencies that they declare in their package.json. This makes the dependency management processes more predictable.

Configuration

midgard-yarn-strict allows you to declare dependencies on behalf of external packages, this is useful when external packages forgot to declare all their dependencies.

Example: package.json

{
  // rest of package.json
  "extraDependencies": {
    "webpack": {
      "^4.0.0": {
        "dependencies": {
          "webpack-cli": "^4.0.0"
        }
      }
    }
  }
}

Long term

This package is meant as a stopgap solution while waiting for npm to support strictness.

Prior art

This package manager is built on the learnings brought by npm, yarn and pnpm.

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.