Skip to content

Commit 1638ca8

Browse files
authored
Merge branch 'main' into feat/root-nav-path
2 parents 12d9b41 + 414538b commit 1638ca8

File tree

14 files changed

+260
-179
lines changed

14 files changed

+260
-179
lines changed

client/package-lock.json

Lines changed: 18 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
"vscode": "^1.89.0"
1010
},
1111
"dependencies": {
12-
"ag-grid-community": "^33.3.2",
13-
"ag-grid-react": "^33.3.2",
12+
"ag-grid-community": "^34.0.0",
13+
"ag-grid-react": "^34.0.0",
1414
"axios": "^1.10.0",
1515
"highlight.js": "^11.11.1",
16-
"marked": "^15.0.12",
16+
"marked": "^16.0.0",
1717
"media-typer": "^1.1.0",
1818
"react": "^18.3.1",
1919
"react-dom": "^18.3.1",

client/src/components/LibraryNavigator/index.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,13 @@ import {
66
ExtensionContext,
77
Uri,
88
commands,
9+
env,
910
window,
1011
workspace,
1112
} from "vscode";
1213

1314
import { createWriteStream } from "fs";
15+
import * as path from "path";
1416

1517
import { profileConfig } from "../../commands/profile";
1618
import { Column } from "../../connection/rest/api/compute";
@@ -69,10 +71,23 @@ class LibraryNavigator implements SubscriptionProvider {
6971
commands.registerCommand(
7072
"SAS.downloadTable",
7173
async (item: LibraryItem) => {
74+
let dataFilePath: string = "";
75+
if (
76+
env.remoteName !== undefined &&
77+
workspace.workspaceFolders &&
78+
workspace.workspaceFolders.length > 0
79+
) {
80+
// start from 'rootPath' workspace folder
81+
dataFilePath = workspace.workspaceFolders[0].uri.fsPath;
82+
}
83+
dataFilePath = path.join(
84+
dataFilePath,
85+
`${item.library}.${item.name}.csv`.toLocaleLowerCase(),
86+
);
87+
88+
// display save file dialog
7289
const uri = await window.showSaveDialog({
73-
defaultUri: Uri.file(
74-
`${item.library}.${item.name}.csv`.toLocaleLowerCase(),
75-
),
90+
defaultUri: Uri.file(dataFilePath),
7691
});
7792

7893
if (!uri) {

client/testFixture/formatter/expected.sas

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,3 +172,13 @@ print('hello')
172172
endinteractive;
173173
/* comment */
174174
run;
175+
176+
proc format library=library;
177+
/* region format-ignore */
178+
invalue evaluation 'O'=4
179+
'S'=3
180+
'E'=2
181+
'C'=1
182+
'N'=0;
183+
/* endregion */
184+
run;

client/testFixture/formatter/unformatted.sas

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,4 +165,13 @@ i;
165165
print('hello')
166166
endinteractive;
167167
/* comment */
168+
run;
169+
proc format library=library;
170+
/* region format-ignore */
171+
invalue evaluation 'O'=4
172+
'S'=3
173+
'E'=2
174+
'C'=1
175+
'N'=0;
176+
/* endregion */
168177
run;

0 commit comments

Comments
 (0)