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.0-alpha.1 to 4.0.0-alpha.2

29

dist/index.js

@@ -78,2 +78,3 @@ "use strict";

// src/index.ts
var import_path4 = require("path");
var debug = (0, import_debug.default)("vite-tsconfig-paths");

@@ -87,7 +88,6 @@ var src_default = (opts = {}) => {

const root = opts.root || (0, import_vite2.searchForWorkspaceRoot)(config.root);
const projects = await tsconfck.findAll(root, {
skip(dir) {
return dir != "node_modules" && dir != ".git";
}
});
const projects = await resolveProjectPaths(
opts.projects,
opts.root || config.root
);
let hasTypeScriptDep = false;

@@ -119,4 +119,4 @@ if (opts.parseNative) {

};
for (const resolve3 of resolvers) {
const resolved = await resolve3(viteResolve, id, importer);
for (const resolve4 of resolvers) {
const resolved = await resolve4(viteResolve, id, importer);
if (resolved) {

@@ -267,4 +267,19 @@ return resolved;

}
function resolveProjectPaths(projects, root) {
if (projects) {
return projects.map((file) => {
if (!file.endsWith(".json")) {
file = join(file, "tsconfig.json");
}
return (0, import_path4.resolve)(root, file);
});
}
return tsconfck.findAll(root, {
skip(dir) {
return dir != "node_modules" && dir != ".git";
}
});
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {});
//# sourceMappingURL=index.js.map
{
"name": "vite-tsconfig-paths",
"version": "4.0.0-alpha.1",
"version": "4.0.0-alpha.2",
"description": "Vite resolver for TypeScript compilerOptions.paths",

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

@@ -11,2 +11,3 @@ import { basename, dirname, isAbsolute, join, relative } from './path'

import { resolvePathMappings } from './mappings'
import { resolve } from 'path'
const debug = _debug('vite-tsconfig-paths')

@@ -32,7 +33,6 @@

const root = opts.root || searchForWorkspaceRoot(config.root)
const projects = await tsconfck.findAll(root, {
skip(dir) {
return dir != 'node_modules' && dir != '.git'
},
})
const projects = await resolveProjectPaths(
opts.projects,
opts.root || config.root
)

@@ -267,1 +267,17 @@ let hasTypeScriptDep = false

}
function resolveProjectPaths(projects: string[] | undefined, root: string) {
if (projects) {
return projects.map((file) => {
if (!file.endsWith('.json')) {
file = join(file, 'tsconfig.json')
}
return resolve(root, file)
})
}
return tsconfck.findAll(root, {
skip(dir) {
return dir != 'node_modules' && dir != '.git'
},
})
}

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