{"action":"created","issue":{"url":"https://api.github.com/repos/dherges/ng-packagr/issues/814","repository_url":"https://api.github.com/repos/dherges/ng-packagr","labels_url":"https://api.github.com/repos/dherges/ng-packagr/issues/814/labels{/name}","comments_url":"https://api.github.com/repos/dherges/ng-packagr/issues/814/comments","events_url":"https://api.github.com/repos/dherges/ng-packagr/issues/814/events","html_url":"https://github.com/dherges/ng-packagr/issues/814","id":318445855,"number":814,"title":"[Feature Request] Support specifying which version of Angular Package Format to use","user":{"login":"johnmcase","id":314819,"avatar_url":"https://avatars2.githubusercontent.com/u/314819?v=4","gravatar_id":"","url":"https://api.github.com/users/johnmcase","html_url":"https://github.com/johnmcase","followers_url":"https://api.github.com/users/johnmcase/followers","following_url":"https://api.github.com/users/johnmcase/following{/other_user}","gists_url":"https://api.github.com/users/johnmcase/gists{/gist_id}","starred_url":"https://api.github.com/users/johnmcase/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnmcase/subscriptions","organizations_url":"https://api.github.com/users/johnmcase/orgs","repos_url":"https://api.github.com/users/johnmcase/repos","events_url":"https://api.github.com/users/johnmcase/events{/privacy}","received_events_url":"https://api.github.com/users/johnmcase/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-27T15:08:58Z","updated_at":"2018-04-29T10:47:07Z","closed_at":null,"author_association":"NONE","body":"## Type of Issue\r\n\r\n```\r\n[ ] Bug Report\r\n[X ] Feature Request\r\n```\r\n\r\n## Description\r\n\r\nCurrently each major version of ng-packagr only supports one version of the Angular Package Format, thus only targets one version of Angular:\r\n\r\n- 1.x supports Angular 4\r\n- 2.x supports Angular 5\r\n- 3.x supports Angular 6\r\n\r\n#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.\r\n\r\nI 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.\r\n\r\nI 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.\r\n"},"comment":{"url":"https://api.github.com/repos/dherges/ng-packagr/issues/comments/385242301","html_url":"https://github.com/dherges/ng-packagr/issues/814#issuecomment-385242301","issue_url":"https://api.github.com/repos/dherges/ng-packagr/issues/814","id":385242301,"user":{"login":"dherges","id":901354,"avatar_url":"https://avatars1.githubusercontent.com/u/901354?v=4","gravatar_id":"","url":"https://api.github.com/users/dherges","html_url":"https://github.com/dherges","followers_url":"https://api.github.com/users/dherges/followers","following_url":"https://api.github.com/users/dherges/following{/other_user}","gists_url":"https://api.github.com/users/dherges/gists{/gist_id}","starred_url":"https://api.github.com/users/dherges/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dherges/subscriptions","organizations_url":"https://api.github.com/users/dherges/orgs","repos_url":"https://api.github.com/users/dherges/repos","events_url":"https://api.github.com/users/dherges/events{/privacy}","received_events_url":"https://api.github.com/users/dherges/received_events","type":"User","site_admin":false},"created_at":"2018-04-29T10:47:07Z","updated_at":"2018-04-29T10:47:07Z","author_association":"OWNER","body":"It's a matrix-compatibility thing.\r\n\r\nThoughts:\r\n 1. Angular compiler 5 introduced metadata version 4. You cannot use metadata v4 in Angular 4 or prior.\r\n 2. APF is a set of artefacts trying to support a broad range of tools. You will be able to create an APF 6 package that continues to work even with older versions of Angular as long as you used an \"appropriate\" compiler version. (In fact, the angular compiler has version constraints on typescript and that's why ng-packagr uses the typescript and angular compiler version that the user has already installed in the project).\r\n 3. However, by the evolution of the Angular tooling some features (e.g. resource inlining) are being moved to the Angular compiler and thus (partially) removed from ng-packagr. At that point, ng-packagr has some version constraints on the angular compiler version (much like angular has on typescript).\r\n 4. In turn, ng-packagr has version constraints on angular compiler and that has version constraints on typescript and on and on and on. At some point, it implies constraints on both authors and consumers of a library. Example: you won't get an Angular 6-compiled metadata v4 library to go get to work in an Angular 4 app.\r\n\r\nAs 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 🌵 \r\n\r\nConclusion for me:\r\n- If you want the new and shiny things, go update.\r\n- v1 will continue to work\r\n- v2 will continue to work\r\n"}}
{"actor":{"display_login":"dherges"}}