GeezerVison is showing github.com — feat(ui): publish ui package (#33681) · BlueBlock/opencode@f4103f5
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: bun.lock +6-3Lines changed: 6 additions & 3 deletions Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +MIT License | | 2 | + | | 3 | +Copyright (c) 2025 opencode | | 4 | + | | 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | | 6 | +of this software and associated documentation files (the "Software"), to deal | | 7 | +in the Software without restriction, including without limitation the rights | | 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | | 9 | +copies of the Software, and to permit persons to whom the Software is | | 10 | +furnished to do so, subject to the following conditions: | | 11 | + | | 12 | +The above copyright notice and this permission notice shall be included in all | | 13 | +copies or substantial portions of the Software. | | 14 | + | | 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | | 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | | 21 | +SOFTWARE. |
Collapse file Copy file name to clipboardExpand all lines: packages/ui/package.json +34-3Lines changed: 34 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 3 | 3 | "version": "1.17.10", | 4 | 4 | "type": "module", | 5 | 5 | "license": "MIT", | | 6 | + "repository": { | | 7 | + "type": "git", | | 8 | + "url": "git+https://github.com/anomalyco/opencode.git", | | 9 | + "directory": "packages/ui" | | 10 | + }, | | 11 | + "publishConfig": { | | 12 | + "access": "public" | | 13 | + }, | | 14 | + "sideEffects": [ | | 15 | + "**/*.css" | | 16 | + ], | | 17 | + "files": [ | | 18 | + "src/**/*.ts", | | 19 | + "src/**/*.tsx", | | 20 | + "!src/**/*.test.ts", | | 21 | + "!src/**/*.test.tsx", | | 22 | + "!src/**/*.stories.ts", | | 23 | + "!src/**/*.stories.tsx", | | 24 | + "src/**/*.css", | | 25 | + "src/theme/themes/*.json", | | 26 | + "src/components/app-icons/sprite.svg", | | 27 | + "src/components/file-icons/sprite.svg", | | 28 | + "src/components/provider-icons/sprite.svg", | | 29 | + "src/assets/icons/app/*", | | 30 | + "src/assets/fonts/*", | | 31 | + "src/assets/audio/*", | | 32 | + "LICENSE" | | 33 | + ], | 6 | 34 | "exports": { | 7 | 35 | "./package.json": "./package.json", | 8 | 36 | "./*": "./src/components/*.tsx", | | 40 | 68 | "@types/katex": "0.16.7", | 41 | 69 | "@types/luxon": "catalog:", | 42 | 70 | "@typescript/native-preview": "catalog:", | | 71 | + "@solidjs/meta": "catalog:", | | 72 | + "solid-js": "catalog:", | 43 | 73 | "tailwindcss": "catalog:", | 44 | 74 | "typescript": "catalog:", | 45 | 75 | "vite": "catalog:", | | 54 | 84 | "@solid-primitives/event-listener": "2.4.5", | 55 | 85 | "@solid-primitives/media": "2.3.3", | 56 | 86 | "@solid-primitives/resize-observer": "2.1.3", | 57 | | - "@solidjs/meta": "catalog:", | 58 | | - "@solidjs/router": "catalog:", | 59 | 87 | "@shikijs/stream": "catalog:", | 60 | 88 | "diff": "catalog:", | 61 | 89 | "dompurify": "3.3.1", | | 72 | 100 | "remeda": "catalog:", | 73 | 101 | "remend": "catalog:", | 74 | 102 | "shiki": "catalog:", | 75 | | - "solid-js": "catalog:", | 76 | 103 | "solid-list": "catalog:", | 77 | 104 | "strip-ansi": "7.1.2" | | 105 | + }, | | 106 | + "peerDependencies": { | | 107 | + "@solidjs/meta": "^0.29.0", | | 108 | + "solid-js": "^1.9.0" | 78 | 109 | } | 79 | 110 | } |
Collapse file Copy file name to clipboard +26Lines changed: 26 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +#!/usr/bin/env bun | | 2 | + | | 3 | +import { Script } from "@opencode-ai/script" | | 4 | +import { $ } from "bun" | | 5 | +import { rm } from "node:fs/promises" | | 6 | +import { fileURLToPath } from "node:url" | | 7 | + | | 8 | +process.chdir(fileURLToPath(new URL("..", import.meta.url))) | | 9 | + | | 10 | +const pkg = (await Bun.file("package.json").json()) as { name: string; version: string } | | 11 | +const tarball = `${pkg.name.replace("@", "").replace("/", "-")}-${pkg.version}.tgz` | | 12 | + | | 13 | +if ((await $`npm view ${pkg.name}@${pkg.version} version`.nothrow()).exitCode === 0) { | | 14 | + console.log(`already published ${pkg.name}@${pkg.version}`) | | 15 | + process.exit(0) | | 16 | +} | | 17 | + | | 18 | +try { | | 19 | + await $`bun run typecheck` | | 20 | + await $`bun run test` | | 21 | + await rm(tarball, { force: true }) | | 22 | + await $`bun pm pack` | | 23 | + await $`npm publish ${tarball} --access public --tag ${Script.channel}` | | 24 | +} finally { | | 25 | + await rm(tarball, { force: true }) | | 26 | +} |
Collapse file Copy file name to clipboard Collapse file Copy file name to clipboard Collapse file Copy file name to clipboardExpand all lines: script/publish.ts +3Lines changed: 3 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -47,6 +47,9 @@ await $`bun ./packages/sdk/js/script/publish.ts` | 47 | 47 | console.log("\n=== plugin ===\n") | 48 | 48 | await $`bun ./packages/plugin/script/publish.ts` | 49 | 49 |
| | 50 | +console.log("\n=== ui ===\n") | | 51 | +await $`bun ./packages/ui/script/publish.ts` | | 52 | + | 50 | 53 | if (Script.release) { | 51 | 54 | await $`bun ./packages/desktop/scripts/finalize-latest-json.ts` | 52 | 55 | await $`bun ./packages/desktop/scripts/finalize-latest-yml.ts` | |
|