Skip to content

Commit 36827e0

Browse files
committed
TypeScript: migrate to 6.0x
- `baseUrl` in `tsconfig.json` is no longer supported. - Un-prefixed imports relative to `tsconfig.json` no longer works; map it to the `@` path instead. Signed-off-by: Mark Yen <mark.yen@suse.com>
1 parent 5d7dbce commit 36827e0

21 files changed

+57
-57
lines changed

pkg/rancher-desktop/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
"strict": true,
1616
"noEmit": false,
1717
"experimentalDecorators": true,
18-
"baseUrl": ".",
1918
"paths": {
2019
"@pkg/*": [
2120
"./*"

screenshots/screenshots.e2e.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import { imagesList } from './test-data/images';
99
import { lockedSettings } from './test-data/preferences';
1010
import { snapshotsList } from './test-data/snapshots';
1111
import { volumesList } from './test-data/volumes';
12-
import { NavPage } from '../e2e/pages/nav-page';
13-
import { PreferencesPage } from '../e2e/pages/preferences';
14-
import { clearUserProfile } from '../e2e/utils/ProfileUtils';
12+
13+
import { ContainerLogsPage } from '@/e2e/pages/container-logs-page';
14+
import { NavPage } from '@/e2e/pages/nav-page';
15+
import { PreferencesPage } from '@/e2e/pages/preferences';
16+
import { clearUserProfile } from '@/e2e/utils/ProfileUtils';
1517
import {
1618
createDefaultSettings, setUserProfile, retry, teardown, tool, startRancherDesktop, reportAsset,
17-
} from '../e2e/utils/TestUtils';
18-
19+
} from '@/e2e/utils/TestUtils';
1920
import { ContainerEngine, CURRENT_SETTINGS_VERSION } from '@pkg/config/settings';
2021
import { Log } from '@pkg/utils/logging';
21-
import { ContainerLogsPage } from 'e2e/pages/container-logs-page';
2222

2323
import type { ElectronApplication, Page } from '@playwright/test';
2424

scripts/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import * as path from 'path';
1111

1212
import buildUtils from './lib/build-utils';
1313

14-
import { simpleSpawn } from 'scripts/simple_process';
14+
import { simpleSpawn } from '@/scripts/simple_process';
1515

1616
class Builder {
1717
async cleanup() {

scripts/dependencies/go-source.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22

3-
import { Dependency, DownloadContext } from 'scripts/lib/dependencies';
4-
import { simpleSpawn } from 'scripts/simple_process';
3+
import { Dependency, DownloadContext } from '@/scripts/lib/dependencies';
4+
import { simpleSpawn } from '@/scripts/simple_process';
55

66
interface GoDependencyOptions {
77
/**

scripts/dependencies/lima.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ import {
1919
GitHubDependency,
2020
GitHubRelease,
2121
GlobalDependency,
22-
} from 'scripts/lib/dependencies';
23-
import { simpleSpawn } from 'scripts/simple_process';
22+
} from '@/scripts/lib/dependencies';
23+
import { simpleSpawn } from '@/scripts/simple_process';
2424

2525
export class Lima extends GlobalDependency(GitHubDependency) {
2626
readonly name = 'lima';

scripts/dependencies/moby-openapi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import yaml from 'yaml';
66

77
import { download } from '../lib/download';
88

9-
import { DownloadContext, getOctokit, VersionedDependency, GlobalDependency } from 'scripts/lib/dependencies';
10-
import { simpleSpawn } from 'scripts/simple_process';
9+
import { DownloadContext, getOctokit, VersionedDependency, GlobalDependency } from '@/scripts/lib/dependencies';
10+
import { simpleSpawn } from '@/scripts/simple_process';
1111

1212
// This downloads the moby openAPI specification (for WSL-helper) and generates
1313
// ./src/go/wsl-helper/pkg/dockerproxy/models/...

scripts/dependencies/sudo-prompt.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import path from 'path';
22

3-
import { Dependency, DownloadContext } from 'scripts/lib/dependencies';
4-
import { simpleSpawn } from 'scripts/simple_process';
3+
import { Dependency, DownloadContext } from '@/scripts/lib/dependencies';
4+
import { simpleSpawn } from '@/scripts/simple_process';
55

66
/**
77
* SudoPrompt represents the sudo-prompt.app applet used by sudo-prompt on macOS.

scripts/dependencies/tar-archives.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import stream from 'stream';
66

77
import tar from 'tar-stream';
88

9-
import { Dependency, DownloadContext } from 'scripts/lib/dependencies';
9+
import { Dependency, DownloadContext } from '@/scripts/lib/dependencies';
1010

1111
export class ExtensionProxyImage implements Dependency {
1212
readonly name = 'rdx-proxy.tar';

scripts/dependencies/tools.ts

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,22 @@ import fs from 'fs';
22
import os from 'os';
33
import path from 'path';
44

5+
import {
6+
DownloadContext,
7+
findChecksum,
8+
getPublishedReleaseTagNames,
9+
GitHubDependency,
10+
GlobalDependency,
11+
} from '@/scripts/lib/dependencies';
512
import {
613
ArchiveDownloadOptions,
714
download,
815
DownloadOptions,
916
downloadTarGZ,
1017
downloadZip,
1118
getResource,
12-
} from '../lib/download';
13-
14-
import {
15-
DownloadContext,
16-
findChecksum,
17-
getPublishedReleaseTagNames,
18-
GitHubDependency,
19-
GlobalDependency,
20-
} from 'scripts/lib/dependencies';
21-
import { simpleSpawn } from 'scripts/simple_process';
19+
} from '@/scripts/lib/download';
20+
import { simpleSpawn } from '@/scripts/simple_process';
2221

2322
function exeName(context: DownloadContext, name: string) {
2423
const onWindows = context.platform === 'win32';

scripts/dependencies/wix.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import semver from 'semver';
66
import { DownloadContext, GitHubDependency, GlobalDependency, getOctokit } from '../lib/dependencies';
77
import { download } from '../lib/download';
88

9-
import { simpleSpawn } from 'scripts/simple_process';
9+
import { simpleSpawn } from '@/scripts/simple_process';
1010

1111
/**
1212
* Wix downloads the latest build of WiX3.

0 commit comments

Comments
 (0)