Skip to content

Commit

Permalink
ci: Add preview workflow (#811)
Browse files Browse the repository at this point in the history
* Update package.json ordering

* Add preview workflow

* Require approval

* Rename root package.json
  • Loading branch information
lachlancollins authored Jul 5, 2024
1 parent 1eda603 commit ae8377a
Show file tree
Hide file tree
Showing 12 changed files with 145 additions and 124 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: preview

on:
pull_request_review:
types: [submitted]

concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

jobs:
preview:
name: Preview
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Tools
uses: tanstack/config/.github/setup@main
- name: Build Packages
run: pnpm run build:all
- name: Publish Previews
run: pnpx pkg-pr-new publish --no-template --compact ./packages/*
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "form",
"name": "root",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/tanstack/form.git"
},
"packageManager": "pnpm@9.3.0",
"packageManager": "pnpm@9.4.0",
"type": "module",
"scripts": {
"clean": "pnpm --filter \"./packages/**\" run clean",
Expand Down Expand Up @@ -38,7 +38,6 @@
"test:sherif"
]
},
"namespace": "@tanstack",
"devDependencies": {
"@eslint-react/eslint-plugin": "^1.5.16",
"@solidjs/testing-library": "^0.8.6",
Expand Down
10 changes: 5 additions & 5 deletions packages/angular-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"sideEffects": false,
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
Expand All @@ -25,10 +24,6 @@
"test:build": "publint --strict",
"build": "ng-packagr -p ng-package.json -c tsconfig.build.json && rimraf ./dist/package.json"
},
"files": [
"dist",
"src"
],
"type": "module",
"types": "dist/index.d.ts",
"module": "dist/fesm2022/tanstack-angular-form.mjs",
Expand All @@ -43,6 +38,11 @@
"default": "./package.json"
}
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/angular-store": "^0.5.1",
"@tanstack/form-core": "workspace:*",
Expand Down
30 changes: 15 additions & 15 deletions packages/form-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
Expand All @@ -36,21 +51,6 @@
"dist",
"src"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"dependencies": {
"@tanstack/store": "^0.5.0"
}
Expand Down
13 changes: 5 additions & 8 deletions packages/lit-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"sideEffects": false,
"scripts": {
"clean": "rimraf ./build && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
Expand All @@ -29,10 +28,6 @@
"test:build": "publint --strict",
"build": "tsc -p tsconfig.build.json"
},
"files": [
"dist",
"src"
],
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.js",
Expand All @@ -46,9 +41,11 @@
},
"./package.json": "./package.json"
},
"devDependencies": {
"@types/node": "^20.9.0"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/form-core": "workspace:*"
},
Expand Down
22 changes: 11 additions & 11 deletions packages/react-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"sideEffects": false,
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
Expand All @@ -30,10 +29,6 @@
"test:build": "publint --strict",
"build": "vite build"
},
"files": [
"dist",
"src"
],
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
Expand Down Expand Up @@ -71,6 +66,17 @@
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/form-core": "workspace:*",
"@tanstack/react-store": "^0.5.0",
"decode-formdata": "^0.7.5",
"@remix-run/node": "^2.9.2"
},
"devDependencies": {
"@tanstack/start": "^1.42.1",
"@types/react": "^18.3.3",
Expand All @@ -80,12 +86,6 @@
"react-dom": "^18.3.1",
"vite": "^5.1.4"
},
"dependencies": {
"@tanstack/form-core": "workspace:*",
"@tanstack/react-store": "^0.5.0",
"decode-formdata": "^0.7.5",
"@remix-run/node": "^2.9.2"
},
"peerDependencies": {
"@tanstack/start": "^1.40.1",
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"
Expand Down
18 changes: 9 additions & 9 deletions packages/solid-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"sideEffects": false,
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
Expand All @@ -30,10 +29,6 @@
"test:build": "publint --strict",
"build": "tsc -p tsconfig.build.json"
},
"files": [
"dist",
"src"
],
"type": "module",
"types": "dist/index.d.ts",
"main": "dist/index.js",
Expand All @@ -51,15 +46,20 @@
},
"./package.json": "./package.json"
},
"sideEffects": false,
"files": [
"dist",
"src"
],
"dependencies": {
"@tanstack/form-core": "workspace:*",
"@tanstack/solid-store": "^0.5.0"
},
"devDependencies": {
"solid-js": "^1.7.8",
"vite": "^5.1.4",
"vite-plugin-solid": "^2.10.1"
},
"dependencies": {
"@tanstack/form-core": "workspace:*",
"@tanstack/solid-store": "^0.5.0"
},
"peerDependencies": {
"solid-js": "^1.6.0"
}
Expand Down
34 changes: 17 additions & 17 deletions packages/valibot-form-adapter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
Expand All @@ -36,27 +50,13 @@
"dist",
"src"
],
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"dependencies": {
"@tanstack/form-core": "workspace:*"
},
"peerDependencies": {
"valibot": ">=0.33.0 <1"
},
"devDependencies": {
"valibot": "^0.35.0"
},
"peerDependencies": {
"valibot": ">=0.33.0 <1"
}
}
32 changes: 16 additions & 16 deletions packages/vue-form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
"type": "github",
"url": "https://github.com/sponsors/tannerlinsley"
},
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"fixme:test:lib": "pnpm run test:2 && pnpm run test:2.7 && pnpm run test:3",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"type": "module",
"types": "dist/esm/index.d.ts",
"main": "dist/cjs/index.cjs",
Expand All @@ -32,22 +48,6 @@
"./package.json": "./package.json"
},
"sideEffects": false,
"scripts": {
"clean": "rimraf ./dist && rimraf ./coverage",
"test:eslint": "eslint ./src ./tests",
"test:types": "pnpm run \"/^test:types:ts[0-9]{2}$/\"",
"test:types:ts49": "node ../../node_modules/typescript49/lib/tsc.js -p tsconfig.legacy.json",
"test:types:ts50": "node ../../node_modules/typescript50/lib/tsc.js",
"test:types:ts51": "node ../../node_modules/typescript51/lib/tsc.js",
"test:types:ts52": "node ../../node_modules/typescript52/lib/tsc.js",
"test:types:ts53": "node ../../node_modules/typescript53/lib/tsc.js",
"test:types:ts54": "tsc",
"fixme:test:lib": "pnpm run test:2 && pnpm run test:2.7 && pnpm run test:3",
"test:lib": "vitest",
"test:lib:dev": "pnpm run test:lib --watch",
"test:build": "publint --strict",
"build": "vite build"
},
"files": [
"dist",
"src"
Expand Down
Loading

0 comments on commit ae8377a

Please sign in to comment.