Skip to content

Commit

Permalink
chore: run migration for @fluentui/babel-make-styles (#20744)
Browse files Browse the repository at this point in the history
* chore: run migration for @fluentui/babel-make-styles

* Change files

* Apply suggestions from code review

Co-authored-by: Martin Hochel <[email protected]>

* fix fmt

* restore change in jest config

Co-authored-by: Martin Hochel <[email protected]>
  • Loading branch information
layershifter and Hotell authored Nov 25, 2021
1 parent f0083b8 commit 208e351
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "none",
"comment": "update tooling configs",
"packageName": "@fluentui/babel-make-styles",
"email": "[email protected]",
"dependentChangeType": "none"
}
1 change: 0 additions & 1 deletion packages/babel-make-styles/.npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.cache/
.storybook/
.vscode/
bundle-size/
Expand Down
2 changes: 1 addition & 1 deletion packages/babel-make-styles/config/api-extractor.local.json
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/babel-make-styles/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
4 changes: 2 additions & 2 deletions packages/babel-make-styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"lint": "just-scripts lint",
"test": "jest",
"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/babel-make-styles/src && yarn docs",
"type-check": "tsc -p ./tsconfig.spec.json"
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/babel-make-styles/src && yarn docs",
"type-check": "tsc -b tsconfig.json"
},
"devDependencies": {
"@fluentui/eslint-plugin": "*",
Expand Down
27 changes: 16 additions & 11 deletions packages/babel-make-styles/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
{
"extends": "../../tsconfig.base.json",
"include": ["src"],
"compilerOptions": {
"target": "ES2015",
"module": "CommonJS",
"lib": ["ES2017", "DOM"],
"outDir": "dist",
"jsx": "react",
"declaration": true,
"experimentalDecorators": true,
"target": "ES2019",
"noEmit": true,
"isolatedModules": true,
"importHelpers": true,
"jsx": "react",
"noUnusedLocals": true,
"preserveConstEnums": true,
"types": ["jest", "custom-global", "inline-style-expand-shorthand", "node"]
}
"preserveConstEnums": true
},
"include": [],
"files": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}
13 changes: 13 additions & 0 deletions packages/babel-make-styles/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": false,
"lib": ["DOM", "ES2019"],
"outDir": "dist",
"declaration": true,
"types": ["static-assets", "environment", "inline-style-expand-shorthand"],
"module": "CommonJS"
},
"exclude": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"]
}
6 changes: 4 additions & 2 deletions packages/babel-make-styles/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"noEmit": true
"module": "CommonJS",
"outDir": "dist",
"types": ["jest", "node", "inline-style-expand-shorthand"]
},
"include": ["__fixtures__/**/code.ts"]
"include": ["**/*.spec.ts", "**/*.spec.tsx", "**/*.test.ts", "**/*.test.tsx", "**/*.d.ts", "__fixtures__/**/code.ts"]
}

0 comments on commit 208e351

Please sign in to comment.