Skip to content

Commit

Permalink
chore: run migration for @fluentui/react-shared-contexts (#20725)
Browse files Browse the repository at this point in the history
* chore: run migration for @fluentui/react-shared-contexts

* Change files

* Update packages/react-shared-contexts/tsconfig.json

Co-authored-by: ling1726 <[email protected]>

* fix fmt

* restore " --passWithNoTests"

Co-authored-by: ling1726 <[email protected]>
  • Loading branch information
layershifter and ling1726 authored Nov 24, 2021
1 parent f472b7b commit ba05e3b
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update tooling configs",
"packageName": "@fluentui/react-shared-contexts",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion packages/react-shared-contexts/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.cache/
.storybook/
.vscode/
bundle-size/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "./api-extractor.json",
"mainEntryPointFilePath": "<projectFolder>/dist/<unscopedPackageName>/src/index.d.ts"
"mainEntryPointFilePath": "<projectFolder>/dist/packages/<unscopedPackageName>/src/index.d.ts"
}
2 changes: 1 addition & 1 deletion packages/react-shared-contexts/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
preset: '../../jest.preset.js',
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.json',
tsConfig: '<rootDir>/tsconfig.spec.json',
diagnostics: false,
},
},
Expand Down
5 changes: 3 additions & 2 deletions packages/react-shared-contexts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"just": "just-scripts",
"lint": "just-scripts lint",
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-shared-contexts/src && yarn docs",
"test": "jest --passWithNoTests"
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-shared-contexts/src && yarn docs",
"test": "jest --passWithNoTests",
"type-check": "tsc -b tsconfig.json"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
26 changes: 15 additions & 11 deletions packages/react-shared-contexts/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES2019",
"module": "CommonJS",
"lib": ["ES2019", "DOM"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"noEmit": true,
"isolatedModules": true,
"importHelpers": true,
"jsx": "react",
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["jest", "custom-global"],
"isolatedModules": true
}
"preserveConstEnums": true
},
"include": [],
"files": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
12 changes: 12 additions & 0 deletions packages/react-shared-contexts/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"lib": ["ES2019", "dom"],
"outDir": "dist",
"declaration": true,
"types": ["static-assets", "environment", "inline-style-expand-shorthand"]
},
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.stories.ts", "**/*.stories.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
9 changes: 9 additions & 0 deletions packages/react-shared-contexts/tsconfig.spec.json
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", "inline-style-expand-shorthand"]
},
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts"]
}

0 comments on commit ba05e3b

Please sign in to comment.