@swc-node/register
Advanced tools
Comparing version
@@ -6,3 +6,2 @@ import type { Options } from '@swc-node/core'; | ||
}>; | ||
export declare function createSourcemapOption(options: ts.CompilerOptions): boolean | "inline"; | ||
export declare function tsCompilerOptionsToSwcConfig(options: ts.CompilerOptions, filename: string): Options; |
@@ -29,3 +29,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.tsCompilerOptionsToSwcConfig = exports.createSourcemapOption = exports.readDefaultTsConfig = void 0; | ||
exports.tsCompilerOptionsToSwcConfig = exports.readDefaultTsConfig = void 0; | ||
const fs_1 = require("fs"); | ||
@@ -120,12 +120,2 @@ const path_1 = require("path"); | ||
} | ||
function createSourcemapOption(options) { | ||
return options.sourceMap !== false | ||
? options.inlineSourceMap | ||
? 'inline' | ||
: true | ||
: options.inlineSourceMap | ||
? 'inline' | ||
: false; | ||
} | ||
exports.createSourcemapOption = createSourcemapOption; | ||
function tsCompilerOptionsToSwcConfig(options, filename) { | ||
@@ -136,3 +126,3 @@ var _a, _b, _c, _d, _e, _f, _g, _h; | ||
module: toModule((_a = options.module) !== null && _a !== void 0 ? _a : ts.ModuleKind.ES2015), | ||
sourcemap: createSourcemapOption(options), | ||
sourcemap: Boolean(options.sourceMap), | ||
experimentalDecorators: (_b = options.experimentalDecorators) !== null && _b !== void 0 ? _b : false, | ||
@@ -143,2 +133,4 @@ emitDecoratorMetadata: (_c = options.emitDecoratorMetadata) !== null && _c !== void 0 ? _c : false, | ||
filename, | ||
inputSourceMap: options.inlineSourceMap, | ||
sourceRoot: options.sourceRoot, | ||
jsc: { | ||
@@ -145,0 +137,0 @@ externalHelpers: Boolean(options.importHelpers), |
{ | ||
"name": "@swc-node/register", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "SWC node register", | ||
@@ -26,2 +26,3 @@ "keywords": [ | ||
"lib", | ||
"esm", | ||
"README.md", | ||
@@ -80,3 +81,3 @@ "LICENSE", | ||
}, | ||
"gitHead": "75d423ff1bc57f0422bff7443b762f6977878fb8" | ||
"gitHead": "37dbf758638ab700ad3088bd6dc6e4ac2e3125b7" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
129786
30.89%24
4.35%568
12.03%22
4.76%