Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESlint bump #324

Merged
merged 59 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
68e2e84
chore(deps-dev): bump eslint-config-standard-with-typescript
dependabot[bot] Jul 1, 2024
0968b92
chore(deps-dev): bump @types/vscode from 1.83.1 to 1.92.0
dependabot[bot] Aug 2, 2024
ecc74f8
chore(deps-dev): bump typescript from 5.2.2 to 5.5.4
dependabot[bot] Aug 2, 2024
43b60e4
Chore: Reindent package.json
idillon-sfl Sep 16, 2024
df8ed48
Chore: Uninstall eslint 8
idillon-sfl Sep 16, 2024
ad3d0f4
Chore: Install eslint 9.0
idillon-sfl Sep 17, 2024
31081cc
Chore: Install and setup @tony.ganchev/eslint-plugin-header
idillon-sfl Sep 17, 2024
bdaf9ea
Fix: all 'Unused eslint-disable directive'
idillon-sfl Sep 17, 2024
bea4be9
Fix: eslint issues on server/src/tree-sitter/analyzer.ts
idillon-sfl Sep 17, 2024
efb208f
Fix: eslint issues on server/src/connectionHandlers/onHover.ts
idillon-sfl Sep 17, 2024
322f04d
Fix: eslint issues on server/src/completions/snippet-utils.ts
idillon-sfl Sep 17, 2024
7505093
Fix: eslint issues on server/src/__tests__/onReference.test.ts
idillon-sfl Sep 17, 2024
ea95dbd
Fix: eslint issues on server/src/__tests__/completions.test.ts
idillon-sfl Sep 17, 2024
993ccf2
Fix: eslint issues on server/src/BitBakeDocScanner.ts
idillon-sfl Sep 17, 2024
21d0cc6
Fix: eslint issues on integration-tests/src/tests/rename.test.ts
idillon-sfl Sep 17, 2024
b5b412d
Fix: eslint issues on integration-tests/src/tests/references.test.ts
idillon-sfl Sep 17, 2024
613f7dd
Fix eslint issues on integration-tests/src/tests/bitbake-parse.test.ts
idillon-sfl Sep 17, 2024
a2b54ca
Fix: eslint errors on client/src/utils/ProcessUtils.ts
idillon-sfl Sep 17, 2024
d9c8757
Fix: eslint issues on client/src/ui/BitbakeTerminalProfile.ts
idillon-sfl Sep 17, 2024
afe9305
Fix: eslint issues on client/src/ui/BitbakeTerminalLinkProvider.ts
idillon-sfl Sep 17, 2024
9226589
Fix: eslint issues on client/src/ui/BitbakeTaskProvider.ts
idillon-sfl Sep 17, 2024
f15c686
Fix: eslint issues on client/src/ui/BitbakeRecipesView.ts
idillon-sfl Sep 17, 2024
fa1b701
Fix: eslint issues on server/src/server.ts
idillon-sfl Sep 17, 2024
00a933f
Fix: eslint issues on server/src/completions/spdx-licenses.ts
idillon-sfl Sep 17, 2024
feded20
Refactor: Replace PathInfo for path.ParsedPath
idillon-sfl Sep 17, 2024
1937758
Fix: eslint issues on client/src/language/middlewareRename.ts
idillon-sfl Sep 17, 2024
2657e1c
Fix: eslint issues on client/src/language/middlewareDefinition.ts
idillon-sfl Sep 17, 2024
82825cd
Fix: eslint issues on client/src/language/diagnosticsSupport.ts
idillon-sfl Sep 17, 2024
2ba8539
Fix: eslint issues on client/src/language/codeActionProvider.ts
idillon-sfl Sep 17, 2024
1b68648
Fix: eslint issues on client/src/language/EmbeddedLanguageDocsManager.ts
idillon-sfl Sep 17, 2024
6098c3d
Fix: eslint issues on client/src/extension.ts
idillon-sfl Sep 17, 2024
e14bcfa
Fix: eslint issues on client/src/driver/BitBakeProjectScanner.ts
idillon-sfl Sep 17, 2024
b6464e6
Fix: eslint issues on server/src/__tests__/fixtures/fixtures.ts
idillon-sfl Sep 17, 2024
59d5cb3
Fix: eslint issues on client/src/ui/BitbakeCommands.ts
idillon-sfl Sep 17, 2024
1ddab0a
Fix: eslint issues on client/src/lib/src/types/requests.ts
idillon-sfl Sep 17, 2024
98ef2ae
Fix: eslint issues on client/src/lib/src/BitbakeSettings.ts
idillon-sfl Sep 17, 2024
99871db
Fix: eslint issues on client/src/driver/BitbakeEnvScanner.ts
idillon-sfl Sep 17, 2024
e0dca2f
Fix: eslint issues on client/src/driver/BitbakeDriver.ts
idillon-sfl Sep 17, 2024
eb7addc
Fix: eslint issues on client/src/lib/src/__tests__/utils/output-logge…
idillon-sfl Sep 17, 2024
8a8c70b
Fix: eslint issues on client/src/__tests__/unit-tests/driver/BitbakeE…
idillon-sfl Sep 17, 2024
ed2251f
Fix: eslint issues on client/src/__tests__/unit-tests/driver/eSDKMode…
idillon-sfl Sep 17, 2024
6ed37e8
Fix: eslint issues on client/src/__tests__/unit-tests/ui/bitbake-comm…
idillon-sfl Sep 17, 2024
3a278d4
Fix: eslint issues on client/src/__tests__/unit-tests/ui/bitbake-reci…
idillon-sfl Sep 17, 2024
5fd95bb
Fix: eslint issues on client/src/__tests__/unit-tests/ui/bitbake-term…
idillon-sfl Sep 17, 2024
9e44bb0
Fix: eslint issues on client/src/__tests__/unit-tests/ui/devtool-work…
idillon-sfl Sep 17, 2024
e3d250c
Fix: eslint issues on client/src/utils/JSONFile.ts
idillon-sfl Sep 17, 2024
1173336
Fix: types in client/src/driver/BitbakeDriver.ts
idillon-sfl Sep 17, 2024
5011313
Chore: Install @types/find
idillon-sfl Sep 17, 2024
847863d
Fix: Type checking of hostWorkdir in resolveCorrespondingPath
idillon-sfl Sep 17, 2024
84455ce
Chore: Update vscode engine (1.92.0)
idillon-sfl Sep 17, 2024
f3bc3e9
Lint: Fix eslint-plugin-header dependency
deribaucourt Sep 18, 2024
8139f2c
Doc: List required packages for linting through VSCode
deribaucourt Sep 18, 2024
cd7b2d5
Chore: Bump all dependencies
deribaucourt Sep 18, 2024
964dfd1
Pack: Fix vsce errors
deribaucourt Sep 18, 2024
dab3769
Pack: Remove eslint.config.mjs configuration
deribaucourt Sep 18, 2024
2f69e9c
Chore: Also clean tsconfig.tsbuildinfo
deribaucourt Sep 18, 2024
fc2fa09
Chore: Revert vsce version to 2.3.5
deribaucourt Sep 19, 2024
cc38305
Dev: Use local eslint in vscode
deribaucourt Sep 20, 2024
945bc0b
Doc: Comment packages to be bumped later
deribaucourt Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@
"source.fixAll.eslint": "explicit"
},
"jest.jestCommandLine": "node_modules/.bin/jest",
"jest.monitorLongRun": 300000
"jest.monitorLongRun": 300000,
"eslint.nodePath": "${workspaceFolder}/node_modules",
}
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ server/parser.info
**/.gitignore
**/.eslint*
**/jest.config.js
**/eslint.config.mjs
**/*.vsix
**/*.tgz
**/*.tgz
10 changes: 5 additions & 5 deletions client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"url": "https://github.com/yoctoproject/vscode-bitbake.git"
},
"engines": {
"vscode": "^1.75.0"
"vscode": "^1.92.0"
},
"dependencies": {
"find": "^0.3.0",
"node-pty": "^1.0.0",
"vscode-languageclient": "^9.0.1"
},
"devDependencies": {
"@types/find": "^0.2.2",
"@types/find": "^0.2.4",
"@types/vscode": "^1.92.0"
},
"workspaces": [
Expand Down
13 changes: 7 additions & 6 deletions client/src/__tests__/unit-tests/driver/BitbakeESDK.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import { copyBitbakeSettings, generateCPPProperties, generateTasksDefinitions }
import { type BitbakeSettings } from '../../../lib/src/BitbakeSettings'

import * as JSONFile from '../../../utils/JSONFile'
import * as LanguageClient from '../../../language/languageClient'
import * as BitBakeLanguageClient from '../../../language/languageClient'
import { LanguageClient } from 'vscode-languageclient/node'
import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner'

describe('Bitbake ESDK Test Suite', () => {
const workspace = {
Expand Down Expand Up @@ -93,7 +95,6 @@ describe('Bitbake ESDK Test Suite', () => {
{
name: 'should not be overwritten',
browse: {
// eslint-disable-next-line no-template-curly-in-string
path: ['${workspaceFolder}/**']
}
}
Expand All @@ -103,11 +104,11 @@ describe('Bitbake ESDK Test Suite', () => {
loadJsonMock.mockReturnValueOnce(originalConfig)
const saveJsonMock = jest.spyOn(JSONFile, 'saveJsonFile').mockImplementation(() => {})

const bitBakeProjectScannerMock = { resolveContainerPath: jest.fn().mockImplementation((arg) => arg) } as any
const clientMock = jest.fn() as any
const getVariableValueMock = jest.spyOn(LanguageClient, 'getVariableValue')
const bitBakeProjectScannerMock = { resolveContainerPath: jest.fn().mockImplementation((arg) => arg) } as unknown as BitBakeProjectScanner
const clientMock = jest.fn() as unknown as LanguageClient
WilsonZiweiWang marked this conversation as resolved.
Show resolved Hide resolved
const getVariableValueMock = jest.spyOn(BitBakeLanguageClient, 'getVariableValue')
getVariableValueMock.mockImplementation(
async (client, variable, recipe) => {
async (client, variable) => {
if (variable === 'STAGING_BINDIR_TOOLCHAIN') {
return '/opt'
}
Expand Down
2 changes: 0 additions & 2 deletions client/src/__tests__/unit-tests/driver/bitbake-driver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ describe('BitbakeDriver Tests', () => {
})

it('should produce a valid crops docker run script', () => {
/* eslint-disable no-template-curly-in-string */
const driver = new BitbakeDriver()
driver.loadSettings({
commandWrapper: 'docker run --rm -it -v ${workspaceFolder}:/workdir crops/poky --workdir=/workdir /bin/bash -c',
Expand Down Expand Up @@ -111,7 +110,6 @@ describe('BitbakeDriver Tests', () => {
})

it('should compose bitbake command for scanning recipe environment', () => {
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const bitbakeTaskDefinition = {
recipes: ['recipe1'],
options: {
Expand Down
21 changes: 11 additions & 10 deletions client/src/__tests__/unit-tests/driver/eSDKMode.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@

import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner'
import { BitbakeDriver } from '../../../driver/BitbakeDriver'
import { type BitbakeSettings } from '../../../lib/src/BitbakeSettings'
import * as BitbakeTerminal from '../../../ui/BitbakeTerminal'
import * as ProcessUtils from '../../../utils/ProcessUtils'
import { bitbakeESDKMode, setBitbakeESDKMode } from '../../../driver/BitbakeESDK'
import { clientNotificationManager } from '../../../ui/ClientNotificationManager'
import { SpawnSyncReturns } from 'child_process'
import { IPty } from 'node-pty'

// Yocto's eSDKs contain devtool but not bitbake. These tests ensure we can still provide devtool functionalities without bitbake.
describe('Devtool eSDK Mode Test Suite', () => {
Expand All @@ -23,10 +24,10 @@ describe('Devtool eSDK Mode Test Suite', () => {
const bitBakeProjectScanner = new BitBakeProjectScanner(bitbakeDriver)
setBitbakeESDKMode(true)

const scanAvailableLayersSpy = jest.spyOn(bitBakeProjectScanner as any, 'scanAvailableLayers').mockImplementation(async () => {})
const scanForRecipesSpy = jest.spyOn(bitBakeProjectScanner as any, 'scanForRecipes').mockImplementation(async () => {})
const parseAllRecipesSpy = jest.spyOn(bitBakeProjectScanner as any, 'parseAllRecipes').mockImplementation(async () => {})
const scanDevtoolWorkspaces = jest.spyOn(bitBakeProjectScanner as any, 'scanDevtoolWorkspaces').mockImplementation(async () => {})
const scanAvailableLayersSpy = jest.spyOn(bitBakeProjectScanner, 'scanAvailableLayers').mockImplementation(async () => {})
const scanForRecipesSpy = jest.spyOn(bitBakeProjectScanner, 'scanForRecipes').mockImplementation(async () => {})
const parseAllRecipesSpy = jest.spyOn(bitBakeProjectScanner, 'parseAllRecipes').mockImplementation(async () => {})
const scanDevtoolWorkspaces = jest.spyOn(bitBakeProjectScanner, 'scanDevtoolWorkspaces').mockImplementation(async () => {})

await bitBakeProjectScanner.rescanProject()

Expand All @@ -38,22 +39,22 @@ describe('Devtool eSDK Mode Test Suite', () => {

it('can detect eSDK mode', async () => {
const bitbakeDriver = new BitbakeDriver()
const bitbakeSettings: BitbakeSettings = {
const bitbakeSettings: Record<string, unknown> = {
pathToBitbakeFolder: __dirname,
workingDirectory: __dirname,
commandWrapper: '',
pathToEnvScript: 'fakeEnvScript',
pathToBuildFolder: 'nonexistent'
}
bitbakeDriver.loadSettings(bitbakeSettings, __dirname)
const bitbakeTerminalSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockImplementation(async () => undefined as any)
const bitbakeTerminalSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockImplementation(async () => (undefined as unknown as Promise<IPty>))
const bitbakeExecutionSpy = jest.spyOn(ProcessUtils, 'finishProcessExecution')
clientNotificationManager.showBitbakeSettingsError = jest.fn()

bitbakeExecutionSpy.mockReturnValueOnce(Promise.resolve({
status: 1,
stdout: '/tmp/devtool\r\nbitbake not found'
} as any))
} as unknown as Promise<SpawnSyncReturns<Buffer>>))
let sane = await bitbakeDriver.checkBitbakeSettingsSanity()
expect(sane).toStrictEqual(true)
expect(bitbakeTerminalSpy).toHaveBeenCalledWith(expect.anything(), expect.stringContaining('which'), expect.anything(), expect.anything())
Expand All @@ -62,15 +63,15 @@ describe('Devtool eSDK Mode Test Suite', () => {
bitbakeExecutionSpy.mockReturnValueOnce(Promise.resolve({
status: 0,
stdout: '/tmp/devtool\r\n/tmp/bitbake'
} as any))
} as unknown as Promise<SpawnSyncReturns<Buffer>>))
sane = await bitbakeDriver.checkBitbakeSettingsSanity()
expect(sane).toStrictEqual(true)
expect(bitbakeESDKMode).toStrictEqual(false)

bitbakeExecutionSpy.mockReturnValueOnce(Promise.resolve({
status: 1,
stdout: 'error'
} as any))
} as unknown as Promise<SpawnSyncReturns<Buffer>>))
sane = await bitbakeDriver.checkBitbakeSettingsSanity()
expect(sane).toStrictEqual(false)
})
Expand Down
23 changes: 13 additions & 10 deletions client/src/__tests__/unit-tests/ui/bitbake-commands.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,31 @@
* ------------------------------------------------------------------------------------------ */

import * as vscode from 'vscode'
import type childProcess from 'child_process'
import { BitbakeWorkspace } from '../../../ui/BitbakeWorkspace'
import { BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner'
import { BitbakeDriver } from '../../../driver/BitbakeDriver'
import { registerDevtoolCommands } from '../../../ui/BitbakeCommands'
import { clientNotificationManager } from '../../../ui/ClientNotificationManager'
import * as BitbakeTerminal from '../../../ui/BitbakeTerminal'
import * as ProcessUtils from '../../../utils/ProcessUtils'
import { LanguageClient } from 'vscode-languageclient/node'
import { IPty } from 'node-pty'

jest.mock('vscode')

function mockExtensionContext (bitBakeProjectScanner: BitBakeProjectScanner): any {
function mockExtensionContext (bitBakeProjectScanner: BitBakeProjectScanner): (...args: unknown[]) => unknown {
const bitbakeWorkspace = new BitbakeWorkspace()
const contextMock: vscode.ExtensionContext = {
subscriptions: {
push: jest.fn()
}
} as any
const clientMock = jest.fn() as any
} as unknown as vscode.ExtensionContext
const clientMock = jest.fn() as unknown as LanguageClient

let ideSDKCommand: any
let ideSDKCommand = () => {}
vscode.commands.registerCommand = jest.fn().mockImplementation(
(command: string, callback: (...args: any[]) => any, thisArg?: any): void => {
(command: string, callback: (...args: unknown[]) => unknown): void => {
if (command === 'bitbake.devtool-ide-sdk') {
ideSDKCommand = callback
}
Expand Down Expand Up @@ -57,8 +60,8 @@ describe('Devtool ide-sdk command', () => {
}
const ideSDKCommand = mockExtensionContext(bitBakeProjectScanner)

jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as any)
jest.spyOn(ProcessUtils, 'finishProcessExecution').mockReturnValue({ status: 1 } as any)
jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as unknown as Promise<IPty>)
jest.spyOn(ProcessUtils, 'finishProcessExecution').mockReturnValue({ status: 1 } as unknown as Promise<childProcess.SpawnSyncReturns<Buffer>>)

clientNotificationManager.showSDKUnavailableError = jest.fn()
await ideSDKCommand('busybox')
Expand All @@ -74,10 +77,10 @@ describe('Devtool ide-sdk command', () => {
}
const ideSDKCommand = mockExtensionContext(bitBakeProjectScanner)

const commandSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as any)
jest.spyOn(ProcessUtils, 'finishProcessExecution').mockReturnValue({ status: 0 } as any)
const commandSpy = jest.spyOn(BitbakeTerminal, 'runBitbakeTerminalCustomCommand').mockReturnValue(undefined as unknown as Promise<IPty>)
jest.spyOn(ProcessUtils, 'finishProcessExecution').mockReturnValue({ status: 0 } as unknown as Promise<childProcess.SpawnSyncReturns<Buffer>>)

jest.spyOn(vscode.window, 'showInformationMessage').mockReturnValue({ then: jest.fn() } as any)
jest.spyOn(vscode.window, 'showInformationMessage').mockReturnValue({ then: jest.fn() } as unknown as Thenable<vscode.MessageItem | undefined>)
await ideSDKCommand('busybox')
expect(commandSpy).toHaveBeenCalledWith(expect.anything(), 'devtool ide-sdk -i code busybox core-image-minimal -t [email protected]', expect.anything())
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ describe('BitbakeDriver Recipes View', () => {
const bitBakeProjectScanner = new BitBakeProjectScanner(new BitbakeDriver())
void bitbakeWorkspace.addActiveRecipe('base-files') // The promise is the memento which is under mock

const contextMock: vscode.ExtensionContext = {
const contextMock = {
subscriptions: {
push: jest.fn()
}
} as any
} as unknown as vscode.ExtensionContext

const scanResult: BitbakeScanResult = {
_recipes: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BitbakeTerminalLinkProvider } from '../../../ui/BitbakeTerminalLinkProv
import { type BitBakeProjectScanner } from '../../../driver/BitBakeProjectScanner'

describe('BitbakeTerminalLinkProvider', () => {
const bitBakeProjectScanner: BitBakeProjectScanner = jest.fn() as any
const bitBakeProjectScanner = jest.fn() as unknown as BitBakeProjectScanner
const linkProvider: BitbakeTerminalLinkProvider = new BitbakeTerminalLinkProvider(bitBakeProjectScanner)

function mockScanner (): void {
Expand All @@ -34,18 +34,16 @@ describe('BitbakeTerminalLinkProvider', () => {
})

it('should return an empty array if container paths resolution is not needed', async () => {
const context: vscode.TerminalLinkContext = { line: 'some line without absolute links ./abcd;(123)' } as any
const token: vscode.CancellationToken = undefined as any
const context = { line: 'some line without absolute links ./abcd;(123)' } as unknown as vscode.TerminalLinkContext

const result = await linkProvider.provideTerminalLinks(context, token)
const result = await linkProvider.provideTerminalLinks(context)

expect(result).toEqual([])
})

it('should return an array of TerminalLinks for container paths', async () => {
const context: vscode.TerminalLinkContext = { line: 'some line "/path/to/file:123" with a link' } as any
const token: vscode.CancellationToken = undefined as any
const result = await linkProvider.provideTerminalLinks(context, token)
const context = { line: 'some line "/path/to/file:123" with a link' } as unknown as vscode.TerminalLinkContext
const result = await linkProvider.provideTerminalLinks(context)
expect(result).toHaveLength(1)
expect(result[0].startIndex).toBe(11)
expect(result[0].length).toBe(13)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ describe('Devtool Worskapces View', () => {
})

it('should list devtool workspaces', (done) => {
const contextMock: vscode.ExtensionContext = {
const contextMock = {
subscriptions: {
push: jest.fn()
}
} as any
} as unknown as vscode.ExtensionContext

const scanResult: BitbakeScanResult = {
_recipes: [{
Expand Down
15 changes: 7 additions & 8 deletions client/src/driver/BitBakeProjectScanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import type {
DevtoolWorkspaceInfo,
ElementInfo,
LayerInfo,
PathInfo
} from '../lib/src/types/BitbakeScanResult'

import { type BitbakeDriver } from './BitbakeDriver'
Expand Down Expand Up @@ -118,7 +117,7 @@ export class BitBakeProjectScanner {
void this._languageClient?.sendNotification(NotificationMethod.ScanComplete, this._bitbakeScanResult)
this.onChange.emit(BitBakeProjectScanner.EventType.SCAN_COMPLETE, this._bitbakeScanResult)
} catch (error) {
logger.error(`scanning of project is aborted: ${error as any}`)
logger.error(`scanning of project is aborted: ${error}`)
this.onChange.emit(BitBakeProjectScanner.EventType.SCAN_COMPLETE, this._bitbakeScanResult)
}

Expand Down Expand Up @@ -199,7 +198,7 @@ export class BitBakeProjectScanner {
this._bitbakeScanResult._confFiles = this.searchFiles(this._confFileExtension)
}

private async scanAvailableLayers (): Promise<void> {
public async scanAvailableLayers (): Promise<void> {
this._bitbakeScanResult._layers = new Array < LayerInfo >()
this.containerMountPoint = undefined

Expand Down Expand Up @@ -234,8 +233,8 @@ export class BitBakeProjectScanner {
if (this.containerMountPoint === undefined && !hostToContainer) {
// Should only be called through scanAvailableLayers()
const hostWorkdir = this.bitbakeDriver?.getBuildConfig('workingDirectory')
if (hostWorkdir === undefined) {
throw new Error('hostWorkdir is undefined')
if (typeof hostWorkdir !== 'string') {
throw new Error('hostWorkdir is not a string')
}
await this.scanContainerMountPoint(inputPath, hostWorkdir)
}
Expand Down Expand Up @@ -291,7 +290,7 @@ You should adjust your docker volumes to use the same URIs as those present on y
try {
const files = find.fileSync(new RegExp(`.${pattern}$`), layer.path)
for (const file of files) {
const pathObj: PathInfo = path.parse(file)
const pathObj: path.ParsedPath = path.parse(file)

const element: ElementInfo = {
name: pathObj.name,
Expand Down Expand Up @@ -389,7 +388,7 @@ You should adjust your docker volumes to use the same URIs as those present on y
this._bitbakeScanResult._overrides = output.match(outerReg)?.[1].split(':') ?? []
}

private async scanDevtoolWorkspaces (): Promise<void> {
public async scanDevtoolWorkspaces (): Promise<void> {
this._bitbakeScanResult._workspaces = new Array < DevtoolWorkspaceInfo >()
const output = await this.executeBitBakeCommand('devtool status')
const regex = /^([^\s]+):\s([^\s]+)(?:\s\([^\s]+\))?$/gm
Expand Down Expand Up @@ -480,7 +479,7 @@ You should adjust your docker volumes to use the same URIs as those present on y

for (const matchInner of match[0].matchAll(innerReg)) {
if (recipe.appends === undefined) {
recipe.appends = new Array < PathInfo >()
recipe.appends = new Array < path.ParsedPath >()
}
if (bbappendVersionMatches(recipeVersion, recipe.version)) {
const resolvedPath = await this.resolveContainerPath(matchInner[0])
Expand Down
Loading
Loading