-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: enable isolateModules in all v8 packages (#25774)
* chore: enable isolateModules in all packages * generate changefiles * feat: remove obsolete useTheme knob from storybook package that were causing isolateModules errors
- Loading branch information
Showing
82 changed files
with
388 additions
and
107 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-api-docs-547d7f43-a564-4a94-8b76-ccac1d127503.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/api-docs", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-azure-themes-d9280534-3eff-4fdf-a6bc-be748554f4e5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/azure-themes", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-bundle-size-b9d69f12-1e5a-4ab0-a35e-d09977045174.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/bundle-size", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-codemods-34cab244-094a-4969-ac94-ebe5e1973447.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/codemods", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-cra-template-f85dc73c-080a-4d6a-83da-9c7b2f113e85.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/cra-template", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-date-time-utilities-b3bfe513-6a87-40b9-b6be-25ea898995ff.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/date-time-utilities", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-dom-utilities-4679a570-4427-4582-828f-21a307877379.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/dom-utilities", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-eslint-plugin-595f5ece-71ae-4667-89ac-8c5fa156d1b5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/eslint-plugin", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-example-data-8b93f3aa-682e-4dfe-b904-bd586a469ef4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/example-data", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-font-icons-mdl2-ecfb000c-c697-4255-a724-84eb03709baf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/font-icons-mdl2", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-foundation-legacy-7a70614a-1023-42e9-a040-cdd6bd8dfcd1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/foundation-legacy", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-jest-serializer-merge-styles-acdb62d1-5192-4a4b-845d-0b15cf5ac3d3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/jest-serializer-merge-styles", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-keyboard-key-9d0a5c42-23b7-4a7b-bd19-904294d4da32.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/keyboard-key", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-merge-styles-94e6bd56-0436-4a2f-bf10-824026f427d3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/merge-styles", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-public-docsite-setup-858530f2-5fc5-4407-b65b-5d31ca395559.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/public-docsite-setup", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-cards-8dbfea4e-fd35-480f-bc7f-fbb3810249ec.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-cards", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-charting-2ae44c30-d25d-4224-878a-8d0639f56f83.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-charting", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-conformance-0f52a097-ea6e-44dc-aa1f-385746e8ba6b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-conformance", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-date-time-d7b945c3-b761-4359-9b3e-a787e05b9061.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-date-time", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-docsite-components-41bb350f-e27f-4a37-aa3f-93e40305ecb6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-docsite-components", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-file-type-icons-f3ff4bf8-d309-4a7c-a3b2-02ffe5992db6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-file-type-icons", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-icons-mdl2-branded-512fd03e-cc32-44aa-88fe-62c6bf37df99.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-icons-mdl2-branded", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-window-provider-b4744fd9-b509-43bf-86ac-21cab35fac1e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/react-window-provider", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-set-version-00dd38f2-8ae0-4949-b243-6d2e56befc0e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/set-version", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-test-utilities-2b87aec7-698a-41ed-a226-a9ca03662e8e.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/test-utilities", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-theme-d092ed70-5637-464a-ab27-c56ddf26337b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/theme", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-webpack-utilities-ecd3a551-8f4f-408b-9c8c-bc62b6ded90b.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "none", | ||
"comment": "chore: enable isolateModules", | ||
"packageName": "@fluentui/webpack-utilities", | ||
"email": "[email protected]", | ||
"dependentChangeType": "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/** | ||
* ☝️ NOTE: | ||
* Types in this file provide const enums replacement that will compile with isolatedModules | ||
*/ | ||
|
||
import type { ApiItemKind as _ApiItemKind } from '@microsoft/api-extractor-model'; | ||
|
||
import type { DocNodeKind as _DocNodeKind } from '@microsoft/tsdoc'; | ||
|
||
export enum ApiItemKind { | ||
CallSignature = 'CallSignature', | ||
Class = 'Class', | ||
Constructor = 'Constructor', | ||
ConstructSignature = 'ConstructSignature', | ||
EntryPoint = 'EntryPoint', | ||
Enum = 'Enum', | ||
EnumMember = 'EnumMember', | ||
Function = 'Function', | ||
IndexSignature = 'IndexSignature', | ||
Interface = 'Interface', | ||
Method = 'Method', | ||
MethodSignature = 'MethodSignature', | ||
Model = 'Model', | ||
Namespace = 'Namespace', | ||
Package = 'Package', | ||
Property = 'Property', | ||
PropertySignature = 'PropertySignature', | ||
TypeAlias = 'TypeAlias', | ||
Variable = 'Variable', | ||
None = 'None', | ||
} | ||
|
||
export enum DocNodeKind { | ||
Block = 'Block', | ||
BlockTag = 'BlockTag', | ||
Excerpt = 'Excerpt', | ||
FencedCode = 'FencedCode', | ||
CodeSpan = 'CodeSpan', | ||
Comment = 'Comment', | ||
DeclarationReference = 'DeclarationReference', | ||
ErrorText = 'ErrorText', | ||
EscapedText = 'EscapedText', | ||
HtmlAttribute = 'HtmlAttribute', | ||
HtmlEndTag = 'HtmlEndTag', | ||
HtmlStartTag = 'HtmlStartTag', | ||
InheritDocTag = 'InheritDocTag', | ||
InlineTag = 'InlineTag', | ||
LinkTag = 'LinkTag', | ||
MemberIdentifier = 'MemberIdentifier', | ||
MemberReference = 'MemberReference', | ||
MemberSelector = 'MemberSelector', | ||
MemberSymbol = 'MemberSymbol', | ||
Paragraph = 'Paragraph', | ||
ParamBlock = 'ParamBlock', | ||
ParamCollection = 'ParamCollection', | ||
PlainText = 'PlainText', | ||
Section = 'Section', | ||
SoftBreak = 'SoftBreak', | ||
} | ||
|
||
// Following function is used to keep 3rd party types in sync with our custom ones. test on "type level" | ||
// If anything will go wrong this will throw TSC error | ||
// | ||
// Why do we need this? | ||
// To be able to use `isolateModules` we cannot use nor consume const enums. | ||
// @ts-expect-error - this function is only for type compat test | ||
|
||
function _testEnumsCompatibility() { | ||
testApiItemKind(); | ||
testDocNodeKind(); | ||
|
||
function testDocNodeKind() { | ||
// @ts-expect-error - _DocNodeKind is const enum - cannot be used with isolateModules - this does the trick | ||
type Keys = keyof typeof _DocNodeKind; | ||
type Keys2 = keyof typeof DocNodeKind; | ||
|
||
let test = {} as Keys; | ||
let test2 = {} as Keys2; | ||
|
||
test = test2; | ||
test2 = test; | ||
|
||
// eslint-disable-next-line no-console | ||
console.log(test, test2); | ||
} | ||
|
||
function testApiItemKind() { | ||
// @ts-expect-error - _ApiItemKind is const enum - cannot be used with isolateModules - this does the trick | ||
type Keys = keyof typeof _ApiItemKind; | ||
type Keys2 = keyof typeof ApiItemKind; | ||
|
||
let test = {} as Keys; | ||
let test2 = {} as Keys2; | ||
|
||
test = test2; | ||
test2 = test; | ||
|
||
// eslint-disable-next-line no-console | ||
console.log(test, test2); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.