Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion Packages/src/Cli~/src/__tests__/cli-e2e.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,6 @@ describe('CLI E2E Tests (requires running Unity)', () => {
// Should mention project skills were installed
expect(stdout).toMatch(/project|installed/i);
});

});

describe('execute-dynamic-code', () => {
Expand Down
4 changes: 1 addition & 3 deletions Packages/src/Cli~/src/__tests__/launch-readiness.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -907,9 +907,7 @@ describe('waitForLaunchReadyAfterLaunch', () => {
await waitForLaunchReadyAfterLaunch('/project', {
resolveUnityConnectionFn: jest
.fn()
.mockResolvedValue(
createConnection(8711, { shouldValidateProject: false, projectRoot }),
),
.mockResolvedValue(createConnection(8711, { shouldValidateProject: false, projectRoot })),
createClient: () =>
createMockClient(
[
Expand Down
4 changes: 3 additions & 1 deletion Packages/src/Cli~/src/__tests__/skills-manager.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ describe('skill install layout', () => {
expect(searchRoots).toContain(join(projectRoot, 'Assets'));
expect(searchRoots).toContain(join(projectRoot, 'Packages', 'src'));
expect(searchRoots).toContain(join(projectRoot, 'Packages', 'com.example.embedded'));
expect(searchRoots).toContain(join(projectRoot, 'Library', 'PackageCache', 'com.example.cached@1.0.0'));
expect(searchRoots).toContain(
join(projectRoot, 'Library', 'PackageCache', 'com.example.cached@1.0.0'),
);
expect(searchRoots).toContain(localPackageRoot);
expect(searchRoots).not.toContain(
join(projectRoot, 'Library', 'PackageCache', 'com.example.unused@1.0.0'),
Expand Down
11 changes: 9 additions & 2 deletions Packages/src/Cli~/src/skills/skills-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ function isSkillOutdated(

const installedFiles = collectSkillFolderFiles(skillDir);
const expectedFileCount =
1 + ('additionalFiles' in skill && skill.additionalFiles ? Object.keys(skill.additionalFiles).length : 0);
1 +
('additionalFiles' in skill && skill.additionalFiles
? Object.keys(skill.additionalFiles).length
: 0);
const installedFileCount = 1 + (installedFiles ? Object.keys(installedFiles).length : 0);
if (installedFileCount !== expectedFileCount) {
return true;
Expand Down Expand Up @@ -718,7 +721,11 @@ function uninstallSkill(
return removed;
}

function uninstallSkillFromAllLayouts(skill: SkillDefinition, target: TargetConfig, global: boolean): boolean {
function uninstallSkillFromAllLayouts(
skill: SkillDefinition,
target: TargetConfig,
global: boolean,
): boolean {
const baseDir = getSkillsBaseDir(target, global);
const candidateDirs = [
getManagedSkillDir(baseDir, skill.dirName),
Expand Down