common-versions.json 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /**
  2. * This configuration file specifies NPM dependency version selections that affect all projects
  3. * in a Rush repo. More documentation is available on the Rush website: https://rushjs.io
  4. */
  5. {
  6. "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/common-versions.schema.json",
  7. /**
  8. * A table that specifies a "preferred version" for a given NPM package. This feature is typically used
  9. * to hold back an indirect dependency to a specific older version, or to reduce duplication of indirect dependencies.
  10. *
  11. * The "preferredVersions" value can be any SemVer range specifier (e.g. "~1.2.3"). Rush injects these values into
  12. * the "dependencies" field of the top-level common/temp/package.json, which influences how the package manager
  13. * will calculate versions. The specific effect depends on your package manager. Generally it will have no
  14. * effect on an incompatible or already constrained SemVer range. If you are using PNPM, similar effects can be
  15. * achieved using the pnpmfile.js hook. See the Rush documentation for more details.
  16. *
  17. * After modifying this field, it's recommended to run "rush update --full" so that the package manager
  18. * will recalculate all version selections.
  19. */
  20. "preferredVersions": {
  21. /**
  22. * When someone asks for "^1.0.0" make sure they get "1.2.3" when working in this repo,
  23. * instead of the latest version.
  24. */
  25. // "some-library": "1.2.3"
  26. },
  27. /**
  28. * When set to true, for all projects in the repo, all dependencies will be automatically added as preferredVersions,
  29. * except in cases where different projects specify different version ranges for a given dependency. For older
  30. * package managers, this tended to reduce duplication of indirect dependencies. However, it can sometimes cause
  31. * trouble for indirect dependencies with incompatible peerDependencies ranges.
  32. *
  33. * The default value is true. If you're encountering installation errors related to peer dependencies,
  34. * it's recommended to set this to false.
  35. *
  36. * After modifying this field, it's recommended to run "rush update --full" so that the package manager
  37. * will recalculate all version selections.
  38. */
  39. // "implicitlyPreferredVersions": false,
  40. /**
  41. * The "rush check" command can be used to enforce that every project in the repo must specify
  42. * the same SemVer range for a given dependency. However, sometimes exceptions are needed.
  43. * The allowedAlternativeVersions table allows you to list other SemVer ranges that will be
  44. * accepted by "rush check" for a given dependency.
  45. *
  46. * IMPORTANT: THIS TABLE IS FOR *ADDITIONAL* VERSION RANGES THAT ARE ALTERNATIVES TO THE
  47. * USUAL VERSION (WHICH IS INFERRED BY LOOKING AT ALL PROJECTS IN THE REPO).
  48. * This design avoids unnecessary churn in this file.
  49. */
  50. "allowedAlternativeVersions": {
  51. /**
  52. * For example, allow some projects to use an older TypeScript compiler
  53. * (in addition to whatever "usual" version is being used by other projects in the repo):
  54. */
  55. // "typescript": [
  56. // "~2.4.0"
  57. // ]
  58. }
  59. }