0

Theoretically speaking I'm trying to figure out when a web component linter reading package.json for JSPM web component dependencies can determine whether a web component dependency graph can be constructed without having any duplicate web components based on the Semver Guidelines.

I'll just assume we are only talking about dependencies that are compatible. For example all dependencies list Polymer 1.0^ as a peer dependency.

IIUC all dependencies that don't have major version breaks are compatible. So for example if one component lists paper-input:1.3.0^ and another lists paper-input:1.5.0^ then JSPM can just install the latest version of paper-input below 2.0.0, and the components that require it will use that one version. On the other hand if there's a component that requires paper-input:3.4.0^ then the linter can report that there's a transitive dependency that will require having duplicate components.

Am I missing anything?

Ole
  • 41,793
  • 59
  • 191
  • 359

1 Answers1

0

You are not missing anything. If all your dependencies follow semantic versioning properly you should be safe following this logic.

Whenever there is a breaking change the major version should be bumped. Any change to either a minor or patch version should still keep the package totally backwards compatible with versions that have a lower precedence and belong to the same major version.

fmello
  • 563
  • 2
  • 9