Skip to content

Commit

Permalink
chore: always run tsc prior to unbuild
Browse files Browse the repository at this point in the history
  • Loading branch information
fwouts committed Aug 26, 2022
1 parent bb191e3 commit 83ceaa3
Show file tree
Hide file tree
Showing 22 changed files with 31 additions and 26 deletions.
2 changes: 1 addition & 1 deletion api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/api --no-deps --include-dependencies",
"build": "unbuild"
"build": "tsc && unbuild"
},
"dependencies": {
"@previewjs/type-analyzer": "^4.0.2"
Expand Down
3 changes: 2 additions & 1 deletion api/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true
}
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion app-foundations/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/app-foundations --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"test": "vitest --no-threads"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ describe("generatePropsTypeDeclarations", () => {
});

test("missing type", () => {
expect(
generatePropsTypeDeclarations(":Missing", namedType("/foo.tsx:Foo"), {})
).toMatchInlineSnapshot(`
expect(generatePropsTypeDeclarations(":Missing", {}))
.toMatchInlineSnapshot(`
"declare let properties: Missing;
Expand Down
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/app --no-deps --include-dependencies",
"build": "unbuild && pnpm tsc -p client/tsconfig.json && vite build client && pnpm tsc -p tsconfig.tests.json",
"build": "tsc && unbuild && pnpm tsc -p client/tsconfig.json && vite build client && pnpm tsc -p tsconfig.tests.json",
"client:dev": "vite client",
"e2e-test": "tsc -p tsconfig.tests.json && pnpm previewjs-e2e-test -s ./dist/index.cjs -t ./dist-tests/index.js"
},
Expand Down
2 changes: 1 addition & 1 deletion config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"sideEffects": false,
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/config --no-deps --include-dependencies",
"build": "unbuild"
"build": "tsc && unbuild"
},
"devDependencies": {
"@types/node": "17.0.8",
Expand Down
2 changes: 1 addition & 1 deletion core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/core --no-deps --include-dependencies",
"build": "unbuild && bash copy_monaco_editor.sh"
"build": "tsc && unbuild && bash copy_monaco_editor.sh"
},
"dependencies": {
"@previewjs/api": "^2.4.2",
Expand Down
2 changes: 1 addition & 1 deletion csf3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/csf3 --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"test": "vitest --no-threads"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion csf3/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true
}
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion e2e-test-runner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/e2e-test-runner --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"dev": "ts-node --transpileOnly src/main.ts"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const globalIgnores = [
"eslint-plugin-react-hooks",
"postcss",
"tailwindcss",
"unbuild",
"tsc && unbuild",
];

// TODO: Go through these deps and eliminate the ones that are not needed.
Expand Down
2 changes: 1 addition & 1 deletion serializable-values/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/serializable-values --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"test": "vitest --no-threads"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion serializable-values/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true
}
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/server --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"dev": "ts-node-dev --respawn src/main.ts"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
"outDir": "dist",
"esModuleInterop": true,
"resolveJsonModule": true
}
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion type-analyzer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/type-analyzer --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"test": "vitest --no-threads"
},
"dependencies": {
Expand Down
3 changes: 2 additions & 1 deletion type-analyzer/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true
}
},
"include": ["src"]
}
2 changes: 1 addition & 1 deletion vfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"scripts": {
"prepublish": "cd .. && pnpm turbo run build --scope=@previewjs/vfs --no-deps --include-dependencies",
"build": "unbuild",
"build": "tsc && unbuild",
"test": "vitest --no-threads"
},
"dependencies": {
Expand Down
4 changes: 2 additions & 2 deletions vfs/src/memory.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import assertNever from "assert-never";
import path from "path";
import { Writer } from ".";
import {
import type { Writer } from ".";
import type {
Directory,
DirectorySync,
Entry,
Expand Down
2 changes: 1 addition & 1 deletion vfs/src/real.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import chokidar from "chokidar";
import fs from "fs-extra";
import path from "path";
import {
import type {
Directory,
DirectorySync,
Entry,
Expand Down
4 changes: 2 additions & 2 deletions vfs/src/stacked.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ReaderListener } from ".";
import { Directory, DirectorySync, Entry, EntrySync, Reader } from "./api";
import type { ReaderListener } from ".";
import type { Directory, DirectorySync, Entry, EntrySync, Reader } from "./api";
import { ReaderListeners } from "./listeners";

export class StackedReader implements Reader {
Expand Down
3 changes: 2 additions & 1 deletion vfs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"rootDir": "src",
"outDir": "dist",
"esModuleInterop": true
}
},
"include": ["src"]
}

0 comments on commit 83ceaa3

Please sign in to comment.