Skip to content

Commit

Permalink
chore(yarn): upgrade dev-dependencies (#4627)
Browse files Browse the repository at this point in the history
- TS@5
- esbuild 0.17, remove watch mode
- eslint, jsdoc/newline-after-description to jsdoc/tag-lines, use the recommended 1

closes #4615 #4486
  • Loading branch information
fannheyward committed May 29, 2023
1 parent e51a7cd commit 19c782e
Show file tree
Hide file tree
Showing 7 changed files with 289 additions and 308 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ module.exports = {
"id-match": "error",
"jsdoc/check-alignment": "error",
"jsdoc/check-indentation": "error",
"jsdoc/newline-after-description": "error",
"jsdoc/tag-lines": 1,
"max-classes-per-file": "off",
"new-parens": "error",
"no-bitwise": "off",
Expand Down
21 changes: 3 additions & 18 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,17 @@ if (global.__isMain) {
}
}

async function start(watch) {
async function start() {
await require('esbuild').build({
entryPoints: ['index.js'],
bundle: true,
watch,
minify: process.env.NODE_ENV === 'production',
sourcemap: process.env.NODE_ENV === 'development',
define: {
REVISION: '"' + revision + '"',
ESBUILD: 'true',
'process.env.COC_NVIM': '"1"',
'global.__TEST__': false
'global.__TEST__': 'false'
},
mainFields: ['module', 'main'],
platform: 'node',
Expand All @@ -95,20 +94,6 @@ global.__isMain = require.main === module;`
})
}

let watch = false
if (process.argv.includes('--watch')) {
console.log('watching...')
watch = {
onRebuild(error) {
if (error) {
console.error('watch build failed:', error)
} else {
console.log('watch build succeeded')
}
},
}
}

start(watch).catch(e => {
start().catch(e => {
console.error(e)
})
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,16 @@
"@types/unidecode": "^0.1.1",
"@types/uuid": "^8.3.0",
"@types/which": "^1.3.2",
"@typescript-eslint/eslint-plugin": "^5.44.0",
"@typescript-eslint/parser": "^5.44.0",
"@typescript-eslint/eslint-plugin": "^5.59.2",
"@typescript-eslint/parser": "^5.59.2",
"browserslist": "^4.21.4",
"bser": "^2.1.1",
"esbuild": "^0.15.13",
"eslint": "^8.28.0",
"eslint-plugin-jest": "^27.1.5",
"eslint-plugin-jsdoc": "^39.6.2",
"esbuild": "^0.17.18",
"eslint": "^8.39.0",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jsdoc": "^43.1.1",
"jest": "29.3.1",
"typescript": "^4.9.3",
"typescript": "^5.0.4",
"vscode-languageserver": "^8.0.2"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/client/diagnostics.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ describe('DiagnosticFeature', () => {
})
expect(called).toBe(true)
await helper.waitValue(async () => {
let count = await client.sendRequest('getWorkspceCount')
let count = await client.sendRequest('getWorkspceCount') as number
return count > 1
}, true)
await client.stop()
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/mappings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const locations: ReadonlyArray<QuickfixItem> = [{
async function waitPreviewWindow(): Promise<void> {
for (let i = 0; i < 40; i++) {
await helper.wait(50)
let has = await nvim.call('coc#list#has_preview')
let has = await nvim.call('coc#list#has_preview') as number
if (has > 0) return
}
throw new Error('timeout after 2s')
Expand Down
4 changes: 2 additions & 2 deletions src/model/editInspect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ export default class EditInspect {
buffer.setOption('modifiable', false, true)
await nvim.resumeNotification(true)
this.disposables.push(this.keymaps.registerLocalKeymap(buffer.id, 'n', '<CR>', async () => {
let lnum = await nvim.call('line', '.')
let col = await nvim.call('col', '.')
let lnum = await nvim.call('line', '.') as number
let col = await nvim.call('col', '.') as number
let find: ChangedFileItem
for (let i = this.items.length - 1; i >= 0; i--) {
let item = this.items[i]
Expand Down
Loading

0 comments on commit 19c782e

Please sign in to comment.