Skip to content

move ts own process to use chokidar#1070

Closed
nicoecheza wants to merge 3 commits intomainfrom
rework/ts-watcher
Closed

move ts own process to use chokidar#1070
nicoecheza wants to merge 3 commits intomainfrom
rework/ts-watcher

Conversation

@nicoecheza
Copy link
Member

@nicoecheza nicoecheza commented Feb 21, 2025

Since we are now using sdk-commands as child process of other apps (creator-hub, etc), creating child processes of child processes seems to be having problems maintaining them alive when needed.
This avoids creating a new keepalive process when running tsc on the user's scene by using chokidar. The only gotcha is having to parse the tsconfig.json file so we can obtain the proper files to watch, so that's what the new getTypeScriptWatchPatterns function is doing.

Tested it inside and outside Electron app, having different configs inside the tsconfig.json file and seems to be doing a proper work.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Feb 21, 2025

Deploying js-sdk-toolchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6b4affb
Status: ✅  Deploy successful!
Preview URL: https://2d3f0b65.js-sdk-toolchain.pages.dev
Branch Preview URL: https://rework-ts-watcher.js-sdk-toolchain.pages.dev

View logs

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2025

Test this pull request

  • The @dcl/sdk package can be tested in scenes by running

    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/rework/ts-watcher/dcl-sdk-7.7.6-13572819699.commit-49d9a76.tgz"
  • To test with npx init

    export SDK_COMMANDS="https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/rework/ts-watcher/dcl-sdk-commands-7.7.6-13572819699.commit-49d9a76.tgz"
    npx $SDK_COMMANDS init
  • The @dcl/inspector package can be tested by visiting this url

    • Or by installing it via NPM
    npm install "https://sdk-team-cdn.decentraland.org/@dcl/js-sdk-toolchain/branch/rework/ts-watcher/@dcl/inspector/dcl-inspector-7.7.6-13572819699.commit-49d9a76.tgz"
  • The /changerealm command to test test in-world

    /changerealm https://sdk-team-cdn.decentraland.org/ipfs/rework/ts-watcher-e2e
    
  • You can preview this build entering:
    https://playground.decentraland.org/?sdk-branch=rework/ts-watcher

@nicoecheza nicoecheza closed this Feb 28, 2025
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