Skip to content

Introduce command (tns migrate) to migrate old project to 6.0.0 requirements #4646

Closed
@rosen-vladimirov

Description

@rosen-vladimirov

Is your feature request related to a problem? Please describe.
In 6.0.0 release, we'll have new requirements for applications build process, i.e. all apps must have webpack as dependencies, several development plugins should be replaced with others, etc.
All of these changes could take a lot of time to the users and several issues might occur during the process. So it will be great in case tns update command can handle all these changes.

Describe the solution you'd like
The tns update command should update the following components of the application:

  • runtime versions
  • tns-core-modules and tns-core-modules-widgets versions
  • nativescript-dev-webpack version
  • webpack.config.js file according to latest changes - create a backup of the old one
  • hooks directory - create backup of it and allow npm to recreate it on its own
  • remove all dev plugins that will not be supported anymore and add required development dependencies instead of them:
    • nativescript-dev-sass should be replaced with node-sass
    • nativescript-dev-typescript should be replaced with typescript (possibly typescript is already a devDependency of the project)
    • nativescript-dev-less should be replaced with less
  • it will be great if the command can update all dependencies to their latest versions - due to changes around AndroidX most of the plugins will need a new version to be published. Their old versions will not work with Android runtime that supports only AndroidX.

After updating the package.json and backing up the directories, CLI should execute npm rebuild, so all new dependencies and devDependencies will be installed and all required hooks will be generated in the project.

Also it will be great to check the project files and notify the users if there are .xml/.css files that do not follow the convention requirements of our webpack logic (i.e. they do not have page or root in the name) and show warnings for them.

Describe alternatives you've considered
CLI might show interactive prompts which of the mentioned components to be updated.

Metadata

Metadata

Assignees

Labels

docsupdateDescribes issues related to update command or updating from one version of CLI to another

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions