Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions apps/vr-tests-web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"type-check": "tsc -p . --baseUrl . --noEmit",
Comment thread
radium-v marked this conversation as resolved.
"test-vr": "storywright --browsers chromium --url dist/storybook --destpath dist/screenshots --waitTimeScreenshot 500 --concurrency 4 --headless true"
},
"devDependencies": {
"@types/web": "^0.0.142"
},
Comment thread
radium-v marked this conversation as resolved.
"dependencies": {
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
2 changes: 1 addition & 1 deletion apps/vr-tests-web-components/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"resolveJsonModule": true,
"allowJs": true,
"jsx": "react",
"types": ["jest", "node", "web"]
Comment thread
radium-v marked this conversation as resolved.
"types": ["jest", "node"]
},
"include": ["./src", "./.storybook/*"],
"files": ["./typings/html-react-parser/index.d.ts"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "Use lib replacement to avoid delivering web types overrides",
"packageName": "@fluentui/web-components",
"email": "863023+radium-v@users.noreply.github.com",
"dependentChangeType": "none"
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@
"typings"
],
"nohoist": [
"@fluentui/web-components/@storybook/html"
"@fluentui/web-components/@storybook/html",
"@fluentui/web-components/@typescript/lib-dom"
Comment on lines -370 to +371

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The @typescript/lib-dom package is included in nohoist, since @types/web breaks in packages which target ES5. This ensures that this types override is scoped only to the web components package.

https://github.com/microsoft/TypeScript-DOM-Lib-Generator?tab=readme-ov-file#typeslib-minimum-target
image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this - makes sense!

]
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"allowJs": true,
"checkJs": true,
"noEmit": true,
"types": ["node", "web"]
"types": ["node"]
},
"include": ["*", "../public", "../src/**/*.stories.*"]
}
3 changes: 0 additions & 3 deletions packages/web-components/docs/api-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

```ts

/// <reference types="web" />

import { CaptureType } from '@microsoft/fast-element';
import { CSSDirective } from '@microsoft/fast-element';
import { Direction } from '@microsoft/fast-web-utilities';
Expand Down Expand Up @@ -2500,7 +2498,6 @@ export abstract class MatchMediaBehavior implements HostBehavior {
export class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
constructor(query: MediaQueryList, styles: ElementStyles);
protected constructListener(controller: HostController): MediaQueryListListener;
readonly query: MediaQueryList;
// @internal
removedCallback(controller: HostController<any>): void;
readonly styles: ElementStyles;
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
"devDependencies": {
"@microsoft/fast-element": "2.0.0-beta.26",
"@tensile-perf/web-components": "~0.2.0",
"@types/web": "^0.0.142",
"@typescript/lib-dom": "npm:@types/web@^0.0.142",
"@storybook/html": "6.5.15",
"chromedriver": "^125.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,6 @@ export abstract class MatchMediaBehavior implements HostBehavior {
* @public
*/
export class MatchMediaStyleSheetBehavior extends MatchMediaBehavior {
/**
* The media query that the behavior operates on.
*/
public readonly query!: MediaQueryList;

/**
* The styles object to be managed by the behavior.
*/
Expand Down
3 changes: 1 addition & 2 deletions packages/web-components/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"declaration": true,
"declarationDir": "dist/dts",
"outDir": "dist/esm",
"importHelpers": true,
"types": ["web"]
"importHelpers": true
},
"include": ["src"],
"exclude": ["**/*.stories.*", "**/*.test.*", "**/*.spec.*"]
Expand Down
2 changes: 1 addition & 1 deletion packages/web-components/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"compilerOptions": {
"module": "ESNext",
"outDir": "dist/esm",
"types": ["web", "node", "webpack-env"]
"types": ["node", "webpack-env"]
},
"include": ["src/**/*.test.*", "src/**/*.spec.*"]
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5731,7 +5731,7 @@
"@types/expect" "^1.20.4"
"@types/node" "*"

"@types/web@^0.0.142":
"@typescript/lib-dom@npm:@types/web@^0.0.142":
version "0.0.142"
resolved "https://registry.yarnpkg.com/@types/web/-/web-0.0.142.tgz#62eff3c6b24e2429d084a5a9d4061021cfe7c648"
integrity sha512-QWDvMW+P3sdq8rhiw3dNyBR64O5adSY80gBjRd2xI3BADGsAFpAglblWucsGUjKVKyPm4EbYZkvFs7BRxPsBOg==
Expand Down