setup npm-previews of all packages (#9118)

* add workflow

* fix pkg jsons

* workflow name

* add changeset

* fix

* add changeset

* fix build command

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
This commit is contained in:
pngwn 2024-08-15 12:56:17 +01:00 committed by GitHub
parent 474102a8b4
commit e1c404da11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
64 changed files with 440 additions and 13 deletions

View File

@ -0,0 +1,66 @@
---
"@gradio/accordion": patch
"@gradio/annotatedimage": patch
"@gradio/atoms": patch
"@gradio/audio": patch
"@gradio/box": patch
"@gradio/build": patch
"@gradio/button": patch
"@gradio/chatbot": patch
"@gradio/checkbox": patch
"@gradio/checkboxgroup": patch
"@gradio/client": patch
"@gradio/code": patch
"@gradio/colorpicker": patch
"@gradio/column": patch
"@gradio/core": patch
"@gradio/dataframe": patch
"@gradio/dataset": patch
"@gradio/datetime": patch
"@gradio/downloadbutton": patch
"@gradio/dropdown": patch
"@gradio/fallback": patch
"@gradio/file": patch
"@gradio/fileexplorer": patch
"@gradio/form": patch
"@gradio/gallery": patch
"@gradio/group": patch
"@gradio/highlightedtext": patch
"@gradio/html": patch
"@gradio/icons": patch
"@gradio/image": patch
"@gradio/imageeditor": patch
"@gradio/json": patch
"@gradio/label": patch
"@gradio/markdown": patch
"@gradio/model3d": patch
"@gradio/multimodaltextbox": patch
"@gradio/nativeplot": patch
"@gradio/number": patch
"@gradio/paramviewer": patch
"@gradio/plot": patch
"@gradio/radio": patch
"@gradio/row": patch
"@gradio/simpledropdown": patch
"@gradio/simpleimage": patch
"@gradio/simpletextbox": patch
"@gradio/slider": patch
"@gradio/spa": patch
"@gradio/state": patch
"@gradio/statustracker": patch
"@gradio/tabitem": patch
"@gradio/tabs": patch
"@gradio/textbox": patch
"@gradio/theme": patch
"@gradio/timer": patch
"@gradio/tooltip": patch
"@gradio/upload": patch
"@gradio/uploadbutton": patch
"@gradio/utils": patch
"@gradio/video": patch
"@gradio/wasm": patch
"gradio": patch
"gradio_test": patch
---
feat:setup npm-previews of all packages

54
.github/workflows/npm-previews.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: "npm"
on:
pull_request:
env:
CI: true
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
NODE_OPTIONS: "--max-old-space-size=4096"
concurrency:
group: "${{ github.event.pull_request.number }}-${{ github.ref_name }}-${{ github.workflow }}"
cancel-in-progress: true
permissions: {}
jobs:
changes:
permissions:
contents: read
pull-requests: read
name: "changes"
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.changes.outputs.should_run }}
sha: ${{ steps.changes.outputs.sha }}
pr_number: ${{ steps.changes.outputs.pr_number }}
source_branch: ${{ steps.changes.outputs.source_branch }}
source_repo: ${{ steps.changes.outputs.source_repo }}
steps:
- uses: actions/checkout@v4
- uses: "gradio-app/gradio/.github/actions/changes@main"
id: changes
with:
filter: "js"
token: ${{ secrets.GITHUB_TOKEN }}
preview:
permissions:
contents: read
name: npm-previews
runs-on: ubuntu-22.04
needs: changes
if: needs.changes.outputs.should_run == 'true'
steps:
- uses: actions/checkout@v4
- name: install dependencies
uses: "gradio-app/gradio/.github/actions/install-frontend-deps@main"
with:
always_install_pnpm: true
skip_build: true
- name: build client
run: pnpm --filter @gradio/client --filter @gradio/wasm --filter @gradio/preview build
- name: publish npm previews
run: pnpx pkg-pr-new publish './js/*' './client/js' --comment=off

View File

@ -39,5 +39,10 @@
"engines": {
"node": ">=18.0.0"
},
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "client/js"
}
}

View File

@ -3,5 +3,6 @@
"version": "1.3.0",
"description": "",
"python": "true",
"main_changeset": true
"main_changeset": true,
"private": true
}

View File

@ -19,5 +19,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/accordion"
}
}

View File

@ -22,5 +22,10 @@
"@gradio/utils": "workspace:^",
"@gradio/client": "workspace:^",
"@gradio/wasm": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/annotatedimage"
}
}

View File

@ -10,5 +10,10 @@
"@gradio/utils": "workspace:^",
"@gradio/icons": "workspace:^"
},
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/atoms"
}
}

View File

@ -33,5 +33,10 @@
"./shared": "./shared/index.ts",
"./base": "./static/StaticAudio.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/audio"
}
}

View File

@ -13,5 +13,10 @@
},
"dependencies": {
"@gradio/atoms": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/box"
}
}

View File

@ -15,5 +15,10 @@
"esbuild": "^0.21.0",
"svelte-i18n": "^3.6.0"
},
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/build"
}
}

View File

@ -19,5 +19,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/button"
}
}

View File

@ -34,5 +34,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/chatbot"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/checkbox"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/checkboxgroup"
}
}

View File

@ -43,5 +43,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/code"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/colorpicker"
}
}

View File

@ -16,5 +16,10 @@
"@gradio/preview": "workspace:^",
"@gradio/statustracker": "workspace:^",
"@gradio/utils": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/column"
}
}

View File

@ -74,5 +74,10 @@
"./package.json": "./package.json",
".": "./index.ts"
},
"main": "./index.ts"
"main": "./index.ts",
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/core"
}
}

View File

@ -32,5 +32,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dataframe"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dataset"
}
}

View File

@ -21,5 +21,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/datetime"
}
}

View File

@ -19,5 +19,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/downloadbutton"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dropdown"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/fallback"
}
}

View File

@ -24,5 +24,10 @@
".": "./Index.svelte",
"./example": "./Example.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/file"
}
}

View File

@ -25,5 +25,10 @@
".": "./Index.svelte",
"./example": "./Example.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/fileexplorer"
}
}

View File

@ -19,5 +19,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/form"
}
}

View File

@ -26,5 +26,10 @@
".": "./Index.svelte",
"./package.json": "./package.json",
"./base": "./shared/Gallery.svelte"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/gallery"
}
}

View File

@ -13,5 +13,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/group"
}
}

View File

@ -21,5 +21,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/highlightedtext"
}
}

View File

@ -21,5 +21,10 @@
"./base": "./Index.svelte",
"./example": "./Example.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/html"
}
}

View File

@ -6,5 +6,11 @@
"main": "src/index.ts",
"author": "",
"license": "ISC",
"main_changeset": true
"private": false,
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/icons"
}
}

View File

@ -29,5 +29,10 @@
"./example": "./Example.svelte",
"./base": "./shared/ImagePreview.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/image"
}
}

View File

@ -28,5 +28,10 @@
".": "./Index.svelte",
"./example": "./Example.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/imageeditor"
}
}

View File

@ -20,5 +20,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/json"
}
}

View File

@ -20,5 +20,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/label"
}
}

View File

@ -31,5 +31,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/markdown"
}
}

View File

@ -29,5 +29,10 @@
".": "./Index.svelte",
"./example": "./Example.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/model3D"
}
}

View File

@ -25,5 +25,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/multimodaltextbox"
}
}

View File

@ -24,5 +24,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/nativeplot"
}
}

View File

@ -19,5 +19,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/number"
}
}

View File

@ -21,5 +21,10 @@
"devDependencies": {
"@types/prismjs": "^1.26.3",
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/paramviewer"
}
}

View File

@ -27,5 +27,10 @@
".": "./Index.svelte",
"./package.json": "./package.json",
"./base": "./shared/Plot.svelte"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/plot"
}
}

View File

@ -5,7 +5,7 @@
"type": "module",
"author": "",
"license": "ISC",
"private": false,
"private": true,
"main_changeset": true,
"exports": {
".": "./Index.svelte",
@ -13,5 +13,10 @@
"./package.json": "./package.json"
},
"dependencies": {},
"devDependencies": {}
"devDependencies": {},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/preview/test/test/frontend"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/radio"
}
}

View File

@ -15,5 +15,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/row"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/simpledropdown"
}
}

View File

@ -28,5 +28,10 @@
"./example": "./Example.svelte",
"./base": "./shared/ImagePreview.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/simpleimage"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/simpletextbox"
}
}

View File

@ -19,5 +19,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/slider"
}
}

View File

@ -37,5 +37,10 @@
"workerDirectory": "public"
},
"main_changeset": true,
"main": "./src/Index.svelte"
"main": "./src/Index.svelte",
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/spa"
}
}

View File

@ -10,5 +10,10 @@
"exports": {
".": "./Index.svelte",
"./package.json": "./package.json"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/state"
}
}

View File

@ -23,5 +23,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/statustracker"
}
}

View File

@ -18,5 +18,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/tabitem"
}
}

View File

@ -17,5 +17,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/tabs"
}
}

View File

@ -21,5 +21,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/textbox"
}
}

View File

@ -10,5 +10,10 @@
"scripts": {
"generate": "pollen -c src/pollen.config.cjs"
},
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/theme"
}
}

View File

@ -16,5 +16,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/timer"
}
}

View File

@ -6,5 +6,10 @@
"main": "src/index.ts",
"author": "",
"license": "ISC",
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/tooltip"
}
}

View File

@ -16,5 +16,10 @@
"main_changeset": true,
"exports": {
".": "./src/index.ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/upload"
}
}

View File

@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/uploadbutton"
}
}

View File

@ -10,5 +10,10 @@
"@gradio/theme": "workspace:^",
"svelte-i18n": "^3.6.0"
},
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/utils"
}
}

View File

@ -30,5 +30,10 @@
"./package.json": "./package.json"
},
"main": "index.ts",
"main_changeset": true
"main_changeset": true,
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/video"
}
}

View File

@ -28,5 +28,10 @@
"dependencies": {
"@types/path-browserify": "^1.0.0",
"path-browserify": "^1.0.1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/wasm"
}
}