Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move ts own process to use chokidar #1070

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

nicoecheza
Copy link
Contributor

@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.

Copy link

Deploying js-sdk-toolchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 25ddb89
Status: ✅  Deploy successful!
Preview URL: https://21809129.js-sdk-toolchain.pages.dev
Branch Preview URL: https://rework-ts-watcher.js-sdk-toolchain.pages.dev

View logs

Copy link
Contributor

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-13459717133.commit-fe0165b.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-13459717133.commit-fe0165b.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-13459717133.commit-fe0165b.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

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.

1 participant