Skip to content

Commit

Permalink
build: include test files when running type-check scripts (#497)
Browse files Browse the repository at this point in the history
Fixes #496
  • Loading branch information
chrispcampbell authored Jun 5, 2024
1 parent 3130901 commit 3182ef3
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 20 deletions.
1 change: 1 addition & 0 deletions examples/house-game/packages/app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"target": "esnext",
"module": "esnext",
"moduleResolution": "node",
"skipLibCheck": true,
"allowJs": true,
"noImplicitAny": false,
"noUnusedLocals": false,
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-check-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"prettier:fix": "prettier --write .",
"precommit": "../../scripts/precommit",
"test": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "vite build",
"dev": "vite",
"ci:build": "run-s clean lint prettier:check type-check build"
Expand Down
1 change: 1 addition & 0 deletions examples/sample-check-app/tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"resolveJsonModule": true,
"module": "esnext",
"target": "esnext",
"skipLibCheck": true,
"noImplicitAny": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
Expand Down
3 changes: 0 additions & 3 deletions examples/sample-check-app/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// This contains the TypeScript configuration for production builds.
{
"extends": "./tsconfig-base.json",
"compilerOptions": {
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion examples/sample-check-bundle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"precommit": "../../scripts/precommit",
"test": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build-v1": "MODEL_VERSION=1 vite build",
"build-v2": "MODEL_VERSION=2 vite build",
"build": "run-s build-v1 build-v2",
Expand Down
2 changes: 1 addition & 1 deletion examples/sample-check-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"precommit": "../../scripts/precommit",
"test": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "vite build",
"ci:build": "run-s clean lint prettier:check test:ci type-check build"
},
Expand Down
1 change: 1 addition & 0 deletions examples/sample-check-tests/tsconfig-base.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"target": "es2020",
// Use "es2020" for Object.values()
"lib": ["es2020"],
"skipLibCheck": true,
"allowJs": true,
"noImplicitAny": true,
"noUnusedLocals": true,
Expand Down
3 changes: 0 additions & 3 deletions examples/sample-check-tests/tsconfig-build.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
// This contains the TypeScript configuration for production builds.
{
"extends": "./tsconfig-base.json",
"compilerOptions": {
"skipLibCheck": true
},
"include": ["src/**/*"],
"exclude": ["**/*.spec.ts"]
}
2 changes: 1 addition & 1 deletion packages/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest --threads=false --test-timeout=10000 run",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check type-check build test:ci docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/check-ui-shell/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "vite build",
"build:watch": "vite build --watch",
"docs": "../../scripts/gen-docs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/create/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"start": "./bin/create-sde.js",
"ci:build": "run-s clean lint prettier:check type-check build test:ci"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"test": "echo No tests yet",
"test:watch": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check test:ci type-check build docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"bundle": "tsup",
"copy-types": "cp src/spec-types.ts dist",
"build": "run-s bundle copy-types",
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-config/src/processor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { fileURLToPath } from 'url'
import temp from 'temp'
import { afterAll, beforeAll, describe, expect, it } from 'vitest'

import type { BuildOptions, ModelSpec, Plugin, UserConfig } from '@sdeverywhere/build'
import type { BuildOptions, Plugin, ResolvedModelSpec, UserConfig } from '@sdeverywhere/build'
import { build } from '@sdeverywhere/build'

import type { ConfigProcessorOptions } from './processor'
Expand Down Expand Up @@ -241,7 +241,7 @@ describe('configProcessor', () => {
})

it('should write to default directory structure if single out dir is provided', async () => {
let capturedModelSpec: ModelSpec
let capturedModelSpec: ResolvedModelSpec
const plugin: Plugin = {
async preGenerate(_, modelSpec) {
capturedModelSpec = modelSpec
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "echo No tests yet",
"test:watch": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check test:ci type-check build docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-wasm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"test": "echo No tests yet",
"test:watch": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check test:ci type-check build docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-worker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"test": "echo No tests yet",
"test:watch": "echo No tests yet",
"test:ci": "echo No tests yet",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check test:ci type-check build docs"
Expand Down
2 changes: 1 addition & 1 deletion packages/runtime-async/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test": "vitest run",
"test:watch": "vitest",
"test:ci": "vitest run",
"type-check": "tsc --noEmit -p tsconfig-build.json",
"type-check": "tsc --noEmit -p tsconfig-test.json",
"build": "tsup",
"docs": "../../scripts/gen-docs.js",
"ci:build": "run-s clean lint prettier:check type-check build test:ci docs"
Expand Down

0 comments on commit 3182ef3

Please sign in to comment.