mirror of
https://github.com/swc-project/swc.git
synced 2024-09-11 08:45:34 +03:00
fix(bindings/node): Fix regression of JS APIs (#8998)
**Related issue:** - Closes #8997
This commit is contained in:
parent
1267e3ecd4
commit
125ddd2dd9
@ -1,5 +1,5 @@
|
||||
import swc from "..";
|
||||
import Visitor from "../src/Visitor";
|
||||
import Visitor from "../Visitor";
|
||||
|
||||
function assertAllObjectHasTypeFiled(obj, desc = '') {
|
||||
if (Array.isArray(obj)) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const swc = require("../../");
|
||||
const Visitor = require("../../src/Visitor").default;
|
||||
const Visitor = require("../../Visitor").default;
|
||||
|
||||
{
|
||||
const src = `
|
||||
|
@ -23,7 +23,7 @@ const bindings: typeof import("../binding") = (() => {
|
||||
try {
|
||||
binding = !!bindingsOverride
|
||||
? require(resolve(bindingsOverride))
|
||||
: require("../binding.js");
|
||||
: require("./binding.js");
|
||||
|
||||
// If native binding loaded successfully, it should return proper target triple constant.
|
||||
const triple = binding.getTargetTriple();
|
||||
@ -40,7 +40,7 @@ const bindings: typeof import("../binding") = (() => {
|
||||
/**
|
||||
* Version of the swc binding.
|
||||
*/
|
||||
export const version: string = require("../package.json").version;
|
||||
export const version: string = require("./package.json").version;
|
||||
|
||||
/**
|
||||
* @deprecated JavaScript API is deprecated. Please use Wasm plugin instead.
|
||||
|
@ -12,7 +12,7 @@
|
||||
"sourceMap": false /* Generates corresponding '.map' file. */,
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
"outDir": "./" /* Redirect output structure to the directory. */,
|
||||
"rootDir": "./" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
"rootDir": "./src/" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
// "composite": true, /* Enable project compilation */
|
||||
"removeComments": false /* Do not emit comments to output. */,
|
||||
// "noEmit": true, /* Do not emit outputs. */
|
||||
|
Loading…
Reference in New Issue
Block a user