fix(ivy): enable flat module index production in Bazel (#27655)
ngtsc now produces flat module index files when that option is enabled in tsconfig, but Bazel still needs the output declared in order for them to be passed through. This fixes some tests which verify this behavior on Bazel. FW-738 #resolve PR Close #27655
This commit is contained in:
parent
e269274bcd
commit
6b96931576
|
@ -201,13 +201,14 @@ def _expected_outs(ctx):
|
|||
metadata_files += [ctx.actions.declare_file(basename + ext) for ext in metadata]
|
||||
|
||||
# We do this just when producing a flat module index for a publishable ng_module
|
||||
if is_legacy_ngc and _should_produce_flat_module_outs(ctx):
|
||||
if _should_produce_flat_module_outs(ctx):
|
||||
flat_module_out = _flat_module_out_file(ctx)
|
||||
devmode_js_files.append(ctx.actions.declare_file("%s.js" % flat_module_out))
|
||||
closure_js_files.append(ctx.actions.declare_file("%s.closure.js" % flat_module_out))
|
||||
bundle_index_typings = ctx.actions.declare_file("%s.d.ts" % flat_module_out)
|
||||
declaration_files.append(bundle_index_typings)
|
||||
metadata_files.append(ctx.actions.declare_file("%s.metadata.json" % flat_module_out))
|
||||
if is_legacy_ngc:
|
||||
metadata_files.append(ctx.actions.declare_file("%s.metadata.json" % flat_module_out))
|
||||
else:
|
||||
bundle_index_typings = None
|
||||
|
||||
|
|
|
@ -73,10 +73,8 @@ describe('@angular/core ng_package', () => {
|
|||
|
||||
|
||||
describe('typescript support', () => {
|
||||
|
||||
fixmeIvy('FW-738: ngtsc doesn\'t generate flat index files')
|
||||
.it('should have an index d.ts file',
|
||||
() => { expect(shx.cat('core.d.ts')).toContain(`export *`); });
|
||||
it('should have an index d.ts file',
|
||||
() => { expect(shx.cat('core.d.ts')).toContain(`export *`); });
|
||||
|
||||
it('should not have amd module names',
|
||||
() => { expect(shx.cat('public_api.d.ts')).not.toContain('<amd-module name'); });
|
||||
|
|
Loading…
Reference in New Issue