Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@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.8.0 to 1.9.0

2

lib/__test__/ts-compiler-options-to-swc-config.spec.js

@@ -38,3 +38,3 @@ "use strict";

const expected = {
baseUrl: process.cwd(),
baseUrl: undefined,
module: 'es6',

@@ -41,0 +41,0 @@ sourcemap: false,

@@ -57,2 +57,6 @@ "use strict";

const { options, errors, fileNames } = ts.parseJsonConfigFileContent(config, ts.sys, (0, path_1.dirname)(fullTsConfigPath));
// if baseUrl not set, use dirname of tsconfig.json. align with ts https://www.typescriptlang.org/tsconfig#paths
if (options.paths && !options.baseUrl) {
options.baseUrl = (0, path_1.dirname)(fullTsConfigPath);
}
if (!errors.length) {

@@ -129,3 +133,3 @@ compilerOptions = options;

function tsCompilerOptionsToSwcConfig(options, filename) {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
const isJsx = filename.endsWith('.tsx') || filename.endsWith('.jsx') || Boolean(options.jsx);

@@ -154,4 +158,4 @@ const target = (_a = options.target) !== null && _a !== void 0 ? _a : ts.ScriptTarget.ES2018;

: undefined,
baseUrl: (0, path_1.resolve)((_l = options.baseUrl) !== null && _l !== void 0 ? _l : './'),
paths: Object.fromEntries(Object.entries((_m = options.paths) !== null && _m !== void 0 ? _m : {}).map(([aliasKey, aliasPaths]) => {
baseUrl: options.baseUrl ? (0, path_1.resolve)(options.baseUrl) : undefined,
paths: Object.fromEntries(Object.entries((_l = options.paths) !== null && _l !== void 0 ? _l : {}).map(([aliasKey, aliasPaths]) => {
var _a;

@@ -158,0 +162,0 @@ return [

{
"name": "@swc-node/register",
"version": "1.8.0",
"version": "1.9.0",
"description": "SWC node register",

@@ -43,4 +43,4 @@ "keywords": [

"dependencies": {
"@swc-node/core": "^1.12.0",
"@swc-node/sourcemap-support": "^0.4.0",
"@swc-node/core": "^1.13.0",
"@swc-node/sourcemap-support": "^0.5.0",
"colorette": "^2.0.20",

@@ -84,3 +84,3 @@ "debug": "^4.3.4",

},
"gitHead": "28c0a9969942499c2dc9a2883360146de14ef907"
"gitHead": "abfb35770bd952fb902ac698668874512e88460d"
}

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