diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 91029a4..aa8b818 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -51,15 +51,3 @@ jobs: run: make -C tests/simple run-base - name: Build and run wevaled 'simple' test run: make -C tests/simple run-wevaled - - test-js: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: latest - - run: npm install - working-directory: npm/weval - - run: npm test - working-directory: npm/weval diff --git a/Cargo.lock b/Cargo.lock index 865ce9b..919e942 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2512,7 +2512,7 @@ dependencies = [ [[package]] name = "weval" -version = "0.3.3" +version = "0.3.4" dependencies = [ "anyhow", "bincode", diff --git a/Cargo.toml b/Cargo.toml index 504dca0..aa6b491 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "weval" description = "The WebAssembly partial evaluator" repository = "https://github.com/bytecodealliance/weval" -version = "0.3.3" +version = "0.3.4" authors = ["Chris Fallin "] license = "Apache-2.0 WITH LLVM-exception" edition = "2021" diff --git a/npm/weval/index.js b/npm/weval/index.js index 53a9598..5fdc892 100644 --- a/npm/weval/index.js +++ b/npm/weval/index.js @@ -12,16 +12,9 @@ import xz from "@napi-rs/lzma/xz"; const __dirname = dirname(fileURLToPath(import.meta.url)); -const TAG = "v0.3.3"; +const TAG = "v0.3.4"; -/** - * Download Weval from GitHub releases - * - * @param {object} [opts] - * @param {string} [opts.downloadDir] - Directory to which the binary should be downloaded - * @returns {string} path to the downloaded binary on disk - */ -export async function getWeval(opts) { +async function getWeval() { const knownPlatforms = { "win32 x64 LE": "x86_64-windows", "darwin arm64 LE": "aarch64-macos", @@ -45,7 +38,7 @@ export async function getWeval(opts) { const assetSuffix = platform == "win32" ? "zip" : "tar.xz"; const exeSuffix = platform == "win32" ? ".exe" : ""; - const exeDir = join(opts && opts.downloadDir ? opts.downloadDir : __dirname, platformName); + const exeDir = join(__dirname, platformName); const exe = join(exeDir, `weval${exeSuffix}`); // If we already have the executable installed, then return it diff --git a/npm/weval/package.json b/npm/weval/package.json index 13d83b2..0a2b70e 100644 --- a/npm/weval/package.json +++ b/npm/weval/package.json @@ -1,10 +1,9 @@ { "name": "@bytecodealliance/weval", - "version": "0.3.3", + "version": "0.3.4", "description": "The WebAssembly partial evaluator", "type": "module", "scripts": { - "test": "node ./tests/index.mjs", "version": "node ./update.js $npm_package_version" }, "dependencies": { diff --git a/npm/weval/tests/download.mjs b/npm/weval/tests/download.mjs deleted file mode 100644 index e5f142c..0000000 --- a/npm/weval/tests/download.mjs +++ /dev/null @@ -1,17 +0,0 @@ -import assert from "node:assert"; -import { test } from "node:test"; -import { tmpdir } from "node:os"; -import { join } from "node:path"; -import { mkdtemp, access } from 'node:fs/promises'; - -import { getWeval } from "../index.js"; - -export default async function tests() { - test("downloading works", async () => { - const downloadDir = await mkdtemp(join(tmpdir(), "weval-dl-")); - const wevalPath = await getWeval({ downloadDir }); - assert(wevalPath); - await access(wevalPath); - console.log(`weval path: ${wevalPath}`); - }); -} diff --git a/npm/weval/tests/index.mjs b/npm/weval/tests/index.mjs deleted file mode 100644 index fc6542d..0000000 --- a/npm/weval/tests/index.mjs +++ /dev/null @@ -1,3 +0,0 @@ -import { default as downloadTests } from "./download.mjs"; - -await downloadTests();