Skip to content

Commit

Permalink
chore(lib): move lib/swc in lib
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-ippolito committed Aug 3, 2024
1 parent c5706c0 commit 1e99abb
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update-swc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Check if SWC update is required
id: version-check
run: |
CURRENT_SWC_VERSION=$(cat lib/swc/package.json | jq -r '.version')
CURRENT_SWC_VERSION=$(cat lib/package.json | jq -r '.version')
if [[ -n "${{ github.event.inputs.swc_version }}" ]]; then
NEW_SWC_VERSION="${{ github.event.inputs.swc_version }}"
else
Expand Down
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
22
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Options, TransformOutput } from "../lib/swc/wasm.d.ts";
import swc from "../lib/swc/wasm.js";
import type { Options, TransformOutput } from "../lib/wasm";
import swc from "../lib/wasm.js";

const DEFAULT_OPTIONS: Options = {
mode: "strip-only",
Expand Down
4 changes: 2 additions & 2 deletions tools/build-wasm.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { resolve } = require("node:path");
const ROOT = resolve(__dirname, "../");
const DOCKERFILE = resolve(__dirname, "./Dockerfile");

const name = "swc_build_wasm";
const name = `swc_build_wasm-${Date.now()}`;

const buildArgs = [
"build",
Expand All @@ -20,7 +20,7 @@ const runArgs = ["run", "-d", "--name", name, "swc_wasm_typescript"];
execFileSync("docker", runArgs, { stdio: "inherit" });

// Copies the new directory inside the Docker image to the host.
const copyArgs = ["cp", `${name}:/usr/src/amaro/swc`, `${ROOT}/lib`];
const copyArgs = ["cp", `${name}:/usr/src/amaro/swc/.`, `${ROOT}/lib/`];
execFileSync("docker", copyArgs, { stdio: "inherit" });

// Removes the Docker image.
Expand Down

0 comments on commit 1e99abb

Please sign in to comment.