ReviewOS

also looking at this

stacks/ts-pantry

chore(deps): update all non-major dependencies

#783
Closed chris wants to merge buddy-bot/update-non-major-updates-1766052465410 into main
7 files +17 -17

Review threads live on the whole diff, not on one commit, so none are shown here - a thread's line means something in the branch's final form, and painting it into an intermediate step would put it on code it is not about.

.github/workflows/build-binaries.ymladded+293-0
Changes to .github/workflows/build-binaries.yml
@@ -0,0 +1,293 @@
1name: Build Package Binaries
2
3on:
4 workflow_dispatch:
5 inputs:
6 package:
7 description: 'Package domain to build'
8 required: true
9 type: choice
10 options:
11 - php.net
12 - postgresql.org
13 - redis.io
14 version:
15 description: 'Version to build (leave empty for latest from pantry)'
16 required: false
17 type: string
18 platforms:
19 description: 'Platforms to build'
20 required: true
21 type: choice
22 default: 'all'
23 options:
24 - all
25 - darwin-arm64
26 - darwin-x86-64
27 - linux-x86-64
28
29env:
30 AWS_REGION: us-east-1
31 S3_BUCKET: pantry-registry
32
33jobs:
34 prepare:
35 name: Prepare build
36 runs-on: ubuntu-latest
37 outputs:
38 version: ${{ steps.version.outputs.version }}
39 matrix: ${{ steps.matrix.outputs.matrix }}
40 steps:
41 - name: Checkout repository
42 uses: actions/checkout@v5
43
44 - name: Setup Bun
45 uses: oven-sh/setup-bun@v2.1.2
46 with:
47 bun-version: latest
48
49 - name: Install dependencies
50 run: bun install
51
52 - name: Determine version
53 id: version
54 run: |
55 PACKAGE="${⁠{ github.event.inputs.package }}"
56 INPUT_VERSION="${⁠{ github.event.inputs.version }}"
57
58 if [ -n "$INPUT_VERSION" ]; then
59 VERSION="$INPUT_VERSION"
60 else
61 # Convert package domain to filename (php.net -> phpnet.ts)
62 PACKAGE_FILE="src/packages/${PACKAGE//./}net.ts"
63
64 # Try different naming patterns
65 if [ ! -f "$PACKAGE_FILE" ]; then
66 PACKAGE_FILE="src/packages/${PACKAGE//./-}.ts"
67 fi
68 if [ ! -f "$PACKAGE_FILE" ]; then
69 PACKAGE_FILE="src/packages/${PACKAGE//./}.ts"
70 fi
71
72 # Extract version from the versions array in the TypeScript file
73 if [ -f "$PACKAGE_FILE" ]; then
74 VERSION=$(grep -A1 "versions:" "$PACKAGE_FILE" | grep -oE "'[0-9]+\.[0-9]+\.[0-9]+'" | head -1 | tr -d "'")
75 fi
76
77 if [ -z "$VERSION" ]; then
78 echo "Could not determine version from $PACKAGE_FILE, please specify manually"
79 exit 1
80 fi
81 fi
82
83 echo "version=$VERSION" >> $GITHUB_OUTPUT
84 echo "Building $PACKAGE version $VERSION"
85
86 - name: Set build matrix
87 id: matrix
88 run: |
89 PLATFORMS="${⁠{ github.event.inputs.platforms }}"
90
91 if [ "$PLATFORMS" = "all" ]; then
92 MATRIX='{"include":[{"os":"macos-14","platform":"darwin-arm64"},{"os":"macos-13","platform":"darwin-x86-64"},{"os":"ubuntu-latest","platform":"linux-x86-64"}]}'
93 elif [ "$PLATFORMS" = "darwin-arm64" ]; then
94 MATRIX='{"include":[{"os":"macos-14","platform":"darwin-arm64"}]}'
95 elif [ "$PLATFORMS" = "darwin-x86-64" ]; then
96 MATRIX='{"include":[{"os":"macos-13","platform":"darwin-x86-64"}]}'
97 elif [ "$PLATFORMS" = "linux-x86-64" ]; then
98 MATRIX='{"include":[{"os":"ubuntu-latest","platform":"linux-x86-64"}]}'
99 fi
100
101 echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
102
103 build:
104 name: Build ${{ github.event.inputs.package }} (${{ matrix.platform }})
105 needs: prepare
106 strategy:
107 fail-fast: false
108 matrix: ${{ fromJson(needs.prepare.outputs.matrix) }}
109 runs-on: ${{ matrix.os }}
110
111 steps:
112 - name: Checkout repository
113 uses: actions/checkout@v5
114
115 - name: Setup Bun
116 uses: oven-sh/setup-bun@v2.1.2
117 with:
118 bun-version: latest
119
120 - name: Install dependencies
121 run: bun install
122
123 - name: Install build tools (macOS)
124 if: contains(matrix.platform, 'darwin')
125 run: |
126 brew install autoconf automake libtool pkg-config bison re2c
127
128 # For PHP with pdo-pgsql
129 if [ "${⁠{ github.event.inputs.package }}" = "php.net" ]; then
130 brew install postgresql openssl@1.1 libsodium libzip oniguruma sqlite icu4c \
131 freetype libpng webp jpeg curl libxml2 libxslt readline gettext gmp libiconv krb5
132 fi
133
134 # For PostgreSQL
135 if [ "${⁠{ github.event.inputs.package }}" = "postgresql.org" ]; then
136 brew install openssl readline zlib lz4 libxml2 libxslt icu4c flex perl
137 fi
138
139 # For Redis
140 if [ "${⁠{ github.event.inputs.package }}" = "redis.io" ]; then
141 brew install openssl
142 fi
143
144 - name: Install build tools (Linux)
145 if: contains(matrix.platform, 'linux')
146 run: |
147 sudo apt-get update
148 sudo apt-get install -y build-essential autoconf automake libtool pkg-config
149
150 # For PHP with pdo-pgsql and pdo-mysql
151 if [ "${⁠{ github.event.inputs.package }}" = "php.net" ]; then
152 sudo apt-get install -y \
153 bison re2c \
154 libssl-dev libsodium-dev libzip-dev libonig-dev \
155 libsqlite3-dev libicu-dev libfreetype6-dev libpng-dev \
156 libwebp-dev libjpeg-dev libcurl4-openssl-dev libxml2-dev \
157 libxslt1-dev libedit-dev libffi-dev libpq-dev \
158 libreadline-dev libgmp-dev libkrb5-dev libbz2-dev \
159 default-libmysqlclient-dev liblz4-dev
160 fi
161
162 # For PostgreSQL
163 if [ "${⁠{ github.event.inputs.package }}" = "postgresql.org" ]; then
164 sudo apt-get install -y \
165 libssl-dev libreadline-dev zlib1g-dev liblz4-dev \
166 libxml2-dev libxslt1-dev libicu-dev flex bison perl
167 fi
168
169 # For Redis
170 if [ "${⁠{ github.event.inputs.package }}" = "redis.io" ]; then
171 sudo apt-get install -y libssl-dev
172 fi
173
174 - name: Build package
175 id: build
176 run: |
177 PACKAGE="${⁠{ github.event.inputs.package }}"
178 VERSION="${⁠{ needs.prepare.outputs.version }}"
179 PLATFORM="${⁠{ matrix.platform }}"
180
181 # Create directories
182 BUILD_DIR="${⁠{ runner.temp }}/build-${PACKAGE}-${VERSION}"
183 INSTALL_PREFIX="${⁠{ runner.temp }}/install-${PACKAGE}-${VERSION}"
184 mkdir -p "$BUILD_DIR" "$INSTALL_PREFIX"
185
186 echo "Building $PACKAGE $VERSION for $PLATFORM"
187 echo "Build directory: $BUILD_DIR"
188 echo "Install prefix: $INSTALL_PREFIX"
189
190 # Run the build script
191 bun scripts/build-package.ts \
192 --package "$PACKAGE" \
193 --version "$VERSION" \
194 --platform "$PLATFORM" \
195 --build-dir "$BUILD_DIR" \
196 --prefix "$INSTALL_PREFIX"
197
198 echo "install_prefix=$INSTALL_PREFIX" >> $GITHUB_OUTPUT
199
200 - name: Package artifacts
201 id: package
202 run: |
203 PACKAGE="${⁠{ github.event.inputs.package }}"
204 VERSION="${⁠{ needs.prepare.outputs.version }}"
205 PLATFORM="${⁠{ matrix.platform }}"
206 INSTALL_PREFIX="${⁠{ steps.build.outputs.install_prefix }}"
207
208 # Create tarball name matching S3 structure
209 SAFE_NAME="${PACKAGE//./-}"
210 ARTIFACT_NAME="${SAFE_NAME}-${VERSION}-${PLATFORM}"
211 ARTIFACT_PATH="${⁠{ runner.temp }}/${ARTIFACT_NAME}.tar.gz"
212
213 cd "$INSTALL_PREFIX"
214 tar -czvf "$ARTIFACT_PATH" .
215
216 # Generate SHA256
217 if [ "${⁠{ matrix.platform }}" = "darwin-arm64" ] || [ "${⁠{ matrix.platform }}" = "darwin-x86-64" ]; then
218 shasum -a 256 "$ARTIFACT_PATH" > "${ARTIFACT_PATH}.sha256"
219 else
220 sha256sum "$ARTIFACT_PATH" > "${ARTIFACT_PATH}.sha256"
221 fi
222
223 echo "artifact_path=$ARTIFACT_PATH" >> $GITHUB_OUTPUT
224 echo "artifact_name=$ARTIFACT_NAME" >> $GITHUB_OUTPUT
225
226 echo "Created artifact: $ARTIFACT_NAME"
227 ls -la "$ARTIFACT_PATH" "${ARTIFACT_PATH}.sha256"
228
229 - name: Upload build artifact
230 uses: actions/upload-artifact@v4
231 with:
232 name: ${{ steps.package.outputs.artifact_name }}
233 path: |
234 ${{ steps.package.outputs.artifact_path }}
235 ${{ steps.package.outputs.artifact_path }}.sha256
236 retention-days: 7
237
238 upload-to-s3:
239 name: Upload to S3
240 needs: [prepare, build]
241 runs-on: ubuntu-latest
242
243 steps:
244 - name: Checkout repository
245 uses: actions/checkout@v5
246
247 - name: Setup Bun
248 uses: oven-sh/setup-bun@v2.1.2
249 with:
250 bun-version: latest
251
252 - name: Install dependencies
253 run: bun install
254
255 - name: Download all artifacts
256 uses: actions/download-artifact@v4
257 with:
258 path: artifacts
259
260 - name: Upload to S3
261 env:
262 AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
263 AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
264 run: |
265 PACKAGE="${⁠{ github.event.inputs.package }}"
266 VERSION="${⁠{ needs.prepare.outputs.version }}"
267
268 echo "Uploading $PACKAGE $VERSION to S3"
269
270 bun scripts/upload-to-s3.ts \
271 --package "$PACKAGE" \
272 --version "$VERSION" \
273 --artifacts-dir "./artifacts" \
274 --bucket "$S3_BUCKET" \
275 --region "$AWS_REGION"
276
277 - name: Summary
278 run: |
279 PACKAGE="${⁠{ github.event.inputs.package }}"
280 VERSION="${⁠{ needs.prepare.outputs.version }}"
281
282 echo "## Build Complete" >> $GITHUB_STEP_SUMMARY
283 echo "" >> $GITHUB_STEP_SUMMARY
284 echo "**Package:** $PACKAGE" >> $GITHUB_STEP_SUMMARY
285 echo "**Version:** $VERSION" >> $GITHUB_STEP_SUMMARY
286 echo "" >> $GITHUB_STEP_SUMMARY
287 echo "### Uploaded to S3" >> $GITHUB_STEP_SUMMARY
288 echo "" >> $GITHUB_STEP_SUMMARY
289
290 for artifact_dir in artifacts/*/; do
291 artifact_name=$(basename "$artifact_dir")
292 echo "- \`$artifact_name\`" >> $GITHUB_STEP_SUMMARY
293 done
.github/workflows/release.ymlmodified+9-21
Changes to .github/workflows/release.yml
@@ -36,7 +36,7 @@ jobs:
3636 echo "================================="
3737
3838 - name: Checkout Code
39 uses: actions/checkout@v5
39 uses: actions/checkout@v6.0.1
4040 with:
4141 token: ${{ secrets.PAT_TOKEN || github.token }}
4242 fetch-depth: 0
@@ -133,7 +133,7 @@ jobs:
133133 version: ${{ env.VERSION }}
134134 steps:
135135 - name: Checkout Code
136 uses: actions/checkout@v5
136 uses: actions/checkout@v6.0.1
137137 with:
138138 token: ${{ secrets.PAT_TOKEN || github.token }}
139139 fetch-depth: 0
@@ -142,7 +142,7 @@ jobs:
142142 uses: oven-sh/setup-bun@v2
143143
144144 - name: Use Cached node_modules
145 uses: actions/cache@v4.3.0
145 uses: actions/cache@v5.0.3
146146 with:
147147 path: node_modules
148148 key: node-modules-${{ hashFiles('**/bun.lock') }}
@@ -163,18 +163,15 @@ jobs:
163163 echo "Verifying zip files exist..."
164164 ls -la bin/*.zip || echo "No zip files found"
165165
166 - name: Publish to npm
167 run: bun publish --access public
168 env:
169 BUN_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
166 - name: Setup Pantry
167 uses: home-lang/pantry-setup@v1
170168
171 - name: Create GitHub Release
172 run: bunx changelogithub
169 - name: Publish
170 run: pantry npm:publish --access public
173171 env:
174 GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
172 NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
175173
176 - name: Attach Release Assets
177 id: create_release
174 - name: Create GitHub Release
178175 uses: stacksjs/action-releaser@v1.2.6
179176 with:
180177 files: |
@@ -183,14 +180,5 @@ jobs:
183180 ./bin/ts-pkgx-windows-x64.zip
184181 ./bin/ts-pkgx-darwin-x64.zip
185182 ./bin/ts-pkgx-darwin-arm64.zip
186 # --- Homebrew tap update support ---
187 # Path to your Homebrew formula template (update this path as needed)
188 # homebrewFormula: .github/homebrew-formula.rb
189 # The owner/repo of your Homebrew tap (update this value as needed)
190 # homebrewRepo: stacksjs/homebrew-tap
191 # Optionally uncomment and set these if you need custom values:
192 # homebrewBranch: main
193 # homebrewPath: Formula
194 # homebrewCommitFormat: "update: {⁠{ formula }} to {⁠{ version }}"
195183 env:
196184 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deps.yamlmodified+2-2
Changes to deps.yaml
@@ -1,3 +1,3 @@
11dependencies:
2 bun.sh: ^1.3.1
3 nodejs.org: ^24.11.0
2 php.net: ^8.5.0
3 bun.sh: ^1
package.jsonmodified+34-28
Changes to package.json
@@ -1,27 +1,26 @@
11{
2 "name": "ts-pkgx",
2 "name": "ts-pantry",
33 "type": "module",
4 "version": "0.4.188",
4 "version": "0.4.191",
55 "description": "A library & CLI for managing packages",
66 "author": "Chris Breuer <chris@stacksjs.org>",
77 "license": "MIT",
8 "homepage": "https://github.com/stacksjs/ts-pkgx#readme",
8 "homepage": "https://github.com/stacksjs/ts-pantry#readme",
99 "repository": {
1010 "type": "git",
11 "url": "git+https://github.com/stacksjs/ts-pkgx.git"
11 "url": "git+https://github.com/stacksjs/ts-pantry.git"
1212 },
1313 "bugs": {
14 "url": "https://github.com/stacksjs/ts-pkgx/issues"
14 "url": "https://github.com/stacksjs/ts-pantry/issues"
1515 },
1616 "keywords": [
17 "pkgx",
1817 "pantry",
19 "homebrew",
2018 "typescript",
2119 "bun",
2220 "package",
2321 "cli",
24 "library"
22 "library",
23 "package-manager"
2524 ],
2625 "exports": {
2726 ".": {
@@ -35,7 +34,8 @@
3534 "module": "./dist/src/index.js",
3635 "types": "./dist/index.d.ts",
3736 "bin": {
38 "ts-pkgx": "./dist/bin/cli.js"
37 "ts-pantry": "./dist/bin/cli.js",
38 "pantry": "./scripts/pantry-cli.ts"
3939 },
4040 "files": [
4141 "README.md",
@@ -44,22 +44,22 @@
4444 "scripts": {
4545 "build": "bun build.ts && bun run compile",
4646 "build:cross-platform": "bun scripts/build-cross-platform.ts",
47 "compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/ts-pkgx",
47 "compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/ts-pantry",
4848 "compile:all": "bun run compile:unix && bun run compile:windows-x64",
4949 "compile:unix": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64",
50 "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/ts-pkgx-linux-x64",
51 "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/ts-pkgx-linux-arm64",
52 "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/ts-pkgx-windows-x64.exe && sleep 3 && ls -la bin/ts-pkgx-windows-x64.exe && chmod +x bin/ts-pkgx-windows-x64.exe",
53 "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/ts-pkgx-darwin-x64",
54 "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/ts-pkgx-darwin-arm64",
50 "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/ts-pantry-linux-x64",
51 "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/ts-pantry-linux-arm64",
52 "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/ts-pantry-windows-x64.exe && sleep 3 && ls -la bin/ts-pantry-windows-x64.exe && chmod +x bin/ts-pantry-windows-x64.exe",
53 "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/ts-pantry-darwin-x64",
54 "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/ts-pantry-darwin-arm64",
5555 "zip": "bun run zip:all",
5656 "zip:all": "bun run zip:unix && bun run zip:windows-x64",
5757 "zip:unix": "bun run zip:linux-x64 && bun run zip:linux-arm64 && bun run zip:darwin-x64 && bun run zip:darwin-arm64",
58 "zip:linux-x64": "zip -j bin/ts-pkgx-linux-x64.zip bin/ts-pkgx-linux-x64",
59 "zip:linux-arm64": "zip -j bin/ts-pkgx-linux-arm64.zip bin/ts-pkgx-linux-arm64",
60 "zip:windows-x64": "if [ -f bin/ts-pkgx-windows-x64.exe ]; then ls -la bin/ts-pkgx-windows-x64.exe && zip -j bin/ts-pkgx-windows-x64.zip bin/ts-pkgx-windows-x64.exe; else echo 'Windows executable not found'; exit 1; fi",
61 "zip:darwin-x64": "zip -j bin/ts-pkgx-darwin-x64.zip bin/ts-pkgx-darwin-x64",
62 "zip:darwin-arm64": "zip -j bin/ts-pkgx-darwin-arm64.zip bin/ts-pkgx-darwin-arm64",
58 "zip:linux-x64": "zip -j bin/ts-pantry-linux-x64.zip bin/ts-pantry-linux-x64",
59 "zip:linux-arm64": "zip -j bin/ts-pantry-linux-arm64.zip bin/ts-pantry-linux-arm64",
60 "zip:windows-x64": "if [ -f bin/ts-pantry-windows-x64.exe ]; then ls -la bin/ts-pantry-windows-x64.exe && zip -j bin/ts-pantry-windows-x64.zip bin/ts-pantry-windows-x64.exe; else echo 'Windows executable not found'; exit 1; fi",
61 "zip:darwin-x64": "zip -j bin/ts-pantry-darwin-x64.zip bin/ts-pantry-darwin-x64",
62 "zip:darwin-arm64": "zip -j bin/ts-pantry-darwin-arm64.zip bin/ts-pantry-darwin-arm64",
6363 "test:yaml": "bun run src/tools/testYamlFetcher.ts",
6464 "fresh": "bunx rimraf node_modules/ bun.lock && bun i",
6565 "prepublishOnly": "bun run build && bun run build:cross-platform",
@@ -68,8 +68,10 @@
6868 "release:major": "bun scripts/bump-version.ts major",
6969 "release:dry-run": "bun scripts/bump-version.ts --dry-run",
7070 "test": "rm -rf dist/ && bun test",
71 "lint": "bunx --bun eslint .",
72 "lint:fix": "bunx --bun eslint . --fix",
71 "lint": "bunx --bun pickier lint .",
72 "lint:fix": "bunx --bun pickier lint . --fix",
73 "format": "bunx --bun pickier format .",
74 "format:fix": "bunx --bun pickier format . --write",
7375 "changelog": "bunx logsmith --verbose",
7476 "changelog:generate": "bunx logsmith --output CHANGELOG.md",
7577 "release": "bun run changelog:generate && bunx --bun bumpx prompt --recursive",
@@ -77,23 +79,27 @@
7779 "build:docs": "NODE_OPTIONS=\"--max-old-space-size=8192\" bun vitepress build docs",
7880 "preview:docs": "bun vitepress preview docs",
7981 "typecheck": "bun tsc --noEmit",
80 "pkgx:fetch": "bun bin/cli.ts fetch",
81 "pkgx:fetch-all": "bun bin/cli.ts fetch --all",
82 "pkgx:update": "bun run update:packages",
83 "pkgx:docs": "bun bin/cli.ts generate-docs"
82 "pantry:fetch": "bun bin/cli.ts fetch",
83 "pantry:fetch-all": "bun bin/cli.ts fetch --all",
84 "pantry:update": "bun run update:packages",
85 "pantry:docs": "bun bin/cli.ts generate-docs",
86 "pantry:install": "bun scripts/download-from-s3.ts",
87 "pantry:shell": "bun scripts/pantry-cli.ts shell",
88 "pantry:build": "bun scripts/build-package.ts",
89 "pantry:upload": "bun scripts/upload-to-s3.ts"
8490 },
8591 "dependencies": {
92 "@stacksjs/ts-cloud": "^0.1.3",
8693 "ts-web-scraper": "^0.1.1"
8794 },
8895 "devDependencies": {
8996 "@stacksjs/docs": "^0.70.23",
90 "@stacksjs/eslint-config": "^4.14.0-beta.3",
9197 "better-dx": "^0.2.5"
9298 },
9399 "git-hooks": {
94100 "pre-commit": {
95101 "staged-lint": {
96 "*.{js,ts,json,yaml,yml,md}": "bunx --bun eslint --fix"
102 "*.{js,ts,json,yaml,yml,md}": "bunx --bun pickier lint --fix"
97103 }
98104 },
99105 "commit-msg": "bunx gitlint --edit .git/COMMIT_EDITMSG"