Skip to content

Conversation

jjw24
Copy link
Member

@jjw24 jjw24 commented Oct 23, 2022

Changes:

  • Add support for installing Node.js for TypeScript/JavaScript plugins
  • Add foundation for ensuring plugin environments are updated when a new Python/Node.js version is defined
  • No prompts to reinstall plugin environments when flow is updated, changed between portable/roaming or moved to different portable location
  • Consolidated Python and Node environment folders to a central location inside 'Environments' directory

image

Tested

  • Fresh install of Python automatically
  • User browse to custom Python directory and only able to select pythonw.exe
  • Fresh install Node.js automatically when plugin.json's Language is TypeScript/JavaScript
  • User browse to custom Node directory and select node.exe
  • Tested after update Python & Node executable paths in settings update from old version to new version location and only when .updatePythonPath or .updateNodePath file exists.
  • Selecting Python and Node exe from Settings window saves to settings class
  • When Python and Node paths are selected from Environments folder EnsureLatestInstalled call will ensure the designated Python and Node installations are installed. This will also ensure that in the future when new version is define it will be installed on next start up.
  • Custom Python and Node exe location outside of the Environments folder will not be affected by EnsureLatestInstalled call
  • Old PythonEmbeddable directory should be removed if exists, and replaced with Python directory in the Environments folder.
  • Running HelloWorld Node.js plugin.
  • Running HelloWorld Python plugin.
  • Plugins' file path is corrected after an app update or switching between potable and roaming mode.
  • Plugins' file path is corrected after portable flow is moved to a different location.

Close #1157, #1344, #1035

@jjw24 jjw24 added the enhancement New feature or request label Oct 23, 2022
@jjw24 jjw24 added this to the 1.10.0 milestone Oct 23, 2022
@jjw24 jjw24 self-assigned this Oct 23, 2022
@jjw24 jjw24 marked this pull request as draft October 23, 2022 09:06
@jjw24 jjw24 force-pushed the add_nodejs_env branch 2 times, most recently from 984c490 to 1c4f0ca Compare November 21, 2022 22:17
@jjw24 jjw24 marked this pull request as ready for review December 1, 2022 09:44
@jjw24 jjw24 modified the milestones: 1.10.0, Future Dec 12, 2022
@jjw24 jjw24 modified the milestones: Future, 1.11.0 Dec 20, 2022
@jjw24 jjw24 enabled auto-merge December 24, 2022 18:13
namespace Flow.Launcher.Core.ExternalPlugins.Environments
{

internal class JavaScriptEnvironment : TypeScriptEnvironment
Copy link
Member

Choose a reason for hiding this comment

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

LOL why javascript extends from typescript

Copy link
Member Author

Choose a reason for hiding this comment

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

Mainly so we don't need to reimplement anything since they both are using same everything. So plugin dev can set their plugin type as JavaScript or Typescript.

order messed up when merging
@jjw24 jjw24 merged commit 944e0f1 into dev Dec 28, 2022
@jjw24 jjw24 deleted the add_nodejs_env branch December 28, 2022 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node.js environment support

3 participants