Socket
Socket
Sign inDemoInstall

tsc-alias

Package Overview
Dependencies
Maintainers
1
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tsc-alias - npm Package Compare versions

Comparing version 1.3.1 to 1.3.2

4

dist/index.js

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

const replaceImportStatement = ({ orig, file, alias }) => {
const requiredModule = orig.split(/"|'/)[1];
var _a, _b;
const requiredModule = (_b = (_a = orig.match(utils_1.newStringRegex())) === null || _a === void 0 ? void 0 : _a.groups) === null || _b === void 0 ? void 0 : _b.path;
assert(typeof requiredModule == 'string', `Unexpected import statement pattern ${orig}`);
const index = orig.indexOf(alias.prefix);

@@ -115,0 +117,0 @@ const isAlias = requiredModule.includes('/')

@@ -7,4 +7,4 @@ "use strict";

const path_1 = require("path");
const anyQuote = '["\'`]';
const notQuote = '[^"\'`]';
const anyQuote = '["\']';
const notQuote = '[^"\']';
const importString = `(?:${anyQuote}${notQuote}+${anyQuote})`;

@@ -11,0 +11,0 @@ const funcStyle = `(?:\\b(?:import|require)\\s*\\(\\s*${importString}\\s*\\))`;

{
"name": "tsc-alias",
"version": "1.3.1",
"version": "1.3.2",
"description": "Replace alias paths with relative paths after typescript compilation.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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