Skip to content
Closed
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
14 changes: 7 additions & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}"],
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}"],
"preLaunchTask": "packageDev"
},
{
Expand All @@ -33,7 +33,7 @@
},
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/dist/*.js",
"${workspaceRoot}/dist/*.{js,mjs}",
"${workspaceRoot}/out/test/**/*.js"
],
"resolveSourceMapLocations": [
Expand Down Expand Up @@ -66,7 +66,7 @@
"RoslynWaiterEnabled": "true"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js", "${workspaceRoot}/out/test/**/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}", "${workspaceRoot}/out/test/**/*.js"],
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"preLaunchTask": "packageDev",
"internalConsoleOptions": "openOnSessionStart"
Expand Down Expand Up @@ -94,7 +94,7 @@
"RoslynWaiterEnabled": "true"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js", "${workspaceRoot}/out/test/**/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}", "${workspaceRoot}/out/test/**/*.js"],
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"preLaunchTask": "packageDev",
"internalConsoleOptions": "openOnSessionStart"
Expand All @@ -121,7 +121,7 @@
"TEST_FILE_FILTER": "${file}"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js", "${workspaceRoot}/out/test/**/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}", "${workspaceRoot}/out/test/**/*.js"],
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"preLaunchTask": "packageDev",
"internalConsoleOptions": "openOnSessionStart"
Expand All @@ -147,7 +147,7 @@
"TEST_FILE_FILTER": "${file}"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js", "${workspaceRoot}/out/test/**/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}", "${workspaceRoot}/out/test/**/*.js"],
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"preLaunchTask": "packageDev"
},
Expand All @@ -172,7 +172,7 @@
"TEST_FILE_FILTER": "${file}"
},
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/dist/*.js", "${workspaceRoot}/out/test/**/*.js"],
"outFiles": ["${workspaceRoot}/dist/*.{js,mjs}", "${workspaceRoot}/out/test/**/*.js"],
"resolveSourceMapLocations": ["${workspaceFolder}/**", "!**/node_modules/**"],
"preLaunchTask": "packageDev"
},
Expand Down
15 changes: 13 additions & 2 deletions esbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,23 @@ async function main() {
'src/main.ts'
],
bundle: true,
format: 'cjs',
format: 'esm',
banner: {
js: [
`import { createRequire } from 'node:module';`,
`import { dirname as commonJsDirname } from 'node:path';`,
`import { fileURLToPath as commonJsFileURLToPath } from 'node:url';`,
`const require = createRequire(import.meta.url);`,
`// Temporary CommonJS globals until bundled source usages are converted to ESM.`,
`const __filename = commonJsFileURLToPath(import.meta.url);`,
`const __dirname = commonJsDirname(__filename);`,
].join('\n'),
},
minify: production,
sourcemap: !production,
sourcesContent: false,
platform: 'node',
outfile: 'dist/extension.js',
outfile: 'dist/extension.mjs',
external: ['vscode', 'applicationinsights-native-metrics', '@opentelemetry/tracing'],
logLevel: 'info',
plugins: [
Expand Down
3 changes: 3 additions & 0 deletions msbuild/signing/signJs/signJs.proj
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,8 @@
<FilesToSign Include="$(OutDir)*.js">
<Authenticode>MicrosoftSHA2</Authenticode>
</FilesToSign>
<FilesToSign Include="$(OutDir)*.mjs">
<Authenticode>MicrosoftSHA2</Authenticode>
Comment on lines 21 to +25
</FilesToSign>
</ItemGroup>
</Project>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"xamlTools": "18.10.12014.341",
"testDiscovery": "9.9.223-ge3811b"
},
"main": "./dist/extension",
"main": "./dist/extension.mjs",
"l10n": "./l10n",
"brokeredServices": [
{
Expand Down Expand Up @@ -81,7 +81,7 @@
"omnisharptest": "npm run packageDev && npx ts-node tasks/tests/omnisharptest.ts",
"omnisharptest:integration": "npm run packageDev && npx ts-node tasks/tests/omnisharptestIntegration.ts",
"omnisharptest:unit": "npm run compileDev && npx ts-node tasks/tests/omnisharptestUnit.ts",
"package": "npm run compile && npm run signJs && node esbuild.js --production",
"package": "npm run compile && node esbuild.js --production && npm run signJs",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had we been blowing away our signature or invalidating it?

"packageDev": "npm run compileDev && node esbuild.js",
"prepare": "npm run installDependencies",
"profiling": "npm run package && npx ts-node tasks/profiling/profiling.ts",
Expand Down