angular-cn/packages/compiler-cli/ngcc/test
Elvis Begovic f8b995dbf9 fix(ngcc): ignore format properties that exist but are undefined (#32205)
Previously, `ngcc` assumed that if a format property was defined in
`package.json` it would point to a valid format-path (i.e. a file that
is an entry-point for a specific format). This is generally the case,
except if a format property is set to a non-string value (such as
`package.json`) - either directly in the `package.json` (which is unusual)
or in ngcc.config.js (which is a valid usecase, when one wants a
format property to be ignored by `ngcc`).

For example, the following config file would cause `ngcc` to throw:

```
module.exports = {
  packages: {
    'test-package': {
      entryPoints: {
        '.': {
          override: {
            fesm2015: undefined,
          },
        },
      },
    },
  },
};
```

This commit fixes it by ensuring that only format properties whose value
is a string are considered by `ngcc`.

For reference, this regression was introduced in #32052.

Fixes #32188

PR Close #32205
2019-08-20 09:55:25 -07:00
..
analysis refactor(ivy): ngcc - remove `formatProperty` from `EntryPointBundle` (#32052) 2019-08-08 11:14:38 -07:00
dependencies fix(ngcc): handle deep imports that already have an extension (#32181) 2019-08-19 10:12:03 -07:00
entry_point_finder fix(ivy): ngcc - handle pathMappings to files rather then directories (#30525) 2019-07-09 09:40:46 -07:00
helpers fix(ivy): ngcc should only index .d.ts exports within the package (#32129) 2019-08-15 14:46:00 -07:00
host fix(ivy): ngcc should only index .d.ts exports within the package (#32129) 2019-08-15 14:46:00 -07:00
integration fix(ngcc): ignore format properties that exist but are undefined (#32205) 2019-08-20 09:55:25 -07:00
logging feat(compiler-cli): ngcc - make logging more configurable (#29591) 2019-04-01 11:53:28 -07:00
migrations refactor(ivy): ngcc - remove `formatProperty` from `EntryPointBundle` (#32052) 2019-08-08 11:14:38 -07:00
packages feat(ivy): show error when trying to publish NGCC'd packages (#32031) 2019-08-08 11:17:38 -07:00
rendering refactor(ivy): combine query load instructions (#32100) 2019-08-12 10:32:08 -07:00
writing fix(ivy): ngcc - correctly update `package.json` when `createNewEntryPointFormats` is true (#32052) 2019-08-08 11:14:38 -07:00
BUILD.bazel feat(ivy): ngcc - support ngcc "migrations" (#31544) 2019-07-23 21:11:40 -07:00
utils_spec.ts refactor(ivy): ngcc - implement new module resolver (#29643) 2019-04-29 12:37:21 -07:00