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: support the ng-package.json in secondary entry points #1406

Merged
merged 3 commits into from Sep 25, 2019
Merged

fix: support the ng-package.json in secondary entry points #1406

merged 3 commits into from Sep 25, 2019

Conversation

klemenoslaj
Copy link
Contributor

@klemenoslaj klemenoslaj commented Sep 25, 2019

Currently secondary entry points are breaking no-implicit-dependencies TSLint rule, because the
rule is checking for package.json files, which in secondary entry points are anyway just containing
ngPackage configuration. Adding the support for ng-package.json removes the need for package.json,
thus TSLint will look correctly in parent package.json file and act accordingly.

fix 1391

I'm submitting a...

[x] Bug Fix
[ ] Feature
[ ] Other (Refactoring, Added tests, Documentation, ...)

Checklist

  • Commit Messages follow the Conventional Commits pattern
    • A feature commit message is prefixed "feat:"
    • A bugfix commit message is prefixed "fix:"
  • Tests for the changes have been added

Description

Fixes: 1391

Does this PR introduce a breaking change?

[ ] Yes
[x] No

@klemenoslaj
Copy link
Contributor Author

I as well wanted to add an addition to the documentation. Would it be fine like the example bellow?

docs/secondary-entrypoints.md

### Alternative to `package.json`

Alternatively, you could create `ng-package.json` instead of `package.json`.
This is particularly useful in conjunction with `no-implicit-dependencies` TSLint rule, which will complain if `package.json` does not contain the dependencies used in the secondary entry point, which is misleading since all the dependencies should be mentioned in the primary `package.json`.

@klemenoslaj
Copy link
Contributor Author

@alan-agius4, how do you prefer in this projects for review adjustments to be applied? With additional commit or fixing the current commit?

If we're squashing it anyway makes no difference, just wanna be sure.

@alan-agius4
Copy link
Member

@klemenoslaj, doesn't make a difference :)

Currently secondary entry points are breaking "no-implicit-dependencies" TSLint rule, because the
rule is checking for package.json files, which in secondary entry points are anyway just containing
"ngPackage" configuration. Adding the support for ng-package.json removes the need for package.json,
thus TSLint will look correctly in parent package.json file and act accordingly.

fix 1391
Copy link
Member

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

Thanks LGTM

@alan-agius4 alan-agius4 merged commit 8b97bfa into ng-packagr:master Sep 25, 2019
@klemenoslaj klemenoslaj deleted the support-ng-package-in-secondary branch September 26, 2019 07:46
@github-actions
Copy link

This PR has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
This action has been performed automatically by a bot.

@github-actions github-actions bot locked and limited conversation to collaborators Jun 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Secondary entry points breaking "no-implicit-dependencies" linting rule
2 participants