Skip to content

fix: tns info should work with scoped modules #5198

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

Merged
merged 1 commit into from
Jan 7, 2020

Conversation

rosen-vladimirov
Copy link
Contributor

Currently the tns info command fails when executed inside application in which tns-core-modules package is not available as dependency. This may happen in case you use only @nativescript/core package.
The problem is that CLI is trying to read the package.json of the <project dir>/node_modules/tns-core-modules and this operation fails.
To fix this, add checks for both tns-core-modules and @nativescript/core packages. Warnings/information will be shown only for the package used in package.json, i.e. in case you use tns-core-modules, we'll show information only for it.

PR Checklist

What is the current behavior?

tns info fails when executed in a project without tns-core-modules in it.

What is the new behavior?

tns info succeeds when executed in a project without tns-core-modules in it.

Fixes issue #5192

Currently the `tns info` command fails when executed inside application in which `tns-core-modules` package is not available as dependency. This may happen in case you use only `@nativescript/core` package.
The problem is that CLI is trying to read the package.json of the `<project dir>/node_modules/tns-core-modules` and this operation fails.
To fix this, add checks for both `tns-core-modules` and `@nativescript/core` packages. Warnings/information will be shown only for the package used in package.json, i.e. in case you use `tns-core-modules`, we'll show information only for it.
@rosen-vladimirov rosen-vladimirov self-assigned this Jan 6, 2020
@cla-bot cla-bot bot added the cla: yes label Jan 6, 2020
@rosen-vladimirov
Copy link
Contributor Author

test cli-misc

@rosen-vladimirov
Copy link
Contributor Author

test cli-misc

@rosen-vladimirov rosen-vladimirov merged commit 216a0cb into release Jan 7, 2020
@rosen-vladimirov rosen-vladimirov deleted the vladimirov/fix-tns-info-scoped-package branch January 7, 2020 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants