-
Notifications
You must be signed in to change notification settings - Fork 2.9k
fix(scripts-tasks): make generate-api work in deterministic way #28215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Hotell
merged 6 commits into
microsoft:master
from
Hotell:hotell/build/api-extractor-path-aliases-fix
Jun 16, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
afa63f2
fix(scripts-tasks): disable api-extractor custom path aliases usage w…
Hotell 06c7dbc
chore: add generate-api task definition to lage config
Hotell 0a8a96f
feat(react-conformance): migrate package to v9 setup in order to be a…
Hotell 2f7efa3
fixup! feat(react-conformance): migrate package to v9 setup in order …
Hotell 46462ba
generate changefile
Hotell 6097243
chore: fix typos
Hotell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-conformance-35e35a06-cb99-40ac-9617-72e443ec3109.json
This file contains hidden or 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": "minor", | ||
| "comment": "BREAKING CHANGE: migrate package to v9 setup in order to be able to run generate-api task without build", | ||
| "packageName": "@fluentui/react-conformance", | ||
| "email": "martinhochel@microsoft.com", | ||
| "dependentChangeType": "patch" | ||
| } | ||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,34 +1,37 @@ | ||
| .storybook/ | ||
| .vscode/ | ||
| bundle-size/ | ||
| config/ | ||
| coverage/ | ||
| docs/ | ||
| etc/ | ||
| node_modules/ | ||
| src/ | ||
| stories/ | ||
| dist/types/ | ||
| temp/ | ||
| __fixtures__ | ||
| __mocks__ | ||
| __tests__ | ||
|
|
||
| *.api.json | ||
| *.config.js | ||
| *.log | ||
| *.nuspec | ||
| *.spec.* | ||
| *.cy.* | ||
| *.test.* | ||
| *.yml | ||
|
|
||
| # config files | ||
| *config.* | ||
| *rc.* | ||
| .editorconfig | ||
| .eslintrc* | ||
| .eslintcache | ||
| .gitattributes | ||
| .gitignore | ||
| .vscode | ||
| coverage | ||
| dist/storybook | ||
| dist/*.stats.html | ||
| dist/*.stats.json | ||
| dist/demo | ||
| fabric-test* | ||
| gulpfile.js | ||
| images | ||
| index.html | ||
| jsconfig.json | ||
| node_modules | ||
| results | ||
| src/**/* | ||
| !src/**/examples/*.tsx | ||
| !src/**/docs/**/*.md | ||
| !src/**/*.types.ts | ||
| temp | ||
| tsconfig.json | ||
| tsd.json | ||
| tslint.json | ||
| typings | ||
| visualtests | ||
| .eslint* | ||
| .git* | ||
| .prettierignore | ||
| .swcrc | ||
|
|
||
| # exclude gitignore patterns explicitly | ||
| !lib | ||
| !lib-commonjs | ||
| !lib-amd | ||
| !dist/*.d.ts |
This file contains hidden or 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,30 @@ | ||
| { | ||
| "$schema": "https://json.schemastore.org/swcrc", | ||
| "exclude": [ | ||
| "/testing", | ||
| "/**/*.cy.ts", | ||
| "/**/*.cy.tsx", | ||
| "/**/*.spec.ts", | ||
| "/**/*.spec.tsx", | ||
| "/**/*.test.ts", | ||
| "/**/*.test.tsx" | ||
| ], | ||
| "jsc": { | ||
| "parser": { | ||
| "syntax": "typescript", | ||
| "tsx": true, | ||
| "decorators": false, | ||
| "dynamicImport": false | ||
| }, | ||
| "externalHelpers": true, | ||
| "transform": { | ||
| "react": { | ||
| "runtime": "classic", | ||
| "useSpread": true | ||
| } | ||
| }, | ||
| "target": "es2019" | ||
| }, | ||
| "minify": false, | ||
| "sourceMaps": true | ||
| } |
This file contains hidden or 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,5 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
| "extends": "@fluentui/scripts-api-extractor/api-extractor.common.v-next.json", | ||
| "mainEntryPointFilePath": "<projectFolder>/../../dist/out-tsc/types/packages/<unscopedPackageName>/src/index.d.ts" | ||
| } |
This file contains hidden or 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 @@ | ||
| /** Jest test setup file. */ |
This file contains hidden or 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,75 @@ | ||
| ## API Report File for "@fluentui/react-conformance" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import { ComponentDoc } from 'react-docgen-typescript'; | ||
| import * as React_2 from 'react'; | ||
| import { render } from '@testing-library/react'; | ||
| import * as ts from 'typescript'; | ||
|
|
||
| // @public (undocumented) | ||
| export type ConformanceTest<TProps = {}> = (componentInfo: ComponentDoc, testInfo: IsConformantOptions<TProps>, tsProgram: ts.Program) => void; | ||
|
|
||
| // @public (undocumented) | ||
| export function isConformant<TProps = {}>(...testInfo: Partial<IsConformantOptions<TProps>>[]): void; | ||
|
|
||
| // @public (undocumented) | ||
| export interface IsConformantOptions<TProps = {}> { | ||
| Component: React_2.ComponentType<TProps>; | ||
| componentPath: string; | ||
| disabledTests?: string[]; | ||
| displayName: string; | ||
| elementRefName?: string; | ||
| extraTests?: TestObject<TProps>; | ||
| getTargetElement?: (renderResult: ReturnType<typeof render>, attr: keyof React_2.AllHTMLAttributes<HTMLElement> | 'ref' | `data-${string}`) => HTMLElement; | ||
| isInternal?: boolean; | ||
| primarySlot?: keyof TProps | 'root'; | ||
| renderOptions?: Parameters<typeof render>[1]; | ||
| requiredProps?: Partial<TProps>; | ||
| testOptions?: TestOptions; | ||
| tsConfig?: Partial<{ | ||
| configName: string; | ||
| configDir: string; | ||
| }>; | ||
| // @deprecated (undocumented) | ||
| tsconfigDir?: string; | ||
| useDefaultExport?: boolean; | ||
| } | ||
|
|
||
| // @public (undocumented) | ||
| export interface TestObject<TProps = {}> { | ||
| // (undocumented) | ||
| [key: string]: ConformanceTest<TProps>; | ||
| } | ||
|
|
||
| // @public | ||
| export interface TestOptions { | ||
| // (undocumented) | ||
| 'component-has-static-classname'?: { | ||
| prefix?: string; | ||
| }; | ||
| // (undocumented) | ||
| 'consistent-callback-args'?: { | ||
| ignoreProps?: string[]; | ||
| }; | ||
| // (undocumented) | ||
| 'consistent-callback-names'?: { | ||
| ignoreProps?: string[]; | ||
| }; | ||
| // (undocumented) | ||
| 'has-static-classnames'?: { | ||
| props: { | ||
| [key: string]: string | {}; | ||
| }; | ||
| expectedClassNames?: { | ||
| [key: string]: string; | ||
| }; | ||
| getPortalElement?: (renderResult: ReturnType<typeof render>) => HTMLElement; | ||
| }[]; | ||
| } | ||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,5 +1,20 @@ | ||
| const { createV8Config: createConfig } = require('@fluentui/scripts-jest'); | ||
| // @ts-check | ||
|
|
||
| const config = createConfig({}); | ||
|
|
||
| module.exports = config; | ||
| /** | ||
| * @type {import('@jest/types').Config.InitialOptions} | ||
| */ | ||
| module.exports = { | ||
| displayName: 'react-conformance', | ||
| preset: '../../jest.preset.js', | ||
| globals: { | ||
| 'ts-jest': { | ||
| tsconfig: '<rootDir>/tsconfig.spec.json', | ||
| isolatedModules: true, | ||
| }, | ||
| }, | ||
| transform: { | ||
| '^.+\\.tsx?$': 'ts-jest', | ||
| }, | ||
| coverageDirectory: './coverage', | ||
| setupFilesAfterEnv: ['./config/tests.js'], | ||
| }; |
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
| @@ -1,22 +1,22 @@ | ||
| { | ||
| "extends": "../../tsconfig.base.json", | ||
| "compilerOptions": { | ||
| "baseUrl": ".", | ||
| "outDir": "lib", | ||
| "target": "es6", | ||
| "module": "commonjs", | ||
| "target": "ES2019", | ||
| "noEmit": true, | ||
| "jsx": "react", | ||
| "declaration": true, | ||
| "sourceMap": true, | ||
| "experimentalDecorators": true, | ||
| "isolatedModules": true, | ||
| "importHelpers": true, | ||
| "noUnusedLocals": true, | ||
| "forceConsistentCasingInFileNames": true, | ||
| "strict": true, | ||
| "moduleResolution": "node", | ||
| "preserveConstEnums": true, | ||
| "isolatedModules": true, | ||
| "lib": ["es2017", "dom"], | ||
| "types": ["jest", "node"] | ||
| "noUnusedLocals": true | ||
| }, | ||
| "include": ["src"] | ||
| "include": [], | ||
| "files": [], | ||
| "references": [ | ||
| { | ||
| "path": "./tsconfig.lib.json" | ||
| }, | ||
| { | ||
| "path": "./tsconfig.spec.json" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or 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,15 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "noEmit": false, | ||
| "lib": ["DOM", "ES2019"], | ||
| "declaration": true, | ||
| "declarationDir": "../../dist/out-tsc/types", | ||
| "outDir": "../../dist/out-tsc", | ||
| "inlineSources": true, | ||
| "types": ["static-assets", "environment", "jest", "node"], | ||
| "module": "CommonJS" | ||
| }, | ||
| "exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"], | ||
| "include": ["./src/**/*.ts", "./src/**/*.tsx"] | ||
| } |
This file contains hidden or 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,9 @@ | ||
| { | ||
| "extends": "./tsconfig.json", | ||
| "compilerOptions": { | ||
| "module": "CommonJS", | ||
| "outDir": "dist", | ||
| "types": ["jest", "node"] | ||
| }, | ||
| "include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"] | ||
| } |
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.