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

Add base package #5176

Merged
merged 22 commits into from
Oct 2, 2024
Merged

Add base package #5176

merged 22 commits into from
Oct 2, 2024

Conversation

OEvgeny
Copy link
Collaborator

@OEvgeny OEvgeny commented May 8, 2024

Changelog Entry

(No changelog entry for the internal change)

Description

This PR introduces a new private botframework-webchat-base package to centralize shared utilities and types across the Web Chat project. It also updates the build process for all packages to use tsup, as otherwise the reference to the package is included into depending packages by babel.

Design

The new base package serves as a foundation for shared functionality, promoting code reuse and maintainability. The build process changes aim to simplify and standardize the compilation across all packages, reducing complexity and potential inconsistencies.

Limitations

Due to how babel build works, only the packages which are using the new build approach powered by tsup can consume the base and styles packages. This limitation applies only to the packages we're publishing.

Package Status List

  • 🚀 base
  • 🔒 test/dev-server
  • 🔒 test/harness
  • 🔒 test/web-server
  • ✅ core
  • ✅ styles
  • 🔒 support/cldr-data-downloader
  • 🔒 support/cldr-data
  • ✅ api
  • 🔒 isomorphic-react
  • 🔒 isomorphic-react-dom
  • ✅ component
  • ⚠️ directlinespeech
  • ✅ bundle
  • 🔒 test/page-object
  • ✅ fluent-theme
  • 🔒 test/fluent-bundle

Legend

  • 🚀 New package with tsup introduced in this PR
  • ✅ Existing package migrated to tsup in this PR
  • ⚠️ Package needs update to tsup to use the base package
  • 🔒 Private package (not published)

Specific Changes

  • Added new packages/base directory with initial setup
  • Moved withResolvers utility from core to base package
  • Updated package.json files across multiple packages:
    • Added botframework-webchat-base as a development dependency
    • Updated build scripts to use tsup
    • Removed Babel and separate TypeScript compilation steps
  • Updated tsconfig.json files to remove emission-related options
  • Modified import statements in affected files to use the new base package
  • Updated webpack configurations to reflect new build output structure
  • Adjusted GitHub Actions workflow to use new build output paths

-

  • 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)

@OEvgeny OEvgeny marked this pull request as ready for review May 8, 2024 18:57
packages/README.md Outdated Show resolved Hide resolved
packages/base/babel.config.json Outdated Show resolved Hide resolved
packages/base/package.json Outdated Show resolved Hide resolved
@compulim compulim mentioned this pull request May 9, 2024
37 tasks
@compulim
Copy link
Contributor

compulim commented May 9, 2024

Let's make this base package internal and bundled into other packages.

For a cleaner approach, we should use tsup for CJS build and no longer need Babel.

@OEvgeny OEvgeny force-pushed the feature/base-package branch from 91037fc to a782437 Compare September 27, 2024 21:30
compulim
compulim previously approved these changes Oct 2, 2024
@OEvgeny OEvgeny enabled auto-merge (squash) October 2, 2024 18:34
@OEvgeny OEvgeny requested a review from compulim October 2, 2024 18:35
@OEvgeny OEvgeny disabled auto-merge October 2, 2024 18:37
@OEvgeny OEvgeny enabled auto-merge (squash) October 2, 2024 21:31
@OEvgeny OEvgeny merged commit 21a4ec1 into main Oct 2, 2024
27 checks passed
@OEvgeny OEvgeny deleted the feature/base-package branch October 2, 2024 21:38
@compulim compulim mentioned this pull request Oct 7, 2024
11 tasks
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.

2 participants