Socket
Socket
Sign inDemoInstall

vite-tsconfig-paths

Package Overview
Dependencies
Maintainers
1
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vite-tsconfig-paths - npm Package Compare versions

Comparing version 4.0.1 to 4.0.2

10

dist/index.js

@@ -181,8 +181,10 @@ "use strict";

function createResolver(project) {
var _a, _b;
var _a, _b, _c;
const configPath = project.tsconfigFile;
const config = project.tsconfig;
debug("config loaded:", (0, import_util.inspect)({ configPath, config }, false, 10, true));
if (((_a = config.files) == null ? void 0 : _a.length) == 0) {
debug(`[!] files array is empty: "${configPath}"`);
if (((_a = config.files) == null ? void 0 : _a.length) == 0 && !((_b = config.include) == null ? void 0 : _b.length)) {
debug(
`[!] skipping "${configPath}" as no files can be matched since "files" is empty and "include" is missing or empty`
);
return null;

@@ -201,3 +203,3 @@ }

paths,
(_b = options.baseUrl) != null ? _b : (0, import_path2.dirname)(configPath)
(_c = options.baseUrl) != null ? _c : (0, import_path2.dirname)(configPath)
);

@@ -204,0 +206,0 @@ const resolveWithPaths = async (viteResolve, id, importer) => {

2

package.json
{
"name": "vite-tsconfig-paths",
"version": "4.0.1",
"version": "4.0.2",
"description": "Vite resolver for TypeScript compilerOptions.paths",

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

@@ -159,5 +159,10 @@ import _debug from 'debug'

// Empty `files` array means no files are included.
if (config.files?.length == 0) {
debug(`[!] files array is empty: "${configPath}"`)
// Sometimes a tsconfig is not meant to be used for path resolution,
// but rather for pointing to other tsconfig files and possibly
// being extended by them. This is represented by an explicitly
// empty "files" array and a missing/empty "include" array.
if (config.files?.length == 0 && !config.include?.length) {
debug(
`[!] skipping "${configPath}" as no files can be matched since "files" is empty and "include" is missing or empty`
)
return null

@@ -164,0 +169,0 @@ }

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