Skip to content

Commit 2b2e93a

Browse files
authored
Move to new eng package, split build to CJS+ESM (#173)
1 parent c92c82d commit 2b2e93a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2067
-1376
lines changed

.eslintignore

Lines changed: 0 additions & 4 deletions
This file was deleted.

.eslintrc.json

Lines changed: 0 additions & 69 deletions
This file was deleted.

.npmignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
lib/test/**
1+
!dist
2+
dist/*/test/**
23
.eslint*
34
.vscode
5+
.nvmrc
46
src
57
tsconfig.json
68
.github
79
.azure-pipelines
810
*.tgz
911
.gitattributes
12+
*.map
13+
eslint.config.mjs

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.17
1+
22.18

.vscode/launch.json

Lines changed: 9 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,16 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"type": "node",
8+
"name": "Run Tests",
99
"request": "launch",
10-
"name": "Mocha All",
11-
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
12-
"args": [
13-
"--timeout", // Set an infinite timeout when debugging so breakpoints don't mislead into thinking the test failed
14-
"0",
15-
"--file",
16-
"${workspaceFolder}/lib/test/global.test.js",
17-
"--recursive",
18-
"${workspaceFolder}/lib/test"
10+
"runtimeArgs": [
11+
"test",
1912
],
20-
"preLaunchTask": "${defaultBuildTask}",
21-
"resolveSourceMapLocations": [
22-
"${workspaceFolder}/**",
23-
"!**/node_modules/**"
24-
],
25-
"internalConsoleOptions": "openOnSessionStart",
26-
"presentation": {
27-
"group": "Mocha",
28-
}
29-
},
30-
{
31-
"type": "node",
32-
"request": "launch",
33-
"name": "Mocha Unit Tests",
34-
"program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
35-
"args": [
36-
"--timeout", // Set an infinite timeout when debugging so breakpoints don't mislead into thinking the test failed
37-
"0",
38-
"--file",
39-
"${workspaceFolder}/lib/test/global.test.js",
40-
"--grep",
41-
"/unit/i",
42-
"--recursive",
43-
"${workspaceFolder}/lib/test"
44-
],
45-
"preLaunchTask": "${defaultBuildTask}",
46-
"resolveSourceMapLocations": [
47-
"${workspaceFolder}/**",
48-
"!**/node_modules/**"
13+
"runtimeExecutable": "npm",
14+
"skipFiles": [
15+
"<node_internals>/**"
4916
],
50-
"internalConsoleOptions": "openOnSessionStart",
51-
"presentation": {
52-
"group": "Mocha",
53-
}
17+
"type": "node"
5418
},
5519
{
5620
"name": "Test Client Extension",
@@ -59,9 +23,9 @@
5923
"args": [
6024
"--extensionDevelopmentPath=${workspaceFolder}/src/test/clientExtension",
6125
"--disable-extension=ms-azuretools.vscode-containers", // Keep the Container Tools extension from running so it doesn't interfere with testing
26+
"--disable-extension=docker.docker", // Keep the Docker DX extension from running so it doesn't interfere with testing
6227
"--disable-extension=redhat.vscode-yaml", // Keep the YAML extension from running so it doesn't interfere with testing
6328
],
64-
"preLaunchTask": "tsc-watch: client extension",
6529
"presentation": {
6630
"hidden": true,
6731
}
@@ -92,7 +56,7 @@
9256
"group": "Live testing",
9357
"order": 1
9458
},
95-
"preLaunchTask": "tsc-watch: language service"
59+
"preLaunchTask": "Build+Watch+CJS"
9660
}
9761
]
9862
}

.vscode/settings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"editor.codeActionsOnSave": {
99
"source.fixAll": "explicit"
1010
},
11-
"typescript.preferences.importModuleSpecifier": "relative",
1211
"git.branchProtection": [
1312
"main",
1413
"rel/*"

.vscode/tasks.json

Lines changed: 11 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,24 @@
22
"version": "2.0.0",
33
"tasks": [
44
{
5-
"type": "typescript",
6-
"tsconfig": "tsconfig.json",
7-
"option": "watch",
8-
"problemMatcher": [
9-
"$tsc-watch"
5+
"label": "Build+Watch+CJS",
6+
"type": "shell",
7+
"command": "npm",
8+
"args": [
9+
"run",
10+
"build:cjs",
11+
"--",
12+
"--watch",
1013
],
1114
"group": {
1215
"kind": "build",
13-
"isDefault": true
14-
},
15-
"presentation": {
16-
"reveal": "never"
16+
"isDefault": true,
1717
},
1818
"isBackground": true,
19-
"label": "tsc-watch: language service"
20-
},
21-
{
22-
"type": "typescript",
23-
"tsconfig": "src/test/clientExtension/tsconfig.json",
24-
"option": "watch",
25-
"problemMatcher": [
26-
"$tsc-watch"
27-
],
28-
"group": "build",
2919
"presentation": {
30-
"reveal": "never"
20+
"revealProblems": "onProblem"
3121
},
32-
"isBackground": true,
33-
"label": "tsc-watch: client extension"
22+
"problemMatcher": "$tsc-watch",
3423
}
3524
]
3625
}

bin/docker-compose-langserver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
* Copyright (c) Microsoft Corporation. All rights reserved.
44
* Licensed under the MIT License. See LICENSE in the project root for license information.
55
*--------------------------------------------------------------------------------------------*/
6-
require("../lib/server");
6+
require("../dist/cjs/server");

eslint.config.mjs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*---------------------------------------------------------------------------------------------
2+
* Copyright (c) Microsoft Corporation. All rights reserved.
3+
* Licensed under the MIT License. See LICENSE.md in the project root for license information.
4+
*--------------------------------------------------------------------------------------------*/
5+
6+
import { azExtEslintRecommendedTypeChecked } from '@microsoft/vscode-azext-eng/eslint'; // Other configurations exist
7+
import { defineConfig, globalIgnores } from 'eslint/config';
8+
9+
export default defineConfig(
10+
globalIgnores([
11+
'src/test/clientExtension',
12+
]),
13+
azExtEslintRecommendedTypeChecked,
14+
);

0 commit comments

Comments
 (0)