This repository was archived by the owner on Aug 28, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import { ProviderState } from '../providers/IProvider';
1111import { Providers } from '../providers/Providers' ;
1212import { LocalizationHelper } from '../utils/LocalizationHelper' ;
1313import { PACKAGE_VERSION } from '../utils/version' ;
14+ import { emitDeprecationWarning } from '../utils/deprecationWarning' ;
1415
1516/**
1617 * Defines media query based on component width
@@ -128,6 +129,7 @@ export abstract class MgtBaseComponent extends LitElement {
128129
129130 constructor ( ) {
130131 super ( ) ;
132+ emitDeprecationWarning ( ) ;
131133 this . handleDirectionChanged ( ) ;
132134 this . handleLocalizationChanged ( ) ;
133135 }
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ import { ProviderState } from '../providers/IProvider';
1313import { Providers } from '../providers/Providers' ;
1414import { LocalizationHelper } from '../utils/LocalizationHelper' ;
1515import { PACKAGE_VERSION } from '../utils/version' ;
16+ import { emitDeprecationWarning } from '../utils/deprecationWarning' ;
1617import { ComponentMediaQuery } from './baseComponent' ;
1718
1819/**
@@ -96,6 +97,7 @@ export abstract class MgtBaseTaskComponent extends LitElement {
9697
9798 constructor ( ) {
9899 super ( ) ;
100+ emitDeprecationWarning ( ) ;
99101 this . handleDirectionChanged ( ) ;
100102 this . handleLocalizationChanged ( ) ;
101103 }
Original file line number Diff line number Diff line change 1+ /**
2+ * -------------------------------------------------------------------------------------------
3+ * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4+ * See License in the project root for license information.
5+ * -------------------------------------------------------------------------------------------
6+ */
7+
8+ let hasWarned = false ;
9+
10+ /**
11+ * Emits a one-time console warning informing consumers that the
12+ * Microsoft Graph Toolkit has been retired.
13+ *
14+ * The warning is emitted at most once per runtime, and any failure to
15+ * write to the console is swallowed so this can never break a host app.
16+ */
17+ export const emitDeprecationWarning = ( ) : void => {
18+ if ( hasWarned ) {
19+ return ;
20+ }
21+ hasWarned = true ;
22+
23+ try {
24+ console . warn (
25+ '🦒: The Microsoft Graph Toolkit was retired on August 28, 2026 and is no longer maintained. ' +
26+ 'This package will receive no further updates. ' +
27+ 'If you would like to continue using or maintaining MGT, you are welcome to fork the repository: ' +
28+ 'https://github.com/microsoftgraph/microsoft-graph-toolkit'
29+ ) ;
30+ } catch {
31+ // Never allow logging to break a host application.
32+ }
33+ } ;
You can’t perform that action at this time.
0 commit comments