Skip to content
Open
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
25 changes: 17 additions & 8 deletions packages/turbo-types/package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "@turbo/types",
"version": "2.5.7-canary.0",
"type": "module",
"description": "Turborepo types",
"type": "commonjs",
"homepage": "https://turborepo.com",
"license": "MIT",
"repository": {
Expand All @@ -13,16 +13,24 @@
"bugs": {
"url": "https://github.com/vercel/turborepo/issues"
},
"main": "src/index.ts",
"types": "src/index.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"types": "./dist/index.d.cts",
"exports": {
".": {
"types": "./dist/index.d.cts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"zshy": "./src/index.ts",
"scripts": {
"build": "tsc && pnpm generate-schema",
"build": "zshy && pnpm generate-schema",
"lint": "eslint src/",
"lint:prettier": "prettier -c . --cache",
"generate-schema": "tsx scripts/generate-schema.ts",
"copy-schema": "cp schemas/schema.json ../turbo/schema.json",
"package:lint": "publint --strict",
"package:types": "attw --profile node16 --pack"
"package:types": "attw --profile node16 --pack --ignore-rules=false-cjs"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.18.2",
Expand All @@ -31,10 +39,11 @@
"@types/node": "^20",
"publint": "^0.3.12",
"ts-json-schema-generator": "2.3.0",
"tsx": "4.19.1"
"tsx": "4.19.1",
"zshy": "^0.4.1"
},
"files": [
"src",
"dist",
"schemas"
],
"publishConfig": {
Expand Down
10 changes: 5 additions & 5 deletions packages/turbo-types/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import type { Framework as FW } from "./types/frameworks";
import type { Framework as FW } from "./types/frameworks.js";
import frameworksJson from "./json/frameworks.json";

export const frameworks = frameworksJson as Array<Framework>;
export type Framework = FW;
export type { FrameworkStrategy } from "./types/frameworks";
export type { FrameworkStrategy } from "./types/frameworks.js";

export {
type BaseSchema,
Expand All @@ -25,7 +25,7 @@ export {
type WorkspaceSchema as WorkspaceSchemaV2,
isRootSchemaV2,
isWorkspaceSchemaV2,
} from "./types/config-v2";
} from "./types/config-v2.js";

export {
type BaseSchemaV1,
Expand All @@ -38,6 +38,6 @@ export {
type WorkspaceSchemaV1,
isRootSchemaV1,
isWorkspaceSchemaV1,
} from "./types/config-v1";
} from "./types/config-v1.js";

export type { DryRun } from "./types/dry";
export type { DryRun } from "./types/dry.js";
12 changes: 10 additions & 2 deletions packages/turbo-types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
{
"extends": "@turbo/tsconfig/library.json",
"compilerOptions": {
"rootDir": ".",
"rootDir": "src",
"outDir": "dist",
"resolveJsonModule": true,
"module": "ESNext",
"moduleResolution": "bundler",
"isolatedModules": false,
"declaration": true,
"declarationMap": true,
"target": "ESNext",
"lib": ["ESNext"]
}
},
"include": ["src/**/*"]
}
2 changes: 1 addition & 1 deletion packages/turbo-types/turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// can watch this workspace for file changes.
"topo": {},
"build": {
"outputs": ["schemas/**"],
"outputs": ["dist/**", "schemas/**"],
"dependsOn": ["^topo"]
},
"copy-schema": {
Expand Down
Loading
Loading