Skip to content

Commit

Permalink
fix(js): fix rust typescript analysis paths for windows (#18548)
Browse files Browse the repository at this point in the history
  • Loading branch information
FrozenPandaz committed Aug 9, 2023
1 parent 80f9894 commit 0f51447
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from '../../../../config/project-graph';
import { join, relative } from 'path';
import { workspaceRoot } from '../../../../utils/workspace-root';
import { normalizePath } from '../../../../utils/path';

export type ExplicitDependency = {
sourceProjectName: string;
Expand Down Expand Up @@ -123,10 +124,11 @@ function buildExplicitTypeScriptDependenciesWithSwc(
staticImportExpressions,
dynamicImportExpressions,
} of imports) {
const normalizedFilePath = normalizePath(relative(workspaceRoot, file));
for (const importExpr of staticImportExpressions) {
const dependency = convertImportToDependency(
importExpr,
relative(workspaceRoot, file),
normalizedFilePath,
sourceProject,
DependencyType.static,
targetProjectLocator
Expand All @@ -142,7 +144,7 @@ function buildExplicitTypeScriptDependenciesWithSwc(
for (const importExpr of dynamicImportExpressions) {
const dependency = convertImportToDependency(
importExpr,
relative(workspaceRoot, file),
normalizedFilePath,
sourceProject,
DependencyType.dynamic,
targetProjectLocator
Expand Down

1 comment on commit 0f51447

@vercel
Copy link

@vercel vercel bot commented on 0f51447 Aug 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-nrwl.vercel.app
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.