Semantic Versioning with NPM

Поділитися
Вставка
  • Опубліковано 18 гру 2024

КОМЕНТАРІ • 13

  • @nurba_nurba
    @nurba_nurba 2 роки тому

    Sitting in office, working on some versioning stuff, and then I stumbled across your video, seems like this is a golden asmr video

  • @rashigupta5995
    @rashigupta5995 2 роки тому

    Thank you for this golden information!

  • @ricardovaltierra8858
    @ricardovaltierra8858 2 роки тому

    Great explanation!

  • @dmytromoroz4451
    @dmytromoroz4451 3 роки тому

    Great explanation. Thanks!

  • @zainsyed9811
    @zainsyed9811 5 років тому

    Thanks for the great explanation Steve. One quick question: At 9:17 you installed 'npm i P jquery@~3.3.0' which means it will install 3.3 and any PATCH number higher than 0. But in the package.json file this shows as 'jquery: ^3.3.1' which means NOW when we run yarn or npm i in this project it will install any jquery which has a MINOR or PATCH value more than 3.1 . In the package.json file shouldnt it instead show as 'jquery: ~3.3.1' (i.e with a tilda in front so it only updates patch number - because that is how we ran the install initially?) Cheers

    • @SteveGriffith-Prof3ssorSt3v3
      @SteveGriffith-Prof3ssorSt3v3  5 років тому +4

      Great question. The ~ will be used to determine which version to install. So, if I was installing a package that had 2.2.1, 2.2.2, 2.2.3, and 2.2.4 and I said npm i pkg@~2.2.2 then npm will look at all the 2.2.x versions and give me the highest patch version.
      When it gets saved in the package.json file, npm semver considers all changes except major version changes to be additive but non-breaking. That means, it will, by default use ^ as the start of the entry.
      If you run "npm i" the next update will update both the minor and patch versions.
      If you want to cap it at 2.2.x without allowing the minor version updates then you will need to edit the package.json file on your own to change "~" to "^".

    • @zainsyed9811
      @zainsyed9811 5 років тому +1

      @@SteveGriffith-Prof3ssorSt3v3 Thanks Steve that really clears things up :) much appreciated!

  • @alvin_lal
    @alvin_lal 3 роки тому

    thanks sir , this was very helpful

  • @Colstonewall
    @Colstonewall 6 років тому +1

    Oh, wow, I like that Semver Calc. Could've used that the other day in a MEAN Project. Thanks Steve!

  • @hellosouvik
    @hellosouvik 3 роки тому

    Thanks for sharing....

  • @firojsiddiki2750
    @firojsiddiki2750 3 роки тому

    great video

  • @DeViLTh0rn
    @DeViLTh0rn 3 роки тому

    this is gold!

  • @mohamedyoussef8835
    @mohamedyoussef8835 2 роки тому

    Great explanation - Thank You