Skip to content
This repository was archived by the owner on Dec 25, 2023. It is now read-only.

Commit 7cd3f9e

Browse files
authored
Use correct internal installation when local ts not found (#97)
* Use correct internal installation when local ts not found Fixes #96 * lint
1 parent 1aa8797 commit 7cd3f9e

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/tsLibPath.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,9 @@ describe("tsLibPath", () => {
7474

7575
it("uses the extension installation if workspace hasn't been saved", () => {
7676
(nova.workspace.path as any) = "";
77-
expect(getTsLibPath()).toBe("/extension/node_modules/typescript/lib");
77+
expect(getTsLibPath()).toBe(
78+
"/dependencyManagement/node_modules/typescript/lib"
79+
);
7880
});
7981

8082
it("uses the workspace config", () => {

src/tsLibPath.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { dependencyManagement } from "nova-extension-utils";
2+
13
function reload() {
24
nova.commands.invoke("apexskier.typescript.reload");
35
}
@@ -43,7 +45,7 @@ export function getTsLibPath(): string | null {
4345
);
4446
} else {
4547
tslibPath = nova.path.join(
46-
nova.extension.path,
48+
dependencyManagement.getDependencyDirectory(),
4749
"node_modules/typescript/lib"
4850
);
4951
}

typescript.novaextension/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## future
4+
5+
### Fixed
6+
7+
- Fix not using dependency installation correctly
8+
39
## v1.8.1
410

511
### Fixed

0 commit comments

Comments
 (0)