Skip to content

Commit

Permalink
setup npm-previews of all packages (#9118)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
pngwn and gradio-pr-bot committed Aug 15, 2024
1 parent 474102a commit e1c404d
Show file tree
Hide file tree
Showing 64 changed files with 440 additions and 13 deletions.
66 changes: 66 additions & 0 deletions .changeset/soft-breads-say.md
Original file line number Diff line number Diff line change
@@ -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 changes: 54 additions & 0 deletions .github/workflows/npm-previews.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion client/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
3 changes: 2 additions & 1 deletion client/python/gradio_client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"version": "1.3.0",
"description": "",
"python": "true",
"main_changeset": true
"main_changeset": true,
"private": true
}
5 changes: 5 additions & 0 deletions js/accordion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/annotatedimage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
7 changes: 6 additions & 1 deletion js/atoms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/audio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/box/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,10 @@
},
"dependencies": {
"@gradio/atoms": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/box"
}
}
7 changes: 6 additions & 1 deletion js/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/chatbot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/checkbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/checkbox"
}
}
5 changes: 5 additions & 0 deletions js/checkboxgroup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/checkboxgroup"
}
}
5 changes: 5 additions & 0 deletions js/code/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/code"
}
}
5 changes: 5 additions & 0 deletions js/colorpicker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/colorpicker"
}
}
5 changes: 5 additions & 0 deletions js/column/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
7 changes: 6 additions & 1 deletion js/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/dataframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dataframe"
}
}
5 changes: 5 additions & 0 deletions js/dataset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dataset"
}
}
5 changes: 5 additions & 0 deletions js/datetime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/datetime"
}
}
5 changes: 5 additions & 0 deletions js/downloadbutton/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/dropdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/dropdown"
}
}
5 changes: 5 additions & 0 deletions js/fallback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,10 @@
},
"devDependencies": {
"@gradio/preview": "workspace:^"
},
"repository": {
"type": "git",
"url": "git+https://github.com/gradio-app/gradio.git",
"directory": "js/fallback"
}
}
5 changes: 5 additions & 0 deletions js/file/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/fileexplorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
5 changes: 5 additions & 0 deletions js/form/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
Loading

0 comments on commit e1c404d

Please sign in to comment.