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
2 changes: 1 addition & 1 deletion esbuild.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { autoEsbuildOrWatch, autoSelectEsbuildConfig } from '@microsoft/vscode-azext-eng/esbuild';

const { extensionConfig, telemetryConfig } = autoSelectEsbuildConfig();
const { extensionConfig, telemetryConfig } = autoSelectEsbuildConfig(true);

/** @type {import('esbuild').BuildOptions} */
const finalConfig = {
Expand Down
22 changes: 5 additions & 17 deletions main.js → main.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,23 @@
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
*--------------------------------------------------------------------------------------------*/

"use strict";

/* eslint-disable no-undef */ // Ignore the fact that the engine (which is VSCode) is unknown by the linter

// This is the extension entrypoint, which imports extension.bundle.js, the actual extension code.
// This is the extension entrypoint, which imports extension.bundle.mjs, the actual extension code.
//
// This is in a separate file so we can properly measure extension.bundle.js load time.
// This is in a separate file so we can properly measure extension.bundle.mjs load time.

const perfStats = {
loadStartTime: Date.now(),
loadEndTime: undefined
};

Object.defineProperty(exports, "__esModule", { value: true });

// eslint-disable-next-line @typescript-eslint/no-var-requires
const extension = require("./dist/extension.bundle");
const extension = await import("./dist/extension.bundle.mjs");

async function activate(ctx) {
export async function activate(ctx) {
return await extension.activateInternal(ctx, perfStats);
}

async function deactivate(ctx) {
export async function deactivate(ctx) {
return await extension.deactivateInternal(ctx);
}

exports.activate = activate;
exports.deactivate = deactivate;

perfStats.loadEndTime = Date.now();

/* eslint-enable no-undef */
8 changes: 4 additions & 4 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
"onLanguage:dockerfile",
"onLanguage:dockercompose"
],
"main": "main",
"main": "main.mjs",
"module": "main.mjs",
Comment thread
bwateratmsft marked this conversation as resolved.
Resolved
"contributes": {
"menus": {
"commandPalette": [
Expand Down Expand Up @@ -3351,7 +3352,7 @@
],
"devDependencies": {
"@azure/arm-appservice": "^15.0.0",
"@microsoft/vscode-azext-eng": "1.0.0-alpha.11",
"@microsoft/vscode-azext-eng": "1.0.0-alpha.12",
"@types/fs-extra": "^11.0.1",
"@types/node": "22.x",
"@types/semver": "^7.3.13",
Expand Down
4 changes: 2 additions & 2 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function activateDockerfileLanguageClient(ctx: vscode.ExtensionContext): void {
"dist",
"dockerfile-language-server-nodejs",
"lib",
"server.js"
"server.mjs"
)
);

Expand Down Expand Up @@ -330,7 +330,7 @@ function activateComposeLanguageClient(ctx: vscode.ExtensionContext): void {
"dist",
"compose-language-service",
"lib",
"server.js"
"server.mjs"
)
);

Expand Down