Socket
Socket
Sign inDemoInstall

@swc-node/register

Package Overview
Dependencies
Maintainers
1
Versions
85
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@swc-node/register - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

8

lib/read-default-tsconfig.js

@@ -29,3 +29,4 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.tsCompilerOptionsToSwcConfig = exports.readDefaultTsConfig = void 0;
exports.readDefaultTsConfig = readDefaultTsConfig;
exports.tsCompilerOptionsToSwcConfig = tsCompilerOptionsToSwcConfig;
const fs_1 = require("fs");

@@ -75,3 +76,2 @@ const path_1 = require("path");

}
exports.readDefaultTsConfig = readDefaultTsConfig;
function toTsTarget(target) {

@@ -141,3 +141,4 @@ switch (target) {

jsx: isJsx,
sourcemap: options.sourceMap && options.inlineSourceMap ? 'inline' : Boolean(options.sourceMap),
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
sourcemap: options.sourceMap || options.inlineSourceMap ? 'inline' : Boolean(options.sourceMap),
experimentalDecorators: (_c = options.experimentalDecorators) !== null && _c !== void 0 ? _c : false,

@@ -174,3 +175,2 @@ emitDecoratorMetadata: (_d = options.emitDecoratorMetadata) !== null && _d !== void 0 ? _d : false,

}
exports.tsCompilerOptionsToSwcConfig = tsCompilerOptionsToSwcConfig;
//# sourceMappingURL=read-default-tsconfig.js.map
import * as ts from 'typescript';
export declare const AVAILABLE_TS_EXTENSION_PATTERN: RegExp;
export declare const AVAILABLE_EXTENSION_PATTERN: RegExp;
export declare function compile(sourcecode: string, filename: string, options: ts.CompilerOptions & {
export declare function compile(sourcecode: string | undefined, filename: string, options: ts.CompilerOptions & {
fallbackToTs?: (filename: string) => boolean;
}): string;
export declare function compile(sourcecode: string, filename: string, options: ts.CompilerOptions & {
export declare function compile(sourcecode: string | undefined, filename: string, options: ts.CompilerOptions & {
fallbackToTs?: (filename: string) => boolean;
}, async: false): string;
export declare function compile(sourcecode: string, filename: string, options: ts.CompilerOptions & {
export declare function compile(sourcecode: string | undefined, filename: string, options: ts.CompilerOptions & {
fallbackToTs?: (filename: string) => boolean;
}, async: true): Promise<string>;
export declare function compile(sourcecode: string, filename: string, options: ts.CompilerOptions & {
export declare function compile(sourcecode: string | undefined, filename: string, options: ts.CompilerOptions & {
fallbackToTs?: (filename: string) => boolean;
}, async: boolean): string | Promise<string>;
export declare function register(options?: Partial<ts.CompilerOptions>, hookOpts?: {}): () => void;

@@ -26,3 +26,5 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.register = exports.compile = exports.AVAILABLE_EXTENSION_PATTERN = exports.AVAILABLE_TS_EXTENSION_PATTERN = void 0;
exports.AVAILABLE_EXTENSION_PATTERN = exports.AVAILABLE_TS_EXTENSION_PATTERN = void 0;
exports.compile = compile;
exports.register = register;
const core_1 = require("@swc-node/core");

@@ -57,3 +59,4 @@ const sourcemap_support_1 = require("@swc-node/sourcemap-support");

function compile(sourcecode, filename, options, async = false) {
if ((filename.includes('node_modules') && !exports.AVAILABLE_TS_EXTENSION_PATTERN.test(filename)) ||
if (typeof sourcecode === 'undefined' ||
(filename.includes('node_modules') && !exports.AVAILABLE_TS_EXTENSION_PATTERN.test(filename)) ||
!exports.AVAILABLE_EXTENSION_PATTERN.test(filename)) {

@@ -92,3 +95,2 @@ return sourcecode;

}
exports.compile = compile;
function register(options = {}, hookOpts = {}) {

@@ -105,3 +107,2 @@ if (!process.env.SWCRC) {

}
exports.register = register;
//# sourceMappingURL=register.js.map
{
"name": "@swc-node/register",
"version": "1.10.0",
"version": "1.10.1",
"description": "SWC node register",

@@ -43,8 +43,9 @@ "keywords": [

"dependencies": {
"@swc-node/core": "^1.13.1",
"@swc-node/sourcemap-support": "^0.5.0",
"@swc-node/core": "^1.13.2",
"@swc-node/sourcemap-support": "^0.5.1",
"colorette": "^2.0.20",
"debug": "^4.3.4",
"debug": "^4.3.5",
"oxc-resolver": "^1.9.2",
"pirates": "^4.0.6",
"tslib": "^2.6.2"
"tslib": "^2.6.3"
},

@@ -56,8 +57,8 @@ "peerDependencies": {

"devDependencies": {
"@swc/core": "^1.4.17",
"@swc/core": "^1.6.6",
"@swc/helpers": "^0.5.11",
"@types/debug": "^4.1.12",
"lodash": "^4.17.21",
"sinon": "^17.0.1",
"typescript": "^5.4.5"
"sinon": "^18.0.0",
"typescript": "^5.5.3"
},

@@ -85,3 +86,3 @@ "funding": {

},
"gitHead": "9644be5577f77aa53f974636fac4bc38f77148ce"
"gitHead": "3586b0ad22fe69514707103540edfd7e16894ba7"
}

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

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc