Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespace import disappeared in output #319

Closed
davidlj95 opened this issue Apr 19, 2024 · 3 comments
Closed

Namespace import disappeared in output #319

davidlj95 opened this issue Apr 19, 2024 · 3 comments
Assignees
Labels
Milestone

Comments

@davidlj95
Copy link

davidlj95 commented Apr 19, 2024

Bug report

Namespace import disappeared starting from version 9.4.0

My use case is generating a bundle from Typescript definition files emitted after building an Angular library. But could reproduce it manually. See:

https://github.com/davidlj95/dts-bundle-generator-missing-import-repro

Fortunately, the check step found out the output was missing that import

Input code

import { ModuleWithProviders } from '@angular/core';
import * as i0 from "@angular/core";

export declare class SampleModule {
    static forRoot(): ModuleWithProviders<unknown>;
    static ɵfac: i0.ɵɵFactoryDeclaration<unknown, never>;
    static ɵmod: i0.ɵɵNgModuleDeclaration<unknown, never, never, never>;
    static ɵinj: i0.ɵɵInjectorDeclaration<unknown>;
}

Expected output

// Generated by dts-bundle-generator v9.4.0
import { ModuleWithProviders } from '@angular/core';
import * as i0 from "@angular/core";

export declare class SampleModule {
	static forRoot(): ModuleWithProviders<unknown>;
	static ɵfac: i0.ɵɵFactoryDeclaration<unknown, never>;
	static ɵmod: i0.ɵɵNgModuleDeclaration<unknown, never, never, never>;
	static ɵinj: i0.ɵɵInjectorDeclaration<unknown>;
}

export {};

Actual output

// Generated by dts-bundle-generator v9.4.0

import { ModuleWithProviders } from '@angular/core';

export declare class SampleModule {
	static forRoot(): ModuleWithProviders<unknown>;
	static ɵfac: i0.ɵɵFactoryDeclaration<unknown, never>;
	static ɵmod: i0.ɵɵNgModuleDeclaration<unknown, never, never, never>;
	static ɵinj: i0.ɵɵInjectorDeclaration<unknown>;
}

export {};

Additional context
Add any other context about the problem here (CLI options, etc)

See minimal repro repo
https://github.com/davidlj95/dts-bundle-generator-missing-import-repro

@davidlj95 davidlj95 changed the title Namespace import disappeared Namespace import disappeared in output Apr 19, 2024
@timocov timocov added the Bug label Apr 21, 2024
@timocov timocov self-assigned this Apr 21, 2024
@timocov timocov added this to the 9.5 milestone Apr 21, 2024
@timocov
Copy link
Owner

timocov commented Apr 21, 2024

Broken in eb862bf

@timocov
Copy link
Owner

timocov commented Apr 21, 2024

Thanks for reporting the issue! The fix has been published in v9.5.1.

@davidlj95
Copy link
Author

Awesome 💪 Thanks to you for this great project ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants