Skip to content

Emit runtime deprecation warning from mgt-element - #3498

Merged
Gavin Barron (gavinbarron) merged 1 commit into
mainfrom
gavinbarron/mgt-element-deprecation-warning
Aug 27, 2026
Merged

Emit runtime deprecation warning from mgt-element#3498
Gavin Barron (gavinbarron) merged 1 commit into
mainfrom
gavinbarron/mgt-element-deprecation-warning

Conversation

@gavinbarron

Copy link
Copy Markdown
Member

Summary

As part of retiring the Microsoft Graph Toolkit, this adds a runtime deprecation warning so existing applications are notified even without reading the README or npm page — giving us a concrete code change to include in the final shipped version.

Changes

  • New emitDeprecationWarning() util in mgt-element that logs a one-time console.warn announcing MGT was retired on August 28, 2026 and pointing to the repo for forking.
  • Invoked from the MgtBaseComponent and MgtBaseTaskComponent constructors, so any component usage surfaces the notice.
  • Guarded to emit at most once per runtime and wrapped in try/catch so logging can never break a host application.
  • Follows the existing 🦒 console-message convention used elsewhere in the package.

Notes

Depends on / complements the README retirement notice in #3497.

Add a guarded, one-time console.warn announcing that MGT was retired on
August 28, 2026. The warning is invoked from the MgtBaseComponent and
MgtBaseTaskComponent constructors so any component usage surfaces it, and
is wrapped in try/catch so logging can never break a host application.
This provides a code change to include in the final shipped version.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 6df6f5e4-b73e-41c2-a6a6-60f2621c293b
@microsoft-github-policy-service

Copy link
Copy Markdown
Contributor

Thank you for creating a Pull Request @Gavin Barron (@gavinbarron).

This is a checklist for the PR reviewer(s) to complete before approving and merging this PR:

  • I have verified a documentation PR has been linked and is approved (or not applicable)
  • I have ran this PR locally and have tested the fix/feature
  • I have verified that stories have been added to storybook (or not applicable)
  • I have tested existing stories in storybook to verify no regression has occured
  • I have tested the solution in at least two browsers (Edge + 1 non-Chromium based browser)

@github-project-automation github-project-automation Bot moved this to Done ✔️ in Graph Toolkit Aug 27, 2026
@gavinbarron
Gavin Barron (gavinbarron) merged commit d069f98 into main Aug 27, 2026
9 of 10 checks passed
@gavinbarron
Gavin Barron (gavinbarron) deleted the gavinbarron/mgt-element-deprecation-warning branch August 27, 2026 22:58
@github-project-automation github-project-automation Bot moved this from Done ✔️ to Shipped 🚀 in Graph Toolkit Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Shipped 🚀

Development

Successfully merging this pull request may close these issues.

2 participants