GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — opencode/script/pack.ts at dev · wataruY/opencode

Expand file tree

/

pack.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
45 lines (40 loc) · 1.28 KB
/

pack.ts

Copy path

File metadata and controls

45 lines (40 loc) · 1.28 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/bin/env bun
import { Script } from "@opencode/script"
import { $ } from "bun"
import { rm } from "node:fs/promises"
import path from "node:path"
// Runs `bun run pack` for every package published to npm, after moving every workspace to the build
// version so workspace dependencies pack at that version. Outputs land in dist/npm and dist/archives.
const root = path.resolve(import.meta.dir, "..")
process.chdir(root)
console.log(`=== packing ${Script.version} (${Script.channel}) ===\n`)
await rm("dist/npm", { recursive: true, force: true })
await rm("dist/archives", { recursive: true, force: true })
const pkgjsons = await Array.fromAsync(new Bun.Glob("**/package.json").scan({ absolute: true })).then((files) =>
files.filter((file) => !file.includes("node_modules") && !file.includes("dist")),
)
for (const file of pkgjsons) {
const text = await Bun.file(file).text()
await Bun.write(file, text.replaceAll(/"version": "[^"]+"/g, `"version": "${Script.version}"`))
}
await $`bun install`
for (const name of [
"schema",
"codemode",
"theme",
"ai",
"util",
"protocol",
"client",
"plugin",
"plugin-browser",
"core",
"simulation",
"server",
"sdk",
"ui",
"cli",
]) {
console.log(`\n=== ${name} ===\n`)
await $`bun run pack`.cwd(path.join("packages", name))
}
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.