Skip to content

Commit

Permalink
Merge branch 'upgrade-dependecies'
Browse files Browse the repository at this point in the history
  • Loading branch information
renkun-ken committed May 18, 2024
2 parents c513feb + 9f9827a commit afd793f
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 176 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: yarn install
- name: Run tests
uses: GabrielBB/xvfb-action@v1.0
Expand All @@ -40,7 +40,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: yarn install
- run: yarn run lint
markdownlint-cli:
Expand Down Expand Up @@ -76,7 +76,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
- run: yarn install
- name: Run devreplay
run: ./node_modules/.bin/devreplay ./src devreplay.json
7 changes: 2 additions & 5 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ webpack.config.js
.markdownlint.json
.eslintignore

# node_modules #withWebpack
# out/ #withWebpack
node_modules
out/

# withoutWebpack:
dist
# /withoutWebpack
77 changes: 14 additions & 63 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,51 +26,14 @@
"R Markdown"
],
"engines": {
"vscode": "^1.67.0"
"vscode": "^1.75.0"
},
"activationEvents": [
"onLanguage:r",
"onLanguage:rd",
"onLanguage:rmd",
"onLanguage:debian-control.r",
"onLanguage:namespace.r",
"onLanguage:buildignore.r",
"workspaceContains:**/*.{rproj,Rproj,r,R,rd,Rd,rmd,Rmd}",
"onCommand:r.createRTerm",
"onCommand:r.runSource",
"onCommand:r.knitRmd",
"onCommand:r.knitRmdToPdf",
"onCommand:r.knitRmdToHtml",
"onCommand:r.knitRmdToAll",
"onCommand:r.runSourcewithEcho",
"onCommand:r.runSelection",
"onCommand:r.runSelectionInActiveTerm",
"onCommand:r.selectCurrentChunk",
"onCommand:r.runCurrentChunk",
"onCommand:r.runCurrentChunkAndMove",
"onCommand:r.runPreviousChunk",
"onCommand:r.runNextChunk",
"onCommand:r.runAboveChunks",
"onCommand:r.runCurrentAndBelowChunks",
"onCommand:r.runBelowChunks",
"onCommand:r.runAllChunks",
"onCommand:r.goToPreviousChunk",
"onCommand:r.goToNextChunk",
"onCommand:r.createGitignore",
"onCommand:r.createLintrConfig",
"onCommand:r.generateCCppProperties",
"onCommand:r.runCommandWithSelectionOrWord",
"onCommand:r.runCommandWithEditorPath",
"onCommand:r.runCommand",
"onCommand:r.showHelp",
"onCommand:r.helpPanel.back",
"onCommand:r.helpPanel.forward",
"onCommand:r.helpPanel.openForSelection",
"onCommand:r.plot.openUrl",
"onWebviewPanel:rhelp",
"onTerminalProfile:r.terminal-profile"
"onWebviewPanel:rhelp"
],
"main": "./out/extension",
"main": "./dist/extension",
"contributes": {
"terminal": {
"profiles": [
Expand Down Expand Up @@ -1474,7 +1437,7 @@
"default": [],
"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."
},
"r.useRenvLibPath" : {
"r.useRenvLibPath": {
"type": "boolean",
"default": false,
"markdownDescription": "Use renv library paths to launch R background processes (R languageserver, help server, etc.)."
Expand Down Expand Up @@ -2113,28 +2076,15 @@
]
},
"scripts": {
"vscode:prepublish": "tsc -p . && tsc -p ./html/help && tsc -p ./html/httpgd",
"compile": "tsc -p . && tsc -p ./html/help && tsc -p ./html/httpgd",
"watch": "tsc -p . --watch",
"vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production",
"compile": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none",
"watch": "webpack --mode none --watch",
"watchHelp": "tsc -p ./html/help --watch",
"watchHttpgd": "tsc -p ./html/httpgd --watch",
"pretest": "tsc -p ./",
"test": "node ./out/test/runTest.js",
"lint": "eslint src --ext ts"
},
"withWebpack": {
"scripts": {
"vscode:prepublish": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode production",
"compile": "tsc -p ./html/help && tsc -p ./html/httpgd && webpack --mode none",
"watch": "webpack --mode none --watch",
"watchHelp": "tsc -p ./html/help --watch",
"watchHttpgd": "tsc -p ./html/httpgd --watch",
"pretest": "tsc -p ./",
"test": "node ./out/test/runTest.js",
"lint": "eslint src --ext ts"
},
"main": "./dist/extension"
},
"devDependencies": {
"@types/cheerio": "^0.22.29",
"@types/ejs": "^3.0.6",
Expand All @@ -2143,14 +2093,15 @@
"@types/glob": "^8.0.0",
"@types/js-yaml": "^4.0.2",
"@types/mocha": "^8.2.2",
"@types/node": "^16.11.7",
"@types/node": "^18.17.1",
"@types/node-fetch": "^2.5.10",
"@types/sinon": "^10.0.13",
"@types/vscode": "^1.67.0",
"@types/vscode": "^1.75.0",
"@types/winreg": "^1.2.31",
"@typescript-eslint/eslint-plugin": "^5.30.0",
"@typescript-eslint/parser": "^5.30.0",
"@vscode/test-electron": "^2.2.3",
"@types/highlight.js": "^10.1.0",
"copy-webpack-plugin": "^9.0.0",
"devreplay": "^1.9.31",
"eslint": "^7.28.0",
Expand All @@ -2163,14 +2114,14 @@
"webpack-cli": "^4.7.2"
},
"dependencies": {
"ag-grid-community": "^30.2.0",
"cheerio": "1.0.0-rc.10",
"ag-grid-community": "^31.3.2",
"cheerio": "1.0.0-rc.12",
"crypto": "^1.0.1",
"ejs": "^3.1.10",
"fs-extra": "^10.0.0",
"highlight.js": "^10.7.3",
"highlight.js": "^11.9.0",
"httpgd": "^0.1.6",
"jquery": "^3.6.0",
"jquery": "^3.7.1",
"jquery.json-viewer": "^1.5.0",
"js-yaml": "^4.1.0",
"node-fetch": "^2.6.7",
Expand Down
5 changes: 4 additions & 1 deletion src/helpViewer/helpPreviewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,14 +146,17 @@ export class RLocalHelpPreviewer {
this.cachedPackageInfo = undefined;
this.callPreviewListener();
};
const manDirListener: fs.WatchListener<string> = (event: fs.WatchEventType, filename: string) => {
const manDirListener: fs.WatchListener<string | null> = (event: fs.WatchEventType, filename: string | null) => {
if(this.isDisposed){
return;
}
if(!isDirSafe(this.manDir)){
this.dispose(true);
return;
}
if (filename === null) {
return;
}
const fullPath = path.join(this.manDir, filename);
// The cache is only initialized when it is needed for the first time:
if(this.cachedRdAliases){
Expand Down
2 changes: 1 addition & 1 deletion src/helpViewer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -730,7 +730,7 @@ function pimpMyHelp(helpFile: HelpFile): HelpFile {

// apply syntax highlighting to each code section:
codeSections.each((i, section) => {
const styledCode = hljs.highlight($(section).text() || '', {
const styledCode = hljs.default.highlight($(section).text() || '', {
language: 'r',
});
$(section).html(styledCode.value);
Expand Down
Loading

0 comments on commit afd793f

Please sign in to comment.