Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ jobs:
cp tmp/tgz/vp target/release/vp 2>/dev/null || cp tmp/tgz/vp.exe target/release/vp.exe 2>/dev/null || true
cp tmp/tgz/vp-shim.exe target/release/vp-shim.exe 2>/dev/null || true
chmod +x target/release/vp 2>/dev/null || true
node $GITHUB_WORKSPACE/packages/tools/src/install-global-cli.ts --tgz $GITHUB_WORKSPACE/tmp/tgz/vite-plus-0.0.0.tgz
VP_TGZ=$(ls "$GITHUB_WORKSPACE"/tmp/tgz/vite-plus-[0-9]*.tgz | head -n1)
node "$GITHUB_WORKSPACE"/packages/tools/src/install-global-cli.ts --tgz "$VP_TGZ"
# Use USERPROFILE (native Windows path) instead of HOME (Git Bash path /c/Users/...)
# so cmd.exe and Node.js execSync can resolve binaries in PATH
echo "${USERPROFILE:-$HOME}/.vite-plus/bin" >> $GITHUB_PATH
Expand Down
19 changes: 14 additions & 5 deletions .github/workflows/test-vp-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,6 @@ jobs:
- yarn
- bun
env:
VP_OVERRIDE_PACKAGES: '{"vite":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz","vitest":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-test-0.0.0.tgz","@voidzero-dev/vite-plus-core":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-core-0.0.0.tgz","@voidzero-dev/vite-plus-test":"file:${{ github.workspace }}/tmp/tgz/voidzero-dev-vite-plus-test-0.0.0.tgz"}'
VP_VERSION: 'file:${{ github.workspace }}/tmp/tgz/vite-plus-0.0.0.tgz'
# Force full dependency rewriting so the library template's existing
# vite-plus dep gets overridden with the local tgz
VP_FORCE_MIGRATE: '1'
Expand All @@ -170,12 +168,22 @@ jobs:
name: vite-plus-packages
path: tmp/tgz

- name: Resolve tgz paths
run: |
CLI_TGZ=$(ls "$GITHUB_WORKSPACE"/tmp/tgz/vite-plus-[0-9]*.tgz | head -n1)
CORE_TGZ=$(ls "$GITHUB_WORKSPACE"/tmp/tgz/voidzero-dev-vite-plus-core-[0-9]*.tgz | head -n1)
TEST_TGZ=$(ls "$GITHUB_WORKSPACE"/tmp/tgz/voidzero-dev-vite-plus-test-[0-9]*.tgz | head -n1)
echo "CLI_TGZ=$CLI_TGZ" >> $GITHUB_ENV
echo "VP_VERSION=file:$CLI_TGZ" >> $GITHUB_ENV
printf 'VP_OVERRIDE_PACKAGES={"vite":"file:%s","vitest":"file:%s","@voidzero-dev/vite-plus-core":"file:%s","@voidzero-dev/vite-plus-test":"file:%s"}\n' \
"$CORE_TGZ" "$TEST_TGZ" "$CORE_TGZ" "$TEST_TGZ" >> $GITHUB_ENV

- name: Install vp CLI
run: |
mkdir -p target/release
cp tmp/tgz/vp target/release/vp
chmod +x target/release/vp
node $GITHUB_WORKSPACE/packages/tools/src/install-global-cli.ts --tgz $GITHUB_WORKSPACE/tmp/tgz/vite-plus-0.0.0.tgz
node $GITHUB_WORKSPACE/packages/tools/src/install-global-cli.ts --tgz "$CLI_TGZ"
echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH

- name: Verify vp installation
Expand Down Expand Up @@ -258,9 +266,10 @@ jobs:
run: |
node -e "
const path = require('path');
const expected = require('$GITHUB_WORKSPACE/packages/cli/package.json').version;
const pkg = require(path.resolve('node_modules/vite-plus/package.json'));
if (pkg.version !== '0.0.0') {
console.error('Expected vite-plus@0.0.0, got ' + pkg.version);
if (pkg.version !== expected) {
console.error('Expected vite-plus@' + expected + ', got ' + pkg.version);
process.exit(1);
}
console.log('✓ vite-plus@' + pkg.version + ' installed correctly');
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/vite_global_cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vite_global_cli"
version = "0.0.0"
version = "0.1.22"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
13 changes: 8 additions & 5 deletions ecosystem-ci/patch-project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ import { execSync } from 'node:child_process';
import { readFile, writeFile } from 'node:fs/promises';
import { join } from 'node:path';

import cliPkg from '../packages/cli/package.json' with { type: 'json' };
import { ecosystemCiDir, tgzDir } from './paths.ts';
import repos from './repo.json' with { type: 'json' };

const vpVersion = cliPkg.version;

const projects = Object.keys(repos);

const project = process.argv[2];
Expand Down Expand Up @@ -54,11 +57,11 @@ execSync(`${cli} migrate --no-agent --no-interactive`, {
...process.env,
...(forceFreshMigration ? { VP_FORCE_MIGRATE: '1' } : {}),
VP_OVERRIDE_PACKAGES: JSON.stringify({
vite: `file:${tgzDir}/voidzero-dev-vite-plus-core-0.0.0.tgz`,
vitest: `file:${tgzDir}/voidzero-dev-vite-plus-test-0.0.0.tgz`,
'@voidzero-dev/vite-plus-core': `file:${tgzDir}/voidzero-dev-vite-plus-core-0.0.0.tgz`,
'@voidzero-dev/vite-plus-test': `file:${tgzDir}/voidzero-dev-vite-plus-test-0.0.0.tgz`,
vite: `file:${tgzDir}/voidzero-dev-vite-plus-core-${vpVersion}.tgz`,
vitest: `file:${tgzDir}/voidzero-dev-vite-plus-test-${vpVersion}.tgz`,
'@voidzero-dev/vite-plus-core': `file:${tgzDir}/voidzero-dev-vite-plus-core-${vpVersion}.tgz`,
'@voidzero-dev/vite-plus-test': `file:${tgzDir}/voidzero-dev-vite-plus-test-${vpVersion}.tgz`,
}),
VP_VERSION: `file:${tgzDir}/vite-plus-0.0.0.tgz`,
VP_VERSION: `file:${tgzDir}/vite-plus-${vpVersion}.tgz`,
},
});
4 changes: 3 additions & 1 deletion ecosystem-ci/verify-install.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { createRequire } from 'node:module';

import cliPkg from '../packages/cli/package.json' with { type: 'json' };

const require = createRequire(`${process.cwd()}/`);

const expectedVersion = '0.0.0';
const expectedVersion = cliPkg.version;

try {
const pkg = require('vite-plus/package.json') as { version: string; name: string };
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/binding/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vite-plus-cli"
version = "0.0.0"
version = "0.1.22"
authors.workspace = true
edition.workspace = true
license.workspace = true
Expand Down
Loading
Loading