Skip to content

Commit afd793f

Browse files
committed
Merge branch 'upgrade-dependecies'
2 parents c513feb + 9f9827a commit afd793f

File tree

6 files changed

+145
-176
lines changed

6 files changed

+145
-176
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v3
1414
- uses: actions/setup-node@v3
1515
with:
16-
node-version: 16
16+
node-version: 18
1717
- run: yarn install
1818
- name: Run tests
1919
uses: GabrielBB/[email protected]
@@ -40,7 +40,7 @@ jobs:
4040
- uses: actions/checkout@v3
4141
- uses: actions/setup-node@v3
4242
with:
43-
node-version: 16
43+
node-version: 18
4444
- run: yarn install
4545
- run: yarn run lint
4646
markdownlint-cli:
@@ -76,7 +76,7 @@ jobs:
7676
- uses: actions/checkout@v3
7777
- uses: actions/setup-node@v3
7878
with:
79-
node-version: 16
79+
node-version: 18
8080
- run: yarn install
8181
- name: Run devreplay
8282
run: ./node_modules/.bin/devreplay ./src devreplay.json

.vscodeignore

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ webpack.config.js
1919
.markdownlint.json
2020
.eslintignore
2121

22-
# node_modules #withWebpack
23-
# out/ #withWebpack
22+
node_modules
23+
out/
2424

25-
# withoutWebpack:
26-
dist
27-
# /withoutWebpack

package.json

Lines changed: 14 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -26,51 +26,14 @@
2626
"R Markdown"
2727
],
2828
"engines": {
29-
"vscode": "^1.67.0"
29+
"vscode": "^1.75.0"
3030
},
3131
"activationEvents": [
32-
"onLanguage:r",
33-
"onLanguage:rd",
34-
"onLanguage:rmd",
35-
"onLanguage:debian-control.r",
36-
"onLanguage:namespace.r",
37-
"onLanguage:buildignore.r",
3832
"workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}",
39-
"onCommand:r.createRTerm",
40-
"onCommand:r.runSource",
41-
"onCommand:r.knitRmd",
42-
"onCommand:r.knitRmdToPdf",
43-
"onCommand:r.knitRmdToHtml",
44-
"onCommand:r.knitRmdToAll",
45-
"onCommand:r.runSourcewithEcho",
46-
"onCommand:r.runSelection",
4733
"onCommand:r.runSelectionInActiveTerm",
48-
"onCommand:r.selectCurrentChunk",
49-
"onCommand:r.runCurrentChunk",
50-
"onCommand:r.runCurrentChunkAndMove",
51-
"onCommand:r.runPreviousChunk",
52-
"onCommand:r.runNextChunk",
53-
"onCommand:r.runAboveChunks",
54-
"onCommand:r.runCurrentAndBelowChunks",
55-
"onCommand:r.runBelowChunks",
56-
"onCommand:r.runAllChunks",
57-
"onCommand:r.goToPreviousChunk",
58-
"onCommand:r.goToNextChunk",
59-
"onCommand:r.createGitignore",
60-
"onCommand:r.createLintrConfig",
61-
"onCommand:r.generateCCppProperties",
62-
"onCommand:r.runCommandWithSelectionOrWord",
63-
"onCommand:r.runCommandWithEditorPath",
64-
"onCommand:r.runCommand",
65-
"onCommand:r.showHelp",
66-
"onCommand:r.helpPanel.back",
67-
"onCommand:r.helpPanel.forward",
68-
"onCommand:r.helpPanel.openForSelection",
69-
"onCommand:r.plot.openUrl",
70-
"onWebviewPanel:rhelp",
71-
"onTerminalProfile:r.terminal-profile"
34+
"onWebviewPanel:rhelp"
7235
],
73-
"main": "./out/extension",
36+
"main": "./dist/extension",
7437
"contributes": {
7538
"terminal": {
7639
"profiles": [
@@ -1474,7 +1437,7 @@
14741437
"default": [],
14751438
"markdownDescription": "Additional library paths to launch R background processes (R languageserver, help server, etc.). These paths will be appended to `.libPaths()` on process startup. It could be useful for projects with [renv](https://rstudio.github.io/renv/index.html) enabled."
14761439
},
1477-
"r.useRenvLibPath" : {
1440+
"r.useRenvLibPath": {
14781441
"type": "boolean",
14791442
"default": false,
14801443
"markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)."
@@ -2113,28 +2076,15 @@
21132076
]
21142077
},
21152078
"scripts": {
2116-
"vscode:prepublish": "tsc -p . && tsc -p ./html/help && tsc -p ./html/httpgd",
2117-
"compile": "tsc -p . && tsc -p ./html/help && tsc -p ./html/httpgd",
2118-
"watch": "tsc -p . --watch",
2079+
"vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production",
2080+
"compile": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none",
2081+
"watch": "webpack --mode none --watch",
21192082
"watchHelp": "tsc -p ./html/help --watch",
21202083
"watchHttpgd": "tsc -p ./html/httpgd --watch",
21212084
"pretest": "tsc -p ./",
21222085
"test": "node ./out/test/runTest.js",
21232086
"lint": "eslint src --ext ts"
21242087
},
2125-
"withWebpack": {
2126-
"scripts": {
2127-
"vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production",
2128-
"compile": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none",
2129-
"watch": "webpack --mode none --watch",
2130-
"watchHelp": "tsc -p ./html/help --watch",
2131-
"watchHttpgd": "tsc -p ./html/httpgd --watch",
2132-
"pretest": "tsc -p ./",
2133-
"test": "node ./out/test/runTest.js",
2134-
"lint": "eslint src --ext ts"
2135-
},
2136-
"main": "./dist/extension"
2137-
},
21382088
"devDependencies": {
21392089
"@types/cheerio": "^0.22.29",
21402090
"@types/ejs": "^3.0.6",
@@ -2143,14 +2093,15 @@
21432093
"@types/glob": "^8.0.0",
21442094
"@types/js-yaml": "^4.0.2",
21452095
"@types/mocha": "^8.2.2",
2146-
"@types/node": "^16.11.7",
2096+
"@types/node": "^18.17.1",
21472097
"@types/node-fetch": "^2.5.10",
21482098
"@types/sinon": "^10.0.13",
2149-
"@types/vscode": "^1.67.0",
2099+
"@types/vscode": "^1.75.0",
21502100
"@types/winreg": "^1.2.31",
21512101
"@typescript-eslint/eslint-plugin": "^5.30.0",
21522102
"@typescript-eslint/parser": "^5.30.0",
21532103
"@vscode/test-electron": "^2.2.3",
2104+
"@types/highlight.js": "^10.1.0",
21542105
"copy-webpack-plugin": "^9.0.0",
21552106
"devreplay": "^1.9.31",
21562107
"eslint": "^7.28.0",
@@ -2163,14 +2114,14 @@
21632114
"webpack-cli": "^4.7.2"
21642115
},
21652116
"dependencies": {
2166-
"ag-grid-community": "^30.2.0",
2167-
"cheerio": "1.0.0-rc.10",
2117+
"ag-grid-community": "^31.3.2",
2118+
"cheerio": "1.0.0-rc.12",
21682119
"crypto": "^1.0.1",
21692120
"ejs": "^3.1.10",
21702121
"fs-extra": "^10.0.0",
2171-
"highlight.js": "^10.7.3",
2122+
"highlight.js": "^11.9.0",
21722123
"httpgd": "^0.1.6",
2173-
"jquery": "^3.6.0",
2124+
"jquery": "^3.7.1",
21742125
"jquery.json-viewer": "^1.5.0",
21752126
"js-yaml": "^4.1.0",
21762127
"node-fetch": "^2.6.7",

src/helpViewer/helpPreviewer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,14 +146,17 @@ export class RLocalHelpPreviewer {
146146
this.cachedPackageInfo = undefined;
147147
this.callPreviewListener();
148148
};
149-
const manDirListener: fs.WatchListener<string> = (event: fs.WatchEventType, filename: string) => {
149+
const manDirListener: fs.WatchListener<string | null> = (event: fs.WatchEventType, filename: string | null) => {
150150
if(this.isDisposed){
151151
return;
152152
}
153153
if(!isDirSafe(this.manDir)){
154154
this.dispose(true);
155155
return;
156156
}
157+
if (filename === null) {
158+
return;
159+
}
157160
const fullPath = path.join(this.manDir, filename);
158161
// The cache is only initialized when it is needed for the first time:
159162
if(this.cachedRdAliases){

src/helpViewer/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ function pimpMyHelp(helpFile: HelpFile): HelpFile {
730730

731731
// apply syntax highlighting to each code section:
732732
codeSections.each((i, section) => {
733-
const styledCode = hljs.highlight($(section).text() || '', {
733+
const styledCode = hljs.default.highlight($(section).text() || '', {
734734
language: 'r',
735735
});
736736
$(section).html(styledCode.value);

0 commit comments

Comments
 (0)