Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

typecheck before building app/main #1368

Merged
merged 2 commits into from
Mar 11, 2019
Merged
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Added
- [main] Typecheck during build process [#1368](https://github.com/Microsoft/BotFramework-Emulator/pull/1368)

## Fixed
- [main] Fix missing constant reference [#1368](https://github.com/Microsoft/BotFramework-Emulator/pull/1368)

## v4.3.1 - 2019 - 03 - 11
## Fixed
Expand Down
5 changes: 3 additions & 2 deletions packages/app/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "./app/server/main.js",
"homepage": "https://github.com/Microsoft/BotFramework-Emulator",
"scripts": {
"build": "run-s lint build:electron",
"build": "run-s typecheck lint build:electron",
"build:electron": "babel ./src --out-dir app/server --extensions \".ts,.tsx\" --ignore \"**/*.spec.ts\" && npm run copy:extension:stubs",
"copy:extension:stubs": "ncp src/extensions app/extensions",
"dist": "electron-builder",
Expand All @@ -18,7 +18,8 @@
"start:electron": "./node_modules/.bin/electron --inspect=7777 --remote-debugging-port=7778 .",
"start:electron:dev": "cross-env ELECTRON_TARGET_URL=http://localhost:3000/ npm run start:electron",
"start:react-app": "cd ../client && npm start",
"test": "jest"
"test": "jest",
"typecheck": "tsc --noEmit"
},
"keywords": [
"microsoft",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/main/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ const createMainWindow = async () => {
await mainWindow.commandService.remoteCall(SharedConstants.Commands.UI.ArmTokenReceivedOnStartup, result);
} else if (!result) {
settingsStore.dispatch(azureLoggedInUserChanged(''));
await mainWindow.commandService.call(SharedConstants.Commands.UpdateFileMenu);
await mainWindow.commandService.call(SharedConstants.Commands.Electron.UpdateFileMenu);
}
}

Expand Down
3 changes: 2 additions & 1 deletion packages/app/shared/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "build/dist"
"outDir": "build/dist",
"declarationDir": "built"
},
"include": ["./src"]
}
2 changes: 1 addition & 1 deletion packages/emulator/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"main": "lib/index.js",
"types": "lib/index.d.ts",
"scripts": {
"build": "babel ./src --out-dir lib --extensions \".ts,.tsx\" --ignore \"**/*.spec.ts\"",
"build": "babel ./src --out-dir lib --extensions \".ts,.tsx\" --ignore \"**/*.spec.ts\" && tsc --emitDeclarationOnly",
"clean": "rimraf lib",
"lint": "eslint --color --quiet --ext .js,.jsx,.ts,.tsx ./src",
"lint:fix": "npm run lint -- --fix",
Expand Down
3 changes: 2 additions & 1 deletion packages/emulator/cli/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "build/dist"
"outDir": "build/dist",
"declarationDir": "lib"
},
"include": ["./src"]
}
39 changes: 4 additions & 35 deletions packages/emulator/core/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,7 @@
{
"extends": "../../../tsconfig.json",
"include": ["./src"]
// "compilerOptions": {
// "declaration": true,
// "declarationDir": "lib",
// // Emit declaration only when we are building with Babel
// // "emitDeclarationOnly": true,
// "lib": [
// "es2016",
// "dom"
// ],
// "module": "commonjs",
// "moduleResolution": "node",
// "pretty": true,
// "skipLibCheck": true,
// "target": "es2017",
// "types": [
// "node"
// ],
// "sourceMap": true,
// // "paths": {
// // "@bfemulator/sdk-shared": ["../../sdk/shared/build/dist"],
// // "@bfemulator/sdk-main": ["../../sdk/main/build/dist"]
// // },
// },
// "exclude": [
// "src/**/*.spec.js",
// "src/**/*.spec.ts",
// "src/**/*.test.js",
// "src/**/*.test.ts",
// "src/__tests__/**/*.js",
// "src/__tests__/**/*.ts"
// ],
// "include": [
// "src/**/*"
// ]
"include": ["./src"],
"compilerOptions": {
"declarationDir": "lib"
}
}
Loading