Skip to content
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

build: vite typescript set to strict #17509

Merged
merged 2 commits into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions npm/vite-dev-server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export async function startDevServer (startDevServerArgs: StartDevServerOptions)
const viteDevServer = await createDevServer(startDevServerArgs)

const app = await viteDevServer.listen()
const port = app.config.server.port
const port = app.config.server.port!

debug('Component testing vite server started on port', port)

return { port, close: app.httpServer.close }
return { port, close: app.httpServer!.close }
}
2 changes: 1 addition & 1 deletion npm/vite-dev-server/src/makeCypressPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const makeCypressPlugin = (
// as soon as we find one of the specs, we trigger the re-run of tests
for (const mod of moduleImporters.values()) {
debug('handleHotUpdate - mod.file', mod.file)
if (specsPathsSet.has(mod.file)) {
if (mod.file && specsPathsSet.has(mod.file)) {
debug('handleHotUpdate - compile success')
devServerEvents.emit('dev-server:compile:success')

Expand Down
2 changes: 1 addition & 1 deletion npm/vite-dev-server/src/startServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const resolveServerConfig = async ({ viteConfig, options }: StartDevServerOption

const finalConfig: InlineConfig = { ...viteConfig, ...requiredOptions }

finalConfig.plugins = [...(viteConfig.plugins || []), makeCypressPlugin(projectRoot, supportFile, options.devServerEvents, options.specs)]
finalConfig.plugins = [...(finalConfig.plugins || []), makeCypressPlugin(projectRoot, supportFile, options.devServerEvents, options.specs)]

// This alias is necessary to avoid a "prefixIdentifiers" issue from slots mounting
// only cjs compiler-core accepts using prefixIdentifiers in slots which vue test utils use.
Expand Down
2 changes: 1 addition & 1 deletion npm/vite-dev-server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */

/* Strict Type-Checking Options */
"strict": false /* Enable all strict type-checking options. */,
"strict": true, /* Enable all strict type-checking options. */
"noImplicitAny": false,

/* Module Resolution Options */
Expand Down