refactor(ivy): ngcc - expose the package name from EntryPoint (#26236)

PR Close #26236
This commit is contained in:
Pete Bacon Darwin
2018-10-03 11:46:57 +01:00
committed by Jason Aden
parent 3ac8a63499
commit 807070fe83
3 changed files with 9 additions and 3 deletions

View File

@ -94,7 +94,7 @@ function restoreRealFileSystem() {
}
function createEntryPoint(path: string): EntryPoint {
return {path, package: '', typings: ''};
return {name: 'some-package', path, package: '', typings: ''};
}
describe('Marker files', () => {

View File

@ -18,6 +18,7 @@ describe('getEntryPointInfo()', () => {
() => {
const entryPoint = getEntryPointInfo('/some_package', '/some_package/valid_entry_point');
expect(entryPoint).toEqual({
name: 'some-package',
package: '/some_package',
path: '/some_package/valid_entry_point',
typings: `/some_package/valid_entry_point/valid_entry_point.d.ts`,
@ -83,6 +84,7 @@ function restoreRealFileSystem() {
function createPackageJson(packageName: string, {exclude}: {exclude?: string} = {}): string {
const packageJson: any = {
name: 'some-package',
typings: `./${packageName}.d.ts`,
fesm2015: `./fesm2015/${packageName}.js`,
esm2015: `./esm2015/${packageName}.js`,