Skip to content

Conversation

@JasonVMo
Copy link
Contributor

Platforms Impacted

  • all

Description of changes

While it is possible to run TS directly in node 22.x, it isn't 100% viable until 23.6 because it is too easy to loop back into scripts and inadvertently call without the extra command line args. At the same time the build-tools step is super tedious when changing engineering systems stuff so I want the ability to execute it directly. Finally the scripts directory was a mess. This PR makes the following changes:

  • reorganize files, creating a scripts/configs directory to put common configs, a preinstall directory to put code that needs to run before package installs happen.
  • hook up linting in scripts. Still a todo to override scripts linting to ensure only node imports are enabled in presintall.
  • move the tsconfig the whole project builds off of to the configs directory.
  • move the scripts tsconfig to pull in the @rnx-kit/tsconfig/tsconfig.node.json to put in the right compiler directives required to execute TS code directly. Also make it run on the whole scripts package and check JS files.
  • move any TS files to be JS + JSDoc syntax
  • centralize a bunch of functionality, particularly the root project stuff to ensure we can share that amongst scripts.
  • move scripts to be type: "module" to allow modern import syntax (makes eventual TS conversion easier)
  • remove dead/unused scripts
  • convert the jest execution to a direct script rather than the just based task
  • export ObjectBase from framework to ensure typescript inferencing doesn't give errant non-portable type warnings.
  • modified the cli entry-point to not require a just.config.js in every folder. As part of that deleted those just.config.js files.

Ultimately many of the files that look brand new are actually renames from .ts to .js which are showing up as moves. Most of the changes are changing require to import statements, and changing config references.

@JasonVMo JasonVMo requested a review from a team as a code owner July 14, 2025 07:07
@Saadnajmi
Copy link
Collaborator

Do we still need the lage step "build-tools"?

@JasonVMo
Copy link
Contributor Author

Do we still need the lage step "build-tools"?

Good catch. I had it in another version of it but forgot to do it this time. Updated with paring down of the lage config (and fixing the execution of prettier in the scripts folder).

@JasonVMo JasonVMo merged commit 3e168e4 into main Jul 14, 2025
11 checks passed
@JasonVMo JasonVMo deleted the user/jasonvmo/script-rework branch July 14, 2025 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants