Skip to content

feat: validate the version of nativescript-dev-webpack plugin on every command #4796

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 6 commits into from
Jul 4, 2019

Conversation

Fatme
Copy link
Contributor

@Fatme Fatme commented Jul 3, 2019

NativeScript CLI 6.0 cannot work with nativescript-dev-webpack with version lower than 1.0.0. So we need a validation to check the version of nativescript-dev-webpack plugin on every command. This PR validates the version of nativescript-dev-webpack plugin and throws the following error when the version of nativescript-dev-webpack is lower than 1.0.0 (for example, "~0.24.0"):

The NativeScript CLI requires nativescript-dev-webpack 1.0.0 or later to work properly. After updating nativescript-dev-webpack you need to ensure "webpack.config.js" file is up to date with the one in the new version of nativescript-dev-webpack. You can automatically update it using "./node_modules/.bin/update-ns-webpack --configs" command.

The error is NOT thrown in the following situations:

  • When the version of nativescript-dev-webpack is not a valid semver version (for example: next, rc)
  • When nativescript-dev-webpack plugin is referenced from local .tgz or directory
  • When the version of nativescript-dev-webpack is for example 1.0.0-rc-2019-07-02-164330-03

Rel to: #4798

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

Fatme added 2 commits July 3, 2019 08:41
As we've already moved the logic for validation the version of nativescript-dev-webpack plugin to commandsService, there is no need to validate it again from commands.
@cla-bot cla-bot bot added the cla: yes label Jul 3, 2019
@Fatme
Copy link
Contributor Author

Fatme commented Jul 3, 2019

test cli-smoke

1 similar comment
@Fatme
Copy link
Contributor Author

Fatme commented Jul 3, 2019

test cli-smoke

@Fatme Fatme merged commit b184cdf into release Jul 4, 2019
@Fatme Fatme deleted the fatme/validate-webpack-version branch July 4, 2019 05:53
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