File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -306,8 +306,10 @@ async function readJson(findDepPkgJsonPath) {
306306 * @returns {boolean }
307307 */
308308function isPrivateWorkspacePackage ( pkgJsonPath , pkgJson , workspaceRoot = undefined ) {
309- return ! ! workspaceRoot
310- && pkgJson . private
311- && pkgJsonPath . startsWith ( workspaceRoot )
312- && ! pkgJsonPath . match ( / [ / \\ ] n o d e _ m o d u l e s [ / \\ ] / )
309+ return ! ! (
310+ workspaceRoot &&
311+ pkgJson . private &&
312+ ! pkgJsonPath . match ( / [ / \\ ] n o d e _ m o d u l e s [ / \\ ] / ) &&
313+ ! path . relative ( workspaceRoot , pkgJsonPath ) . startsWith ( '..' )
314+ )
313315}
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ import { test } from 'uvu'
33import * as assert from 'uvu/assert'
44import { crawlFrameworkPkgs } from '../../../src/index.js'
55
6- const workspaceRoot = fileURLToPath ( new URL ( '../../../' , import . meta. url ) ) . replace ( / \/ $ / , '' )
6+ const workspaceRoot = fileURLToPath ( new URL ( '../../../' , import . meta. url ) )
7+ . replace ( / \\ / g, '/' ) // vite's seachForWorkspaceRoot returns slashified string on windows do that here too
8+ . replace ( / \/ $ / , '' )
79const root = fileURLToPath ( new URL ( './packages/workspace-app' , import . meta. url ) ) . replace ( / \/ $ / , '' )
810
911test ( 'crawlFrameworkPkgs (dev)' , async ( ) => {
You can’t perform that action at this time.
0 commit comments