Skip to content

Commit

Permalink
feat(types): publish turbo types (#5130)
Browse files Browse the repository at this point in the history
  • Loading branch information
tknickman committed May 31, 2023
1 parent 669a415 commit ec79bb0
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 5 deletions.
4 changes: 4 additions & 0 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ build: install
cd $(CLI_DIR)/../ && pnpm install --filter=@turbo/gen && pnpm turbo-prebuilt build --filter=@turbo/gen...
cd $(CLI_DIR)/../ && pnpm install --filter=eslint-plugin-turbo && pnpm turbo-prebuilt build --filter=eslint-plugin-turbo...
cd $(CLI_DIR)/../ && pnpm install --filter=eslint-config-turbo && pnpm turbo-prebuilt build --filter=eslint-config-turbo...
cd $(CLI_DIR)/../ && pnpm install --filter=@turbo/types && pnpm turbo-prebuilt build --filter=@turbo/types...

.PHONY: prepublish
prepublish: compile-protos cmd/turbo/version.go
Expand Down Expand Up @@ -243,6 +244,7 @@ stage-release: cmd/turbo/version.go
cd $(CLI_DIR)/../packages/turbo-gen && pnpm version "$(TURBO_VERSION)" --allow-same-version
cd $(CLI_DIR)/../packages/eslint-plugin-turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
cd $(CLI_DIR)/../packages/eslint-config-turbo && pnpm version "$(TURBO_VERSION)" --allow-same-version
cd $(CLI_DIR)/../packages/turbo-types && pnpm version "$(TURBO_VERSION)" --allow-same-version

git checkout -b staging-$(TURBO_VERSION)
git commit -anm "publish $(TURBO_VERSION) to registry"
Expand Down Expand Up @@ -271,6 +273,7 @@ publish-turbo: clean build
cd $(CLI_DIR)/../packages/turbo-gen && pnpm pack --pack-destination=$(CLI_DIR)/../
cd $(CLI_DIR)/../packages/eslint-plugin-turbo && pnpm pack --pack-destination=$(CLI_DIR)/../
cd $(CLI_DIR)/../packages/eslint-config-turbo && pnpm pack --pack-destination=$(CLI_DIR)/../
cd $(CLI_DIR)/../packages/turbo-types && pnpm pack --pack-destination=$(CLI_DIR)/../

ifneq ($(SKIP_PUBLISH),--skip-publish)
# Publish the remaining JS packages in order to avoid race conditions.
Expand All @@ -283,6 +286,7 @@ ifneq ($(SKIP_PUBLISH),--skip-publish)
npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-gen-$(TURBO_VERSION).tgz
npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../eslint-plugin-turbo-$(TURBO_VERSION).tgz
npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../eslint-config-turbo-$(TURBO_VERSION).tgz
npm publish -ddd --tag $(TURBO_TAG) $(CLI_DIR)/../turbo-types-$(TURBO_VERSION).tgz
endif

demo/lage: install
Expand Down
7 changes: 7 additions & 0 deletions packages/turbo-types/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# `@turbo/types`

TypeScript types for `turbo.json`

---

For more information about Turborepo, visit [turbo.build/repo](https://turbo.build/repo) and follow us on Twitter ([@turborepo](https://twitter.com/turborepo))!
26 changes: 21 additions & 5 deletions packages/turbo-types/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,35 @@
{
"name": "@turbo/types",
"version": "0.0.0-alpha.0",
"description": "Turborepo types",
"homepage": "https://turbo.build/repo",
"license": "MPL-2.0",
"repository": {
"type": "git",
"url": "https://github.com/vercel/turbo",
"directory": "packages/turbo-types"
},
"bugs": {
"url": "https://github.com/vercel/turbo/issues"
},
"main": "src/index.ts",
"types": "src/index.ts",
"version": "0.0.0",
"bin": {
"turbo-types-generate": "./src/scripts/codegen.js"
},
"private": true,
"dependencies": {
"ts-json-schema-generator": "1.1.2"
},
"scripts": {
"lint": "eslint src/**/*.ts"
},
"dependencies": {
"ts-json-schema-generator": "1.1.2"
},
"devDependencies": {
"@turbo/tsconfig": "workspace:^0.0.0"
},
"files": [
"src"
],
"publishConfig": {
"access": "public"
}
}

1 comment on commit ec79bb0

@vercel
Copy link

@vercel vercel bot commented on ec79bb0 May 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.