0

i have installed a module @swimlane/ngx-charts using npm i @swimlane/ngx-charts . i see that in package.json @swimlane/ngx-charts has the version ^20.1.0 .

In npmjs.com , this module has 13 dependencies and d3-color is one of them with the latest version as 3.1.0.

package.lock.json as follows.

  "node_modules/@swimlane/ngx-charts": {
      "version": "20.1.0",
      "resolved": "https://registry.npmjs.org/@swimlane/ngx-charts/-/ngx-charts-20.1.0.tgz",
      "integrity": "somekey",
      "dependencies": {
        "@types/d3-shape": "^2.0.0",
        "d3-array": "^2.9.1",
        "d3-brush": "^2.1.0",
        "d3-color": "^2.0.0",
        "d3-format": "^2.0.0",
        "d3-hierarchy": "^2.0.0",
        "d3-interpolate": "^2.0.1",
        "d3-scale": "^3.2.3",
        "d3-selection": "^2.0.0",
        "d3-shape": "^2.0.0",
        "d3-time-format": "^3.0.0",
        "d3-transition": "^2.0.0",
        "tslib": "^2.0.0"
      },

for example, "d3-color" has "^2.0.0" but the latest version is 3.1.0.. how can i get the latest version for d3-color and other dependencies once npm i @swimlane/ngx-charts is executed?

tried executing the command using npm i @swimlane/ngx-charts --latest but the dependencies does not have latest versions.

  • You would have to change it here https://github.com/swimlane/ngx-charts/blob/master/package.json – Konrad Oct 28 '22 at 19:21

1 Answers1

0

The '^' prefix will get you all future releases that do not change the major version, so ^2.0.0 will get releases up to <3.0.0, not including 3.0.0. Similar to that, the '~' prefix behaves equally to minor versions.

You would need to set something like ^3.0.0 to get the major version 3.0.0 and above, untill <4.0.0. Have you tried using "@swimlane/ngx-charts@^3.0.0"? Or even try "@swimlane/ngx-charts@999", this last one will probably not exist so npm will display a list of versions to choose from.

Might be helpfull:

Another StackOverflow question on this subject

Introduction to SemVer

Luis Felipe
  • 13
  • 1
  • 4