Skip to content
This repository was archived by the owner on Aug 28, 2026. It is now read-only.

Commit 82144d3

Browse files
authored
Merge branch 'main' into gavinbarron/readme-retirement-notice
2 parents 6c70d5a + d069f98 commit 82144d3

3 files changed

Lines changed: 37 additions & 0 deletions

File tree

packages/mgt-element/src/components/baseComponent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { ProviderState } from '../providers/IProvider';
1111
import { Providers } from '../providers/Providers';
1212
import { LocalizationHelper } from '../utils/LocalizationHelper';
1313
import { 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
}

packages/mgt-element/src/components/baseTaskComponent.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { ProviderState } from '../providers/IProvider';
1313
import { Providers } from '../providers/Providers';
1414
import { LocalizationHelper } from '../utils/LocalizationHelper';
1515
import { PACKAGE_VERSION } from '../utils/version';
16+
import { emitDeprecationWarning } from '../utils/deprecationWarning';
1617
import { 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
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
};

0 commit comments

Comments
 (0)