@ms-cloudpack/package-overrides
TypeScript icon, indicating that this package has built-in type declarations

0.8.4 • Public • Published

@ms-cloudpack/package-overrides

Provides package.json patches for packages, which allows for providing missing parts such as exports maps. The @ms-cloudpack/package-utilities package uses this package to fill in missing details for common packages.

API

applyOverrides(definition: PackageJson): PackageJson

Returns a new definition which merges the given definition and overrides (if available.)

Adding overrides

Exports maps and other missing data are welcome to be added under the src/packages/{packageName}/overrides.json files. The format is simple:

[
  {
    "version": "<1",     // semver range match,
    "overrides": { ... } // package.json definition merged on top of the definition.
  }
]

Special cases

Sometimes overrides are required but specific to an application, and don't belong in this package. In these cases, you can provide your own per-package overrides in your application's package.json file:

{
  "name": "my-app",
  "version": "1.0.0",

  "cloudpack": {
    "packageOverrides": {
      "react": [
        {
          "version": "^16",
          "overrides": { ... }
        }
      ]
    }
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @ms-cloudpack/package-overrides

Weekly Downloads

1,000

Version

0.8.4

License

MIT

Unpacked Size

9.52 kB

Total Files

15

Last publish

Collaborators

  • ecraig12345_msft
  • uifabricteam
  • dzearing