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

Commit

Permalink
Use correct internal installation when local ts not found (#97)
Browse files Browse the repository at this point in the history
* Use correct internal installation when local ts not found

Fixes #96

* lint
  • Loading branch information
apexskier authored Oct 8, 2020
1 parent 1aa8797 commit 7cd3f9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/tsLibPath.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ describe("tsLibPath", () => {

it("uses the extension installation if workspace hasn't been saved", () => {
(nova.workspace.path as any) = "";
expect(getTsLibPath()).toBe("/extension/node_modules/typescript/lib");
expect(getTsLibPath()).toBe(
"/dependencyManagement/node_modules/typescript/lib"
);
});

it("uses the workspace config", () => {
Expand Down
4 changes: 3 additions & 1 deletion src/tsLibPath.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { dependencyManagement } from "nova-extension-utils";

function reload() {
nova.commands.invoke("apexskier.typescript.reload");
}
Expand Down Expand Up @@ -43,7 +45,7 @@ export function getTsLibPath(): string | null {
);
} else {
tslibPath = nova.path.join(
nova.extension.path,
dependencyManagement.getDependencyDirectory(),
"node_modules/typescript/lib"
);
}
Expand Down
6 changes: 6 additions & 0 deletions typescript.novaextension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## future

### Fixed

- Fix not using dependency installation correctly

## v1.8.1

### Fixed
Expand Down

0 comments on commit 7cd3f9e

Please sign in to comment.