vscode-eslint 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/azure-pipelines/linux/build.yml +14 -0
- package/build/azure-pipelines/pre-release.yml +42 -0
- package/build/azure-pipelines/release.yml +45 -0
- package/build/azure-pipelines/win32/build.yml +14 -0
- package/build/bin/all.js +29 -0
- package/build/bin/linking.js +102 -0
- package/build/bin/symlink.js +35 -0
- package/package.json +2 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: $(Date:yyyyMMdd)$(Rev:.r)
|
|
2
|
+
|
|
3
|
+
trigger: none
|
|
4
|
+
pr: none
|
|
5
|
+
|
|
6
|
+
resources:
|
|
7
|
+
repositories:
|
|
8
|
+
- repository: templates
|
|
9
|
+
type: github
|
|
10
|
+
name: microsoft/vscode-engineering
|
|
11
|
+
ref: main
|
|
12
|
+
endpoint: Monaco
|
|
13
|
+
|
|
14
|
+
parameters:
|
|
15
|
+
- name: publishExtension
|
|
16
|
+
displayName: 🚀 Publish Extension
|
|
17
|
+
type: boolean
|
|
18
|
+
default: false
|
|
19
|
+
|
|
20
|
+
extends:
|
|
21
|
+
template: azure-pipelines/extension/pre-release.yml@templates
|
|
22
|
+
parameters:
|
|
23
|
+
buildSteps:
|
|
24
|
+
- script: |
|
|
25
|
+
npm ci
|
|
26
|
+
displayName: "Install dependencies"
|
|
27
|
+
|
|
28
|
+
- script: |
|
|
29
|
+
npm run lint
|
|
30
|
+
npm run compile
|
|
31
|
+
displayName: "Lint & Compile"
|
|
32
|
+
|
|
33
|
+
ghCreateTag: true
|
|
34
|
+
ghTagPrefix: pre-release/
|
|
35
|
+
|
|
36
|
+
tsa:
|
|
37
|
+
config:
|
|
38
|
+
areaPath: 'Visual Studio Code Language Extensions'
|
|
39
|
+
serviceTreeID: 'c4cd3983-4977-4bcd-931f-a9822d2e950c'
|
|
40
|
+
enabled: true
|
|
41
|
+
|
|
42
|
+
publishExtension: ${{ parameters.publishExtension }}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: $(Date:yyyyMMdd)$(Rev:.r)
|
|
2
|
+
|
|
3
|
+
trigger:
|
|
4
|
+
branches:
|
|
5
|
+
include:
|
|
6
|
+
- main
|
|
7
|
+
pr: none
|
|
8
|
+
|
|
9
|
+
resources:
|
|
10
|
+
repositories:
|
|
11
|
+
- repository: templates
|
|
12
|
+
type: github
|
|
13
|
+
name: microsoft/vscode-engineering
|
|
14
|
+
ref: main
|
|
15
|
+
endpoint: Monaco
|
|
16
|
+
|
|
17
|
+
parameters:
|
|
18
|
+
- name: publishExtension
|
|
19
|
+
displayName: 🚀 Publish Extension
|
|
20
|
+
type: boolean
|
|
21
|
+
default: false
|
|
22
|
+
|
|
23
|
+
extends:
|
|
24
|
+
template: azure-pipelines/extension/stable.yml@templates
|
|
25
|
+
parameters:
|
|
26
|
+
buildSteps:
|
|
27
|
+
- script: |
|
|
28
|
+
npm ci
|
|
29
|
+
displayName: 'Install dependencies'
|
|
30
|
+
|
|
31
|
+
- script: |
|
|
32
|
+
npm run lint
|
|
33
|
+
npm run compile
|
|
34
|
+
displayName: 'Lint & Compile'
|
|
35
|
+
|
|
36
|
+
ghCreateTag: true
|
|
37
|
+
ghTagPrefix: release/
|
|
38
|
+
|
|
39
|
+
tsa:
|
|
40
|
+
config:
|
|
41
|
+
areaPath: 'Visual Studio Code Language Extensions'
|
|
42
|
+
serviceTreeID: 'c4cd3983-4977-4bcd-931f-a9822d2e950c'
|
|
43
|
+
enabled: true
|
|
44
|
+
|
|
45
|
+
publishExtension: ${{ parameters.publishExtension }}
|
package/build/bin/all.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
// @ts-check
|
|
9
|
+
|
|
10
|
+
const path = require('path');
|
|
11
|
+
const child_process = require('child_process')
|
|
12
|
+
|
|
13
|
+
const root = path.dirname(path.dirname(__dirname));
|
|
14
|
+
const args = process.argv.slice(2);
|
|
15
|
+
|
|
16
|
+
/** @type { { folder: string; scripts: string[] }[] } */
|
|
17
|
+
const folders = [
|
|
18
|
+
{ folder: 'client', scripts: ['install', 'lint'] },
|
|
19
|
+
{ folder: 'server', scripts: ['install', 'lint'] }
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const script = args[0] === 'run' ? args[1] : args[0];
|
|
23
|
+
|
|
24
|
+
for (const elem of folders.map(item => { return { folder: item.folder, scripts: new Set(item.scripts) } } )) {
|
|
25
|
+
if (elem.scripts.has(script)) {
|
|
26
|
+
console.log(path.join(root, elem.folder))
|
|
27
|
+
child_process.spawnSync(`npm ${args.join(' ')}`, { cwd: path.join(root, elem.folder), shell: true, stdio: 'inherit' });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
3
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
"use strict";
|
|
6
|
+
//@ts-check
|
|
7
|
+
|
|
8
|
+
const path = require('path');
|
|
9
|
+
const shell = require('shelljs');
|
|
10
|
+
|
|
11
|
+
const fs = require('fs');
|
|
12
|
+
const promisify = require('util').promisify;
|
|
13
|
+
const stat = promisify(fs.stat);
|
|
14
|
+
const readdir = promisify(fs.readdir);
|
|
15
|
+
const mkdir = promisify(fs.mkdir);
|
|
16
|
+
const exists = promisify(fs.exists);
|
|
17
|
+
const unlink = promisify(fs.unlink);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @param {string} source
|
|
21
|
+
* @param {string} dest
|
|
22
|
+
*/
|
|
23
|
+
const hardLink = exports.hardLink = async function(source, dest) {
|
|
24
|
+
const sourceStat = await stat(source);
|
|
25
|
+
if (sourceStat.isFile()) {
|
|
26
|
+
shell.ln('-f', source, dest);
|
|
27
|
+
} else {
|
|
28
|
+
await mkdir(dest);
|
|
29
|
+
const files = await readdir(source);
|
|
30
|
+
for (const file of files) {
|
|
31
|
+
if (file === '.' || file === '..') {
|
|
32
|
+
continue;
|
|
33
|
+
}
|
|
34
|
+
await hardLink(path.join(source, file), path.join(dest, file));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const tryHardLink = exports.tryHardLink = async function(source, dest) {
|
|
40
|
+
console.log(`Linking recusively ${source} -> ${dest}`);
|
|
41
|
+
if (await exists(dest)) {
|
|
42
|
+
shell.rm('-rf', dest);
|
|
43
|
+
}
|
|
44
|
+
await hardLink(source, dest)
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
exports.softLink = async function(source, dest) {
|
|
48
|
+
if (await exists(dest)) {
|
|
49
|
+
shell.rm('-rf', dest);
|
|
50
|
+
}
|
|
51
|
+
const parent = path.dirname(dest);
|
|
52
|
+
if (!await exists(parent)) {
|
|
53
|
+
await mkdir(parent, { recursive: true });
|
|
54
|
+
}
|
|
55
|
+
shell.ln('-s', source, dest);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @param {string} module
|
|
60
|
+
* @param {string} name
|
|
61
|
+
* @param {string} source
|
|
62
|
+
*/
|
|
63
|
+
const tryLink = exports.tryLink = async function(module, name, source) {
|
|
64
|
+
const current = process.cwd();
|
|
65
|
+
try {
|
|
66
|
+
const nodeModules = path.join(module, 'node_modules');
|
|
67
|
+
if (!await exists(nodeModules)) {
|
|
68
|
+
await mkdir(nodeModules);
|
|
69
|
+
}
|
|
70
|
+
process.chdir(nodeModules);
|
|
71
|
+
if (await exists(name)) {
|
|
72
|
+
shell.rm('-rf' , name);
|
|
73
|
+
}
|
|
74
|
+
shell.ln('-s', source, name);
|
|
75
|
+
} finally {
|
|
76
|
+
process.chdir(current);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
exports.tryLinkTextDocument = async function(module, languageServerDirectory) {
|
|
81
|
+
return tryLink(module, 'vscode-languageserver-textdocument', path.join(languageServerDirectory, 'textDocument'));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
exports.tryLinkJsonRpc = async function(module, languageServerDirectory) {
|
|
85
|
+
return tryLink(module, 'vscode-jsonrpc', path.join(languageServerDirectory, 'jsonrpc'));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
exports.tryLinkTypes = async function(module, languageServerDirectory) {
|
|
89
|
+
return tryLink(module, 'vscode-languageserver-types', path.join(languageServerDirectory, 'types'));
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
exports.tryLinkProtocol = async function(module, languageServerDirectory) {
|
|
93
|
+
return tryLink(module, 'vscode-languageserver-protocol', path.join(languageServerDirectory, 'protocol'));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
exports.tryLinkServer = async function(module, languageServerDirectory) {
|
|
97
|
+
return tryLink(module, 'vscode-languageserver', path.join(languageServerDirectory, 'server'));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
exports.tryLinkClient = async function(module, languageServerDirectory) {
|
|
101
|
+
return tryLink(module, 'vscode-languageclient', path.join(languageServerDirectory, 'client'));
|
|
102
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
|
+
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
"use strict";
|
|
7
|
+
//@ts-check
|
|
8
|
+
|
|
9
|
+
const path = require('path');
|
|
10
|
+
const ln = require('./linking');
|
|
11
|
+
|
|
12
|
+
const root = path.dirname(path.dirname(__dirname));
|
|
13
|
+
|
|
14
|
+
(async function main() {
|
|
15
|
+
|
|
16
|
+
const languageServerDirectory = path.normalize(path.join(root, '../../../LanguageServer/Node'));
|
|
17
|
+
|
|
18
|
+
console.log(`Symlinking to language server libs at location ${languageServerDirectory}`);
|
|
19
|
+
|
|
20
|
+
// protocol folder
|
|
21
|
+
const clientFolder = path.join(root, 'client');
|
|
22
|
+
await ln.tryLinkJsonRpc(clientFolder, languageServerDirectory);
|
|
23
|
+
await ln.tryLinkTypes(clientFolder, languageServerDirectory);
|
|
24
|
+
await ln.tryLinkProtocol(clientFolder, languageServerDirectory);
|
|
25
|
+
// Hard link the client to have a real path from the node_modules folder
|
|
26
|
+
await ln.tryHardLink(path.join(languageServerDirectory, 'client'), path.join(root, 'client', 'node_modules', 'vscode-languageclient'));
|
|
27
|
+
|
|
28
|
+
// server folder
|
|
29
|
+
const serverFolder = path.join(root, 'server');
|
|
30
|
+
await ln.tryLinkTextDocument(serverFolder, languageServerDirectory);
|
|
31
|
+
await ln.tryLinkJsonRpc(serverFolder, languageServerDirectory);
|
|
32
|
+
await ln.tryLinkTypes(serverFolder, languageServerDirectory);
|
|
33
|
+
await ln.tryLinkProtocol(serverFolder, languageServerDirectory);
|
|
34
|
+
await ln.tryLinkServer(serverFolder, languageServerDirectory);
|
|
35
|
+
})();
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "vscode-eslint",
|
|
3
3
|
"displayName": "ESLint",
|
|
4
4
|
"description": "Integrates ESLint JavaScript into VS Code.",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.5",
|
|
6
6
|
"author": "Microsoft Corporation",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"bin",
|
|
21
|
+
"build",
|
|
21
22
|
"client/out",
|
|
22
23
|
"server/out",
|
|
23
24
|
"shared",
|