Skip to content

Build botframework-directlinespeech-sdk with tsup only - #6045

Merged
Eugene (OEvgeny) merged 15 commits into
mainfrom
OEvgeny/feat-directlinespeech-tsup
Nov 12, 2026
Merged

Eugene (OEvgeny) merged 15 commits into
mainfrom
OEvgeny/feat-directlinespeech-tsup

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

botframework-directlinespeech-sdk was built by tsup, Babel and webpack; as asked in #6037, it is now built by tsup only.

Changelog Entry

Changed

  • Built botframework-directlinespeech-sdk with tsup only, replacing Babel and webpack, in PR #6045, by @OEvgeny

Removed

  • 💥 botframework-directlinespeech-sdk no longer ships Babel's lib/ folder: deep imports from lib/ stop working where exports is ignored (webpack 4), in PR #6045, by @OEvgeny

Description

One tsup.config.ts builds the ES module, CommonJS and both browser scripts (same names and exports); lib/, stats.json and tests are no longer published.

It was not tested against a real Direct Line Speech bot: we have no Speech resource with that channel. Instead, with real Speech credentials, old and new builds gave the same exports and connection attempts via require() and in Chrome.

Design

  • src/bundle.js sets window.DirectLineSpeech as webpack did; tsup's globalName only declares a var.

Specific Changes

  • tsup.config.ts: 2 browser scripts from src/bundle.js

  • package.json: main/require → dist/*.js; files; @babel/runtime → devDependencies

  • addMetaTag.iife.spec.js: tests window.DirectLineSpeech

  • docs/BUILD_SCRIPTS.md: updated

  • I have added tests and executed them locally

  • I have added .changelog/<PR#>-<slug>.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)

Eugene Olonov added 13 commits November 9, 2026 18:58
One tsup config now emits the ES module, the CommonJS file and both browser scripts (window.DirectLineSpeech). main and the require condition point to tsup's CommonJS file instead of Babel's lib/; Babel (lib/) and webpack are no longer used to build.
tsup's globalName declares a top-level var, which is not global when the script runs inside a module wrapper; webpack assigned window.DirectLineSpeech.
…nespeech-tsup

# Conflicts:
#	package-lock.json
#	packages/directlinespeech/package.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The documented build sets node_env=test instead of NODE_ENV=test, leaving the browser bundle uninstrumented and invalidating the subsequent coverage verification step.

1 open issue
What changed in this PR

Consolidates the Direct Line Speech SDK build on tsup, following #6037, while preserving module formats, browser filenames, and the window.DirectLineSpeech API.

Changes:

  • Replaces Babel and webpack build stages with tsup outputs for ES modules, CommonJS, and both browser scripts.
  • Updates package entry points and published files, including the documented removal of lib/.
  • Adds browser-export checks and updates build documentation.
File Description
packages/​directlinespeech/​webpack.config.js Removes the webpack build configuration.
packages/​directlinespeech/​tsup.config.ts Adds development and production browser bundles.
packages/​directlinespeech/​src/​bundle.js Exposes the SDK through window.DirectLineSpeech.
packages/​directlinespeech/​src/​__tests__/​addMetaTag.iife.spec.js Checks browser exports and build metadata.
packages/​directlinespeech/​package.json Simplifies builds and updates entry points, published files, and dependencies.
package-lock.json Synchronizes build dependency changes.
docs/​BUILD_SCRIPTS.md Updates output descriptions and verification steps.
.changelog/​6045-feat-directlinespeech-tsup.md Records the build migration and breaking removal of lib/.

Review effort: Balanced

Comment thread docs/BUILD_SCRIPTS.md Resolved
@OEvgeny
Eugene (OEvgeny) merged commit c2080ea into main Nov 12, 2026
45 of 46 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/feat-directlinespeech-tsup branch November 12, 2026 23:51
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