[Feature Request] Support specifying which version of Angular Package Format to use
See original GitHub issueType of Issue
[ ] Bug Report
[X ] Feature Request
Description
Currently each major version of ng-packagr only supports one version of the Angular Package Format, thus only targets one version of Angular:
- 1.x supports Angular 4
- 2.x supports Angular 5
- 3.x supports Angular 6
#344 Demonstrates that a package built targeting Angular 5 cannot be consumed by Angular 4. As a library developer, I want my package to be consumed by as many versions of Angular as possible.
I know I can simply stick to the 1.x version of ng-packagr to target Angular 4, but I still want to have all of the other goodies and bug fixes that you are releasing with the latest version.
I propose having some kind of command-line switch or a property added to ng-package.schema.json that would support specifying which version of the APF I want to target.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Angular package format
This document describes the Angular Package Format (APF). APF is an Angular specific specification for the structure and format of npm packages that...
Read more >Angular versioning and releases
Angular version numbers indicate the level of changes that are introduced by the release. This use of semantic versioning helps you understand the...
Read more >Angular v13 is now Available
This latest release brings all sorts of updates and features to help your teams build great apps. Get Angular v13 now by running...
Read more >Feature modules - Angular
A feature module delivers a cohesive set of functionality focused on a specific application need such as a user workflow, routing, or forms....
Read more >Workspace npm dependencies - Angular
The Angular Framework, Angular CLI, and components used by Angular applications are packaged as npm packages and distributed using the npm registry.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It’s a matrix-compatibility thing.
Thoughts:
As you said there are much factors influencing what versions are supported. That’s where the “matrix-compatibility” term comes in. It’s at most possible to support a limited set of version combinations. And it’s impossible to make any guarantees or long-term plans for such upfront. Right now, ng-packagr@3 works with both ng@5 and ng@6 but who am I to know whether that continues in ng@7? I do not know the future 🌵
Conclusion for me:
Sooner or later, this feature need to be done, even if it is difficult.
Even in a dream world where everyone want and can update quickly, it is absolutely impossible that all Angular apps are up to date on day one of a new major release. So even in this dream world, there is a least a few days/weeks/months where some apps will be on the older version, and some others will already be updated.
In fact, now that ng-packagr is an official part of the CLI, this feature is a requirement if Angular wants to respect LTS support.
One option would be to have a directory for each major version with its own
node_modules
.As a library author, this issue is why I don’t use
ng-packagr
as I want to provide proper LTS support for users.