@@ -21,7 +21,6 @@ import (
2121 "github.com/microsoft/typescript-go/internal/project/logging"
2222 "github.com/microsoft/typescript-go/internal/sourcemap"
2323 "github.com/microsoft/typescript-go/internal/tspath"
24- "github.com/microsoft/typescript-go/internal/vfs/pnpvfs"
2524 "github.com/microsoft/typescript-go/internal/vfs/vfsmatch"
2625)
2726
@@ -65,10 +64,6 @@ func NewSnapshot(
6564 toPath func (fileName string ) tspath.Path ,
6665 pnpApi * pnp.PnpApi ,
6766) * Snapshot {
68- if pnpApi != nil {
69- fs .fs = pnpvfs .From (fs .fs )
70- }
71-
7267 s := & Snapshot {
7368 id : id ,
7469
@@ -80,11 +75,10 @@ func NewSnapshot(
8075 ProjectCollection : & ProjectCollection {toPath : toPath },
8176 compilerOptionsForInferredProjects : compilerOptionsForInferredProjects ,
8277
83- pnpApi : pnpApi ,
84-
8578 userPreferences : userPreferences ,
8679 AutoImports : autoImports ,
8780 autoImportsWatch : autoImportsWatch ,
81+ pnpApi : pnpApi ,
8882 }
8983 s .refCount .Store (1 )
9084 s .converters = lsconv .NewConverters (s .sessionOptions .PositionEncoding , s .LSPLineMap )
@@ -339,12 +333,12 @@ func (s *Snapshot) Clone(ctx context.Context, change SnapshotChange, overlays ma
339333 ctx ,
340334 newSnapshotID ,
341335 fs ,
336+ session .pnpApi ,
342337 s .ProjectCollection ,
343338 s .ConfigFileRegistry ,
344339 s .ProjectCollection .apiOpenedProjects ,
345340 compilerOptionsForInferredProjects ,
346341 s .sessionOptions ,
347- s .pnpApi ,
348342 customConfigFileName ,
349343 session .parseCache ,
350344 session .extendedConfigCache ,
@@ -429,6 +423,7 @@ func (s *Snapshot) Clone(ctx context.Context, change SnapshotChange, overlays ma
429423 projectCollection ,
430424 session .parseCache ,
431425 fs ,
426+ session .pnpApi ,
432427 s .sessionOptions .CurrentDirectory ,
433428 s .toPath ,
434429 )
@@ -469,7 +464,7 @@ func (s *Snapshot) Clone(ctx context.Context, change SnapshotChange, overlays ma
469464 autoImports ,
470465 autoImportsWatch ,
471466 s .toPath ,
472- s .pnpApi ,
467+ session .pnpApi ,
473468 )
474469 newSnapshot .parentId = s .id
475470 newSnapshot .ProjectCollection = projectCollection
0 commit comments