From e048647b5718243b33345542592296a53bb8ce7e Mon Sep 17 00:00:00 2001 From: Chris Barber Date: Thu, 9 May 2024 00:32:46 -0500 Subject: [PATCH] Improve blog post --- posts/2024/cli_7_0_0_ga.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/posts/2024/cli_7_0_0_ga.md b/posts/2024/cli_7_0_0_ga.md index 0cd138a..a1094c9 100644 --- a/posts/2024/cli_7_0_0_ga.md +++ b/posts/2024/cli_7_0_0_ga.md @@ -10,7 +10,30 @@ teaser: 'Refactor, ' Titanium CLI 7 is finally here! This release is a complete refactor that includes several breaking changes and improvements. -Version 7 adopts the ESM module format allowing dependencies to be updated to their latest versions. Equally important, this enables us to finally update the Node.js code in the SDK including the build command logic. +## ESM Refactor + +Version 7 adopts the ECMAScript Module (ESM) format allowing us to finally be able to update the CLI's dependencies to their latest versions. Equally important, this enables us to finally update the Node.js code in the SDK including the build command logic. + +This also allowed us to drop deprecated and unmaintained packages in favor of modern and maintained packages. + +## Dead Code Removal + +This release removes the remaining Axway/Appcelerator specific code including +analytics, authentication, and Java-based connection test. + +The non-functional tab completion has been removed. The i18n system has been removed and now all output is in English. + +Additionally, v7 removes HAXM and Genymotion detection. These two Android emulator technologies are inferior to the modern-day emulator bundled with the Android SDK. + +## No More Default SDK + +The Titanium CLI has always had the concept of a "default SDK". The CLI used the default SDK to create new projects as well as read the `tiapp.xml` and figure out which version of the SDK should be used to build the project. If the `` in the `tiapp.xml` differed from the default SDK, the CLI would spawn itself again with the correct SDK to use. Not only was this slow but made the code overly complex. + +Version 7 removes this default SDK and directly reads the `tiapp.xml` without needing to load an SDK. This allows the CLI to immediately choose the correct SDK when building your project. + +Creating new projects will prompt you for the SDK version to use or default to the latest installed GA release. + +## Node.js Requirements Titanium CLI 7 now requires Node.js 18 or newer. @@ -22,16 +45,16 @@ Titanium CLI 7 now requires Node.js 18 or newer. * BREAKING: `ti module` no longer shows both `iphone` and `ios` modules, only `ios` * BREAKING: `ti sdk --json` no longer contains `activeSDK` (see `ti sdk select` below) -There have been a number of other improvements: +There have been several other improvements: + * Updated dependencies including replacing outdated dependencies with modern alternatives + * Lazy load code when possible; when combined with the removed dead code, the CLI in general should be a tiny bit faster * `--sdk ` is now a global option - `ti create` will prompt which SDK you wish to use * `-d`, `--project-dir` is now a global option * Added `--json` flag to `ti config`, `ti info`, `ti sdk`, and `ti sdk list` * `ti sdk select` is no longer needed, now it just reads `` from the `tiapp.xml` * Removed all dead code: analytics, telemetry, i18n (for CLI prompts, etc), incomplete tab completion - * Updated dependencies including replacing outdated dependencies with modern alternatives - * Lazy load code when possible; when combined with the removed dead code, the CLI in general should be a tiny bit faster For a complete list of changes, please see the release notes: [Titanium CLI 7.0.0 Release Notes](https://github.com/tidev/titanium-cli/releases/tag/v7.0.0).