Browse Source

feat(build-ts-package): omg, swc is producing something that ACTUALLY works

benduran 3 weeks ago
parent
commit
7958e44f8c

+ 5 - 5
apps/hermes/client/js/package.json

@@ -64,24 +64,24 @@
   "packageManager": "pnpm@10.19.0",
   "exports": {
     "./HermesClient": {
-      "import": "./dist/HermesClient.mjs",
+      "default": "./dist/HermesClient.js",
       "types": "./dist/HermesClient.d.ts"
     },
     ".": {
-      "import": "./dist/index.mjs",
+      "default": "./dist/index.js",
       "types": "./dist/index.d.ts"
     },
     "./utils": {
-      "import": "./dist/utils.mjs",
+      "default": "./dist/utils.js",
       "types": "./dist/utils.d.ts"
     },
     "./zodSchemas": {
-      "import": "./dist/zodSchemas.mjs",
+      "default": "./dist/zodSchemas.js",
       "types": "./dist/zodSchemas.d.ts"
     },
     "./package.json": "./package.json"
   },
   "types": "./dist/index.d.ts",
-  "module": "./dist/index.mjs",
+  "module": "./dist/index.js",
   "main": "./dist/cjs/index.js"
 }

+ 25 - 25
governance/pyth_staking_sdk/package.json

@@ -4,117 +4,117 @@
   "description": "Pyth staking SDK",
   "exports": {
     "./constants": {
-      "import": "./dist/esm/constants.mjs",
+      "import": "./dist/esm/constants.js",
       "types": "./dist/esm/constants.d.ts",
       "require": "./dist/cjs/constants.js"
     },
     "./idl/integrity-pool": {
-      "import": "./dist/esm/idl/integrity-pool.mjs",
+      "import": "./dist/esm/idl/integrity-pool.js",
       "types": "./dist/esm/idl/integrity-pool.d.ts",
       "require": "./dist/cjs/idl/integrity-pool.js"
     },
     "./idl/publisher-caps": {
-      "import": "./dist/esm/idl/publisher-caps.mjs",
+      "import": "./dist/esm/idl/publisher-caps.js",
       "types": "./dist/esm/idl/publisher-caps.d.ts",
       "require": "./dist/cjs/idl/publisher-caps.js"
     },
     "./idl/stake-caps-parameters": {
-      "import": "./dist/esm/idl/stake-caps-parameters.mjs",
+      "import": "./dist/esm/idl/stake-caps-parameters.js",
       "types": "./dist/esm/idl/stake-caps-parameters.d.ts",
       "require": "./dist/cjs/idl/stake-caps-parameters.js"
     },
     "./idl/staking": {
-      "import": "./dist/esm/idl/staking.mjs",
+      "import": "./dist/esm/idl/staking.js",
       "types": "./dist/esm/idl/staking.d.ts",
       "require": "./dist/cjs/idl/staking.js"
     },
     ".": {
-      "import": "./dist/esm/index.mjs",
+      "import": "./dist/esm/index.js",
       "types": "./dist/esm/index.d.ts",
       "require": "./dist/cjs/index.js"
     },
     "./pdas": {
-      "import": "./dist/esm/pdas.mjs",
+      "import": "./dist/esm/pdas.js",
       "types": "./dist/esm/pdas.d.ts",
       "require": "./dist/cjs/pdas.js"
     },
     "./pyth-staking-client": {
-      "import": "./dist/esm/pyth-staking-client.mjs",
+      "import": "./dist/esm/pyth-staking-client.js",
       "types": "./dist/esm/pyth-staking-client.d.ts",
       "require": "./dist/cjs/pyth-staking-client.js"
     },
     "./pythnet-client": {
-      "import": "./dist/esm/pythnet-client.mjs",
+      "import": "./dist/esm/pythnet-client.js",
       "types": "./dist/esm/pythnet-client.d.ts",
       "require": "./dist/cjs/pythnet-client.js"
     },
     "./types": {
-      "import": "./dist/esm/types.mjs",
+      "import": "./dist/esm/types.js",
       "types": "./dist/esm/types.d.ts",
       "require": "./dist/cjs/types.js"
     },
     "./types/integrity-pool": {
-      "import": "./dist/esm/types/integrity-pool.mjs",
+      "import": "./dist/esm/types/integrity-pool.js",
       "types": "./dist/esm/types/integrity-pool.d.ts",
       "require": "./dist/cjs/types/integrity-pool.js"
     },
     "./types/publisher-caps": {
-      "import": "./dist/esm/types/publisher-caps.mjs",
+      "import": "./dist/esm/types/publisher-caps.js",
       "types": "./dist/esm/types/publisher-caps.d.ts",
       "require": "./dist/cjs/types/publisher-caps.js"
     },
     "./types/stake-caps-parameters": {
-      "import": "./dist/esm/types/stake-caps-parameters.mjs",
+      "import": "./dist/esm/types/stake-caps-parameters.js",
       "types": "./dist/esm/types/stake-caps-parameters.d.ts",
       "require": "./dist/cjs/types/stake-caps-parameters.js"
     },
     "./types/staking": {
-      "import": "./dist/esm/types/staking.mjs",
+      "import": "./dist/esm/types/staking.js",
       "types": "./dist/esm/types/staking.d.ts",
       "require": "./dist/cjs/types/staking.js"
     },
     "./utils/apy": {
-      "import": "./dist/esm/utils/apy.mjs",
+      "import": "./dist/esm/utils/apy.js",
       "types": "./dist/esm/utils/apy.d.ts",
       "require": "./dist/cjs/utils/apy.js"
     },
     "./utils/bigint": {
-      "import": "./dist/esm/utils/bigint.mjs",
+      "import": "./dist/esm/utils/bigint.js",
       "types": "./dist/esm/utils/bigint.d.ts",
       "require": "./dist/cjs/utils/bigint.js"
     },
     "./utils/bn": {
-      "import": "./dist/esm/utils/bn.mjs",
+      "import": "./dist/esm/utils/bn.js",
       "types": "./dist/esm/utils/bn.d.ts",
       "require": "./dist/cjs/utils/bn.js"
     },
     "./utils/clock": {
-      "import": "./dist/esm/utils/clock.mjs",
+      "import": "./dist/esm/utils/clock.js",
       "types": "./dist/esm/utils/clock.d.ts",
       "require": "./dist/cjs/utils/clock.js"
     },
     "./utils/pool": {
-      "import": "./dist/esm/utils/pool.mjs",
+      "import": "./dist/esm/utils/pool.js",
       "types": "./dist/esm/utils/pool.d.ts",
       "require": "./dist/cjs/utils/pool.js"
     },
     "./utils/position": {
-      "import": "./dist/esm/utils/position.mjs",
+      "import": "./dist/esm/utils/position.js",
       "types": "./dist/esm/utils/position.d.ts",
       "require": "./dist/cjs/utils/position.js"
     },
     "./utils/transaction": {
-      "import": "./dist/esm/utils/transaction.mjs",
+      "import": "./dist/esm/utils/transaction.js",
       "types": "./dist/esm/utils/transaction.d.ts",
       "require": "./dist/cjs/utils/transaction.js"
     },
     "./utils/vesting": {
-      "import": "./dist/esm/utils/vesting.mjs",
+      "import": "./dist/esm/utils/vesting.js",
       "types": "./dist/esm/utils/vesting.d.ts",
       "require": "./dist/cjs/utils/vesting.js"
     },
     "./utils/wallet": {
-      "import": "./dist/esm/utils/wallet.mjs",
+      "import": "./dist/esm/utils/wallet.js",
       "types": "./dist/esm/utils/wallet.d.ts",
       "require": "./dist/cjs/utils/wallet.js"
     },
@@ -131,7 +131,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "build-ts-package --clean --platform node",
+    "build": "build-ts-package --clean --platform node --compiler swc",
     "fix:format": "prettier --write .",
     "fix:lint": "eslint --fix . --max-warnings 0",
     "test:format": "prettier --check .",
@@ -163,6 +163,6 @@
   },
   "packageManager": "pnpm@10.19.0",
   "main": "./dist/cjs/index.js",
-  "module": "./dist/esm/index.mjs",
+  "module": "./dist/esm/index.js",
   "types": "./dist/cjs/index.d.ts"
 }

+ 12 - 13
lazer/sdk/js/package.json

@@ -13,7 +13,7 @@
     "dist/**/*"
   ],
   "scripts": {
-    "build": "build-ts-package --platform neutral",
+    "build": "build-ts-package --platform neutral --compiler swc",
     "clean": "rm -rf dist/",
     "fix:lint": "eslint --fix . --max-warnings 0",
     "test:lint": "eslint . --max-warnings 0",
@@ -39,7 +39,6 @@
   "bugs": {
     "url": "https://github.com/pyth-network/pyth-crosschain/issues"
   },
-  "type": "module",
   "homepage": "https://github.com/pyth-network/pyth-crosschain/tree/main/lazer/sdk/js",
   "repository": {
     "type": "git",
@@ -61,58 +60,58 @@
   "packageManager": "pnpm@10.19.0",
   "exports": {
     "./client": {
-      "import": "./dist/esm/client.mjs",
+      "import": "./dist/esm/client.js",
       "types": "./dist/esm/client.d.ts",
       "require": "./dist/cjs/client.js"
     },
     "./constants": {
-      "import": "./dist/esm/constants.mjs",
+      "import": "./dist/esm/constants.js",
       "types": "./dist/esm/constants.d.ts",
       "require": "./dist/cjs/constants.js"
     },
     ".": {
-      "import": "./dist/esm/index.mjs",
+      "import": "./dist/esm/index.js",
       "types": "./dist/esm/index.d.ts",
       "require": "./dist/cjs/index.js"
     },
     "./protocol": {
-      "import": "./dist/esm/protocol.mjs",
+      "import": "./dist/esm/protocol.js",
       "types": "./dist/esm/protocol.d.ts",
       "require": "./dist/cjs/protocol.js"
     },
     "./socket/resilient-websocket": {
-      "import": "./dist/esm/socket/resilient-websocket.mjs",
+      "import": "./dist/esm/socket/resilient-websocket.js",
       "types": "./dist/esm/socket/resilient-websocket.d.ts",
       "require": "./dist/cjs/socket/resilient-websocket.js"
     },
     "./socket/websocket-pool": {
-      "import": "./dist/esm/socket/websocket-pool.mjs",
+      "import": "./dist/esm/socket/websocket-pool.js",
       "types": "./dist/esm/socket/websocket-pool.d.ts",
       "require": "./dist/cjs/socket/websocket-pool.js"
     },
     "./util/buffer-util": {
-      "import": "./dist/esm/util/buffer-util.mjs",
+      "import": "./dist/esm/util/buffer-util.js",
       "types": "./dist/esm/util/buffer-util.d.ts",
       "require": "./dist/cjs/util/buffer-util.js"
     },
     "./util/env-util": {
-      "import": "./dist/esm/util/env-util.mjs",
+      "import": "./dist/esm/util/env-util.js",
       "types": "./dist/esm/util/env-util.d.ts",
       "require": "./dist/cjs/util/env-util.js"
     },
     "./util": {
-      "import": "./dist/esm/util/index.mjs",
+      "import": "./dist/esm/util/index.js",
       "types": "./dist/esm/util/index.d.ts",
       "require": "./dist/cjs/util/index.js"
     },
     "./util/url-util": {
-      "import": "./dist/esm/util/url-util.mjs",
+      "import": "./dist/esm/util/url-util.js",
       "types": "./dist/esm/util/url-util.d.ts",
       "require": "./dist/cjs/util/url-util.js"
     },
     "./package.json": "./package.json"
   },
-  "module": "./dist/esm/index.mjs",
+  "module": "./dist/esm/index.js",
   "types": "./dist/cjs/index.d.ts",
   "main": "./dist/cjs/index.js"
 }

+ 1 - 0
packages/build-ts-package/package.json

@@ -21,6 +21,7 @@
     "type-fest": "catalog:"
   },
   "dependencies": {
+    "@swc/core": "^1.13.5",
     "chalk": "^5.6.2",
     "esbuild": "^0.25.11",
     "fast-glob": "^3.3.3",

+ 46 - 84
packages/build-ts-package/src/build-ts-package.js

@@ -1,7 +1,5 @@
 #!/usr/bin/env node
 
-import { build } from "esbuild";
-import glob from "fast-glob";
 import fs from "fs-extra";
 import path from "node:path";
 import createCLI from "yargs";
@@ -12,16 +10,11 @@ import { execAsync } from "./exec-async.js";
 import { generateTsconfigs } from "./generate-tsconfigs.js";
 import { Logger } from "./logger.js";
 import chalk from "chalk";
-import { createResolver } from "./resolve-import-path.js";
-
-/**
- * @typedef {'cjs' | 'esm'} ModuleType
- */
-
-/** @typedef {import('esbuild').Platform} Platform */
-
-/** @type {Platform[]} */
-const AVAILABLE_PLATFORMS = ["browser", "neutral", "node"];
+import {
+  AVAILABLE_COMPILERS,
+  AVAILABLE_PLATFORMS,
+  compileTs,
+} from "./compile-ts.js";
 
 /**
  * builds a typescript package, using tsdown and its Node-friendly API
@@ -31,6 +24,7 @@ export async function buildTsPackage(argv = process.argv) {
   const yargs = createCLI(hideBin(argv));
   const {
     clean,
+    compiler,
     cwd: absOrRelativeCwd,
     generateTsconfig,
     noCjs,
@@ -48,6 +42,12 @@ export async function buildTsPackage(argv = process.argv) {
         "if set, will clean out the build dirs before compiling anything",
       type: "boolean",
     })
+    .option("compiler", {
+      choices: AVAILABLE_COMPILERS,
+      default: "esbuild",
+      description: "which compiler to use.",
+      type: "string",
+    })
     .option("cwd", {
       default: process.cwd(),
       description: "the CWD to use when building",
@@ -80,11 +80,12 @@ export async function buildTsPackage(argv = process.argv) {
       description: "the folder where the built files will be written",
       type: "string",
     })
-    .option('platform', {
+    .option("platform", {
       choices: AVAILABLE_PLATFORMS,
       demandOption: true,
-      description: 'the target environment where this JS code will be run. if you are unsure or are writing an isomorphic library, use "neutral."',
-      type: 'string',
+      description:
+        'the target environment where this JS code will be run. if you are unsure or are writing an isomorphic library, use "neutral."',
+      type: "string",
     })
     .option("tsconfig", {
       description:
@@ -113,8 +114,9 @@ export async function buildTsPackage(argv = process.argv) {
 
   // ESM Must come before CJS, as those typings and such take precedence
   // when dual publishing.
-  const formats = /** @type {ModuleType[]} */ (
-    [noEsm ? undefined : "esm", noCjs ? undefined : "cjs"].filter(Boolean)
+  /** @type {any[]} */
+  const formats = [noEsm ? undefined : "esm", noCjs ? undefined : "cjs"].filter(
+    Boolean,
   );
 
   const tsconfig = await findTsconfigFile(cwd, tsconfigOverride);
@@ -131,6 +133,9 @@ export async function buildTsPackage(argv = process.argv) {
   // always freshly reset the exports and let the tool take over
   pjson.exports = {};
 
+  // let the exports define how this module should be treated
+  delete pjson.type;
+
   Logger.info("building package", chalk.magenta(pjson.name));
   for (const format of formats) {
     try {
@@ -145,73 +150,26 @@ export async function buildTsPackage(argv = process.argv) {
         await execAsync(getConfigCmd, { cwd, stdio: "pipe", verbose: true }),
       );
 
-      const outExtension = format === "cjs" ? ".js" : ".mjs";
-      if (Array.isArray(finalConfig.files)) {
-        await build({
-          absWorkingDir: cwd,
-          bundle: false,
-          entryPoints: finalConfig.files,
-          format,
-          outdir: outDir,
-          outExtension: { ".js": outExtension },
-          platform,
-          sourcemap: false,
-          splitting: false,
-          target: "esnext",
-        });
-      }
-
-      let cmd =
-        `pnpm tsc --project ${tsconfig} --outDir ${outDir} --declaration ${!noDts} --emitDeclarationOnly ${!noDts} --module ${format === "cjs" ? "nodenext" : "esnext"} --target esnext --resolveJsonModule false ${format === "cjs" ? "--moduleResolution nodenext" : ""}`.trim();
-      if (watch) cmd += ` --watch`;
-
-      await execAsync(cmd, { cwd, stdio: "inherit", verbose: true });
+      /** @type {string[]} */
+      const tscFoundFiles = Array.isArray(finalConfig.files)
+        ? finalConfig.files
+        : [];
 
-      const absoluteBuiltFiles = await glob(
-        [
-          path.join(outDir, "**", "*.d.ts"),
-          path.join(outDir, "**", "*.js"),
-          path.join(outDir, "**", "*.cjs"),
-          path.join(outDir, "**", "*.mjs"),
-        ],
-        { absolute: true, onlyFiles: true },
+      const compilerToUse = /** @type {import("./compile-ts.js").Compiler} */ (
+        compiler
       );
 
-      // Matches ESM import/export statements and captures the module specifier
-      const esmRegex =
-        /\bimport\s+(?:[\s\S]*?\bfrom\s+)?(['"])([^'"]+)\1|\bexport\s+(?:[\s\S]*?\bfrom\s+)(['"])([^'"]+)\3/g;
-
-      await Promise.all(
-        absoluteBuiltFiles.map(async (absFp) => {
-          if (absFp.endsWith(".d.ts")) return;
-
-          let contents = await fs.readFile(absFp, "utf8");
-
-          contents = contents.replace(
-            esmRegex,
-            (full, _q1, imp1, _q2, imp2) => {
-              const importPath = imp1 || imp2;
-              const resolveImport = createResolver(absFp);
-              const { resolved } = resolveImport(importPath);
-
-              if (!resolved.startsWith(outDir)) return full;
-
-              // Compute the new path:
-              // - If the specifier has an extension, replace it.
-              // - If it doesn't, append the desired extension.
-              const ext = path.extname(importPath);
-              const newPath = ext
-                ? importPath.replace(ext, outExtension)
-                : `${importPath}${outExtension}`;
-
-              // Replace only inside the matched statement to avoid accidental global replacements.
-              return full.replace(importPath, newPath);
-            },
-          );
-
-          await fs.writeFile(absFp, contents, "utf8");
-        }),
-      );
+      const absoluteBuiltFiles = await compileTs({
+        compiler: compilerToUse,
+        cwd,
+        entryPoints: tscFoundFiles,
+        format,
+        noDts,
+        outDir,
+        platform,
+        tsconfig,
+        watch,
+      });
 
       const builtFiles = absoluteBuiltFiles
         .map((fp) => {
@@ -276,7 +234,7 @@ export async function buildTsPackage(argv = process.argv) {
           } else {
             tempExports.import = fpWithBasename;
           }
-      }
+        }
 
         // Also handle types if present
         if (
@@ -291,8 +249,12 @@ export async function buildTsPackage(argv = process.argv) {
 
       pjson.exports = exports;
 
-      if (format === 'esm') {
-        await fs.writeFile(path.join(outDir, 'package.json'), '{ "type": "module" }', 'utf8');
+      if (format === "esm") {
+        await fs.writeFile(
+          path.join(outDir, "package.json"),
+          '{ "type": "module" }',
+          "utf8",
+        );
       }
 
       Logger.info(chalk.green(`${pjson.name} - ${format} has been built!`));

+ 170 - 0
packages/build-ts-package/src/compile-ts.js

@@ -0,0 +1,170 @@
+import { build } from "esbuild";
+import { transformFile } from "@swc/core";
+import { execAsync } from "./exec-async.js";
+import fs from "fs-extra";
+import path from "node:path";
+import { Logger } from "./logger.js";
+import { createResolver } from "./resolve-import-path.js";
+import glob from "fast-glob";
+
+/**
+ * @typedef {'cjs' | 'esm'} ModuleType
+ */
+
+/**
+ * @typedef {'babel' | 'esbuild' | 'swc'} Compiler
+ */
+
+/** @typedef {import('esbuild').Platform} Platform */
+
+/** @type {Platform[]} */
+export const AVAILABLE_PLATFORMS = ["browser", "neutral", "node"];
+
+/** @type {Compiler[]} */
+export const AVAILABLE_COMPILERS = ["babel", "esbuild", "swc"];
+
+/**
+ * @typedef {Object} CompileTsOpts
+ * @property {Compiler} compiler
+ * @property {string} cwd
+ * @property {string[]} entryPoints
+ * @property {ModuleType} format
+ * @property {boolean} noDts
+ * @property {string} outDir
+ * @property {Platform} platform
+ * @property {string} tsconfig
+ * @property {boolean} watch
+ */
+
+/**
+ * compiles typescript, using any build utility of your choosing
+ *
+ * @param {CompileTsOpts} opts
+ */
+export async function compileTs({
+  compiler,
+  cwd,
+  entryPoints,
+  format,
+  noDts,
+  outDir,
+  platform,
+  tsconfig,
+  watch,
+}) {
+  const outExtension = ".js";
+
+  const filesToCompile = entryPoints
+    .filter((ep) => /\.(j|t)sx?$/.test(ep))
+    .filter((ep) => !ep.endsWith(".d.ts"));
+
+  Logger.info('using the', compiler, 'compiler');
+
+  switch (compiler) {
+    case "babel":
+      await Promise.resolve();
+      break;
+    case "esbuild":
+      await build({
+        absWorkingDir: cwd,
+        bundle: false,
+        entryPoints: filesToCompile,
+        format,
+        outdir: outDir,
+        platform,
+        sourcemap: false,
+        splitting: false,
+        target: "esnext",
+      });
+      break;
+    case "swc":
+      await Promise.all(
+        filesToCompile.map(async (fp) => {
+          const absFp = path.isAbsolute(fp) ? fp : path.join(cwd, fp);
+          const relThing = path.relative(cwd, absFp);
+
+          const outFilePath = path.join(
+            outDir,
+            ...relThing
+              .replace(path.extname(fp), ".js")
+              .split(path.sep)
+              .slice(1)
+              .filter(Boolean),
+          );
+
+          const { code } = await transformFile(fp, {
+            cwd,
+            jsc: {
+              target: "esnext",
+            },
+            module: {
+              outFileExtension: "js",
+              resolveFully: true,
+              strict: true,
+              type: format === "esm" ? "es6" : "commonjs",
+            },
+            outputPath: outDir,
+            sourceMaps: false,
+          });
+
+          await fs.ensureFile(outFilePath);
+          await fs.writeFile(outFilePath, code, "utf8");
+        }),
+      );
+      break;
+    default:
+      throw new Error(
+        `an invalid compiler value of ${compiler} was provided when compiling typescript`,
+      );
+  }
+  let cmd =
+    `pnpm tsc --project ${tsconfig} --outDir ${outDir} --declaration ${!noDts} --emitDeclarationOnly ${!noDts} --module ${format === "cjs" ? "nodenext" : "esnext"} --target esnext --resolveJsonModule false ${format === "cjs" ? "--moduleResolution nodenext" : ""}`.trim();
+  if (watch) cmd += ` --watch`;
+
+  await execAsync(cmd, { cwd, stdio: "inherit", verbose: true });
+
+  const absoluteBuiltFiles = await glob(
+    [
+      path.join(outDir, "**", "*.d.ts"),
+      path.join(outDir, "**", "*.js"),
+      path.join(outDir, "**", "*.cjs"),
+      path.join(outDir, "**", "*.mjs"),
+    ],
+    { absolute: true, onlyFiles: true },
+  );
+
+  // Matches ESM import/export statements and captures the module specifier
+  const esmRegex =
+    /\bimport\s+(?:[\s\S]*?\bfrom\s+)?(['"])([^'"]+)\1|\bexport\s+(?:[\s\S]*?\bfrom\s+)(['"])([^'"]+)\3/g;
+
+  await Promise.all(
+    absoluteBuiltFiles.map(async (absFp) => {
+      if (absFp.endsWith(".d.ts")) return;
+
+      let contents = await fs.readFile(absFp, "utf8");
+
+      contents = contents.replace(esmRegex, (full, _q1, imp1, _q2, imp2) => {
+        const importPath = imp1 || imp2;
+        const resolveImport = createResolver(absFp);
+        const { resolved } = resolveImport(importPath);
+
+        if (!resolved.startsWith(outDir)) return full;
+
+        // Compute the new path:
+        // - If the specifier has an extension, replace it.
+        // - If it doesn't, append the desired extension.
+        const ext = path.extname(importPath);
+        const newPath = ext
+          ? importPath.replace(ext, outExtension)
+          : `${importPath}${outExtension}`;
+
+        // Replace only inside the matched statement to avoid accidental global replacements.
+        return full.replace(importPath, newPath);
+      });
+
+      await fs.writeFile(absFp, contents, "utf8");
+    }),
+  );
+
+  return absoluteBuiltFiles;
+}

File diff suppressed because it is too large
+ 222 - 110
pnpm-lock.yaml


+ 1 - 1
target_chains/solana/sdk/js/solana_utils/package.json

@@ -16,7 +16,7 @@
     "access": "public"
   },
   "scripts": {
-    "build": "build-ts-package --clean --noEsm --platform node",
+    "build": "build-ts-package --clean --noEsm --platform node --compiler swc",
     "test:unit": "jest",
     "test:lint": "eslint src/ --max-warnings 0",
     "test:format": "prettier --check \"src/**/*.ts\"",

Some files were not shown because too many files changed in this diff