BotFramework-WebChat icon indicating copy to clipboard operation
BotFramework-WebChat copied to clipboard

[WIP] Chat launcher experience

Open compulim opened this issue 4 months ago • 0 comments

Fixes #

Changelog Entry

Description

Design

Build scripts changes

  • npm run build:pre will rewrite package.json/localDependencies and package.json/scripts/start
    • scripts/start is computed and overwrite automatically 🥳
    • By overwriting things directly in package.json, we can see what it will run against
  • npm run start actually run npm run build:run once and exit, no tsup --watch
    • Will pick up new changes in tsup.config.ts 🥳
    • Build error will be retried on next file change, no more silent build stop 🥳
  • Use inotifywatch to watch for changes
    • No initial build, devs must run npm run build themselves first 🥳
  • It still use brute-force to "keep rebuilding until no files change"
    • I don't want to build a complex "what need to build first/last" script right now
  • Trigger next package by touching package.json, right after ESM is built
    • It was waiting until all CJS + ESM + DTS is done... I think we only need ESM is done is fine... tweakable
    • tsup --onSuccess will be triggered twice, one for CJS and one for ESM
  • DTS easily takes ~20 seconds to build
    • dtsroll is in build:post:dtsroll, because we don't need it in development environment
  • Why not prebuild/postbuild... because I want to keep --ignore-scripts enabled
  • I also relocated some scripts under /scripts/npm/bump-dev.sh, etc...

Tried nodemon and node --watch, both doesn't work as good as inotifywait. Especially around how it queue up changes while the build is ongoing. inotifywait in shell script is most flexible option.

Specific Changes

-

  • [ ] I have added tests and executed them locally
  • [ ] I have updated CHANGELOG.md
  • [ ] I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • [ ] Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • [ ] Browser and platform compatibilities reviewed
  • [ ] CSS styles reviewed (minimal rules, no z-index)
  • [ ] Documents reviewed (docs, samples, live demo)
  • [ ] Internationalization reviewed (strings, unit formatting)
  • [ ] package.json and package-lock.json reviewed
  • [ ] Security reviewed (no data URIs, check for nonce leak)
  • [ ] Tests reviewed (coverage, legitimacy)

compulim avatar Oct 14 '25 22:10 compulim