Skip to content

Commit

Permalink
chore(deps): Update all dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Blond11516 committed Feb 25, 2024
1 parent 3397eac commit 5f4c134
Show file tree
Hide file tree
Showing 35 changed files with 7,042 additions and 4,383 deletions.
9 changes: 6 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@
"match": false
}
},

{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},

{
"selector": "typeLike",
"format": ["PascalCase"]
},
{
"selector": "import",
"format": ["PascalCase", "camelCase"]
}
],
"no-inner-declarations": "off",
Expand All @@ -51,6 +53,7 @@
"jest.e2e.config.js",
"jest.config.ts",
"src/test-e2e/vscode-environment.js",
"src/test-e2e/vscode.js"
"src/test-e2e/vscode.js",
".yarn"
]
}
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@ dist
node_modules
.vscode-test/
*.vsix

# Yarn
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ dist
node_modules
.vscode-test/
*.vsix
.yarn/
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
yarn 1.22.19
nodejs 16.17.1
nodejs 20.11.1
erlang 24.3.4.13
elixir 1.13.4-otp-24
893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.1.0.cjs

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion .yarnrc

This file was deleted.

3 changes: 3 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-4.1.0.cjs
2 changes: 1 addition & 1 deletion __mocks__/vscode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const progressStub = {
type WithProgressFun = (
progress: Progress<{
message: string;
}>
}>,
) => Promise<void>;

const outputChannelStub = {
Expand Down
57 changes: 29 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"icon": "assets/lexi-logo-square-128.png",
"license": "Apache-2.0",
"engines": {
"vscode": "^1.74.0"
"vscode": "^1.82.0"
},
"categories": [
"Programming Languages",
Expand Down Expand Up @@ -154,33 +154,34 @@
"esbuild": "yarn esbuild-base --sourcemap"
},
"devDependencies": {
"@jest/globals": "^29.7.0",
"@types/glob": "^8.1.0",
"@types/node": "16.x",
"@types/vscode": "^1.73.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vscode/test-electron": "^2.2.3",
"@vscode/vsce": "^2.21.1",
"esbuild": "^0.17.19",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.8.0",
"glob": "^8.1.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-extended": "^4.0.2",
"ovsx": "^0.8.3",
"prettier": "^2.8.8",
"ts-jest": "^29.1.2",
"ts-node": "^10.9.1",
"typescript": "^4.9.5",
"vscode-uri": "^3.0.7"
"@jest/globals": "29.7.0",
"@types/glob": "8.1.0",
"@types/node": "20.x",
"@types/vscode": "1.86.0",
"@typescript-eslint/eslint-plugin": "7.0.2",
"@typescript-eslint/parser": "7.0.2",
"@vscode/test-electron": "2.3.9",
"@vscode/vsce": "2.24.0",
"esbuild": "0.20.1",
"eslint": "8.57.0",
"eslint-config-prettier": "9.1.0",
"glob": "10.3.10",
"jest": "29.7.0",
"jest-environment-node": "29.7.0",
"jest-extended": "4.0.2",
"ovsx": "0.8.3",
"prettier": "3.2.5",
"ts-jest": "29.1.2",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"vscode-uri": "3.0.8"
},
"dependencies": {
"axios": "^1.3.4",
"date-fns": "^2.30.0",
"extract-zip": "^2.0.1",
"semver": "^7.5.1",
"vscode-languageclient": "^8.1.0"
}
"axios": "1.6.7",
"date-fns": "3.3.1",
"extract-zip": "2.0.1",
"semver": "7.6.0",
"vscode-languageclient": "9.0.1"
},
"packageManager": "[email protected]"
}
8 changes: 4 additions & 4 deletions src/auto-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@ import Logger from "./logger";
namespace AutoInstaller {
export function isInstalledReleaseLatest(
installationDirectoryUri: Uri,
latestRelease: Release.T
latestRelease: Release.T,
): boolean {
const installationManifest = InstallationManifest.fetch(
installationDirectoryUri
installationDirectoryUri,
);
if (installationManifest === undefined) {
return false;
}

return InstallationManifest.isInstalledVersionGreaterThan(
installationManifest,
latestRelease.version
latestRelease.version,
);
}

export async function install(
progress: Progress<{ message: string }>,
latestRelease: Release.T,
releaseUri: Uri
releaseUri: Uri,
) {
progress.report({ message: "Downloading Lexical release" });

Expand Down
4 changes: 2 additions & 2 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace Commands {

type RegisterFunction = <Context>(
command: T<Context>,
context: Context
context: Context,
) => void;

export interface T<Context> {
Expand All @@ -12,7 +12,7 @@ namespace Commands {
}

export function getRegisterFunction(
clientRegister: (id: string, handler: CommandHandler) => void
clientRegister: (id: string, handler: CommandHandler) => void,
): RegisterFunction {
return <Context>(command: T<Context>, context: Context) =>
clientRegister(command.id, command.createHandler(context));
Expand Down
4 changes: 2 additions & 2 deletions src/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ namespace Configuration {
type GetConfig = (section: string) => unknown;

export function getReleasePathOverride(
getConfig: GetConfig
getConfig: GetConfig,
): string | undefined {
return getConfig("releasePathOverride") as string | undefined;
}

export function getProjectDirUri(
getConfig: GetConfig,
workspace: typeof vsWorkspace
workspace: typeof vsWorkspace,
): URI {
const projectDirConfig = getConfig("projectDir");

Expand Down
12 changes: 6 additions & 6 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ export async function activate(context: ExtensionContext): Promise<void> {
export function deactivate(): void {}

async function maybeAutoInstall(
context: ExtensionContext
context: ExtensionContext,
): Promise<string | undefined> {
const releasePathOverride = Configuration.getReleasePathOverride(getConfig);

if (releasePathOverride !== undefined && releasePathOverride !== "") {
Logger.info(
`Release override path set to "${releasePathOverride}". Skipping auto-install.`
`Release override path set to "${releasePathOverride}". Skipping auto-install.`,
);

return releasePathOverride as string;
Expand All @@ -55,7 +55,7 @@ async function maybeAutoInstall(

return await LanguageServer.install(
context.globalStorageUri,
window.showErrorMessage
window.showErrorMessage,
);
}

Expand All @@ -73,7 +73,7 @@ function isExecutableFile(path: fs.PathLike): boolean {

async function start(
startScriptOrReleaseFolderPath: string,
workspaceUri: URI
workspaceUri: URI,
): Promise<LanguageClient> {
Logger.info(`Starting Lexical in directory ${workspaceUri?.fsPath}`);

Expand Down Expand Up @@ -110,11 +110,11 @@ async function start(
"lexical",
"Lexical",
serverOptions,
clientOptions
clientOptions,
);

Logger.info(
`Starting lexical release in "${startScriptOrReleaseFolderPath}"`
`Starting lexical release in "${startScriptOrReleaseFolderPath}"`,
);

try {
Expand Down
6 changes: 3 additions & 3 deletions src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Github {
const latestRelease = (
await axios.get<GithubRelease.T>(
"https://api.github.com/repos/lexical-lsp/lexical/releases/latest",
{ headers: { accept: "application/vnd.github+json" } }
{ headers: { accept: "application/vnd.github+json" } },
)
).data;

Expand All @@ -20,10 +20,10 @@ namespace Github {
}

export async function downloadZip(
release: Release.T
release: Release.T,
): Promise<NodeJS.ArrayBufferView> {
Logger.info(
`Downloading lexical archive from github with path "${release.archiveUrl}"`
`Downloading lexical archive from github with path "${release.archiveUrl}"`,
);

const zipArrayBuffer = (
Expand Down
14 changes: 7 additions & 7 deletions src/installation-manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace InstallationManifest {
export function write(installDirUri: Uri, release: Release.T): void {
const installationManifestUri = Uri.joinPath(
installDirUri,
"installation_manifest.json"
"installation_manifest.json",
);

const manifest: T = { installedVersion: release.version };
Expand All @@ -26,23 +26,23 @@ namespace InstallationManifest {
manifest: JSON.stringify(rawManifest),
});
Logger.info(
`Writing installation manifest to ${installationManifestUri.fsPath}`
`Writing installation manifest to ${installationManifestUri.fsPath}`,
);

fs.writeFileSync(
installationManifestUri.fsPath,
JSON.stringify(rawManifest)
JSON.stringify(rawManifest),
);
}

export function fetch(installDirUri: Uri): T | undefined {
const installationManifestUri = Uri.joinPath(
installDirUri,
"installation_manifest.json"
"installation_manifest.json",
);

Logger.info(
`Looking for an installation manifest at path ${installationManifestUri.fsPath}`
`Looking for an installation manifest at path ${installationManifestUri.fsPath}`,
);

if (!fs.existsSync(installationManifestUri.fsPath)) {
Expand All @@ -69,13 +69,13 @@ namespace InstallationManifest {

export function isInstalledVersionGreaterThan(
manifest: T,
releaseVersion: ReleaseVersion.T
releaseVersion: ReleaseVersion.T,
): boolean {
return ReleaseVersion.gte(manifest.installedVersion, releaseVersion);
}

function isValid(
rawManifest: unknown
rawManifest: unknown,
): rawManifest is RawInstallationManifest {
return (
typeof rawManifest === "object" &&
Expand Down
Loading

0 comments on commit 5f4c134

Please sign in to comment.