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

fix(spectacular): remove @angular/forms dependency #21

Merged
merged 2 commits into from
Mar 3, 2021

Conversation

LayZeeDK
Copy link
Member

@LayZeeDK LayZeeDK commented Mar 3, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our guidelines: CONTRIBUTING.md#commit
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[x] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[x] Build related changes
[x] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

@angular/forms and rxjs are listed as dependencies in the Spectacular bundle.

Spectacular doesn't have a dependency on @angular/forms and only uses type imports from rxjs.

Issue Number: N/A

What is the new behavior?

  • @angular/forms is not listed in Spectacular's bundle.
  • rxjs is listed as a peer dependency in Spectacular's bundle.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

Comment on lines +132 to +135
- name: 'Spectacular: Remove @angular/forms dependency'
run:
pnpx json -I -f dist/packages/spectacular/package.json -e "delete
this.dependencies['@angular/forms'];" || true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would the @angular/forms dependency be in the package.json if originally is not there?

Copy link
Member Author

@LayZeeDK LayZeeDK Mar 3, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ng-packagr detects a single use of @angular/forms in the tour of heroes crisis center library. Spectacular has one test which imports from that library. Apparently, it's not able to differentiate between test dependencies and runtime dependencies.

@LayZeeDK LayZeeDK merged commit 3b5ad4c into main Mar 3, 2021
@LayZeeDK LayZeeDK deleted the spectacular/chore/bundle-dependencies branch March 3, 2021 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants