Skip to content

Commit 305b820

Browse files
Merge branch 'main' into jsjoeio/add-release-prep-script
2 parents 299e17e + 8332a6a commit 305b820

File tree

9 files changed

+155
-220
lines changed

9 files changed

+155
-220
lines changed

ci/images/centos7/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ENV PATH=/usr/local/node-$NODE_VERSION/bin:$PATH
88
RUN npm install -g yarn
99

1010
RUN yum groupinstall -y 'Development Tools'
11-
RUN yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
11+
RUN yum install -y python2
1212

1313
RUN npm config set python python2
1414

ci/images/debian10/Dockerfile

+1-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@ RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
1515
apt-get update && apt-get install -y yarn
1616

1717
# Installs VS Code build deps.
18-
RUN apt-get install -y build-essential \
19-
libsecret-1-dev \
20-
libx11-dev \
21-
libxkbfile-dev
18+
RUN apt-get install -y build-essential
2219

2320
# Installs envsubst.
2421
RUN apt-get install -y gettext-base

docs/npm.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ Related:
2626
sudo apt-get install -y \
2727
build-essential \
2828
pkg-config \
29-
libx11-dev \
30-
libxkbfile-dev \
31-
libsecret-1-dev \
3229
python3
3330
npm config set python python3
3431
```
@@ -38,14 +35,14 @@ npm config set python python3
3835
```bash
3936
sudo yum groupinstall -y 'Development Tools'
4037
sudo yum config-manager --set-enabled PowerTools # unnecessary on CentOS 7
41-
sudo yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
38+
sudo yum install -y python2
4239
npm config set python python2
4340
```
4441

4542
## Alpine
4643

4744
```bash
48-
apk add alpine-sdk bash libstdc++ libc6-compat libx11-dev libxkbfile-dev libsecret-dev
45+
apk add alpine-sdk bash libstdc++ libc6-compat
4946
npm config set python python3
5047
```
5148

@@ -59,5 +56,5 @@ xcode-select --install
5956

6057
```sh
6158
pkg install -y git python npm-node12 yarn-node12 pkgconf
62-
pkg install -y libsecret libxkbfile libx11 libinotify
59+
pkg install -y libinotify
6360
```

lib/vscode/extensions/github-authentication/src/typings/ref.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55

66
/// <reference path='../../../../src/vs/vscode.d.ts'/>
77
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
8+
/// <reference path='../../../../src/typings/keytar.d.ts'/>
9+
10+
// NOTE@coder: add keytar typeref

lib/vscode/extensions/microsoft-authentication/src/typings/refs.d.ts

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55

66
/// <reference path='../../../../src/vs/vscode.d.ts'/>
77
/// <reference path='../../../../src/vs/vscode.proposed.d.ts'/>
8+
/// <reference path='../../../../src/typings/keytar.d.ts'/>
9+
10+
// NOTE@coder: add keytar typeref

lib/vscode/package.json

-3
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,8 @@
6868
"https-proxy-agent": "^2.2.3",
6969
"iconv-lite-umd": "0.6.8",
7070
"jschardet": "2.2.1",
71-
"keytar": "7.2.0",
7271
"minimist": "^1.2.5",
7372
"native-is-elevated": "0.4.1",
74-
"native-keymap": "2.2.1",
7573
"native-watchdog": "1.3.0",
7674
"node-pty": "0.10.0-beta19",
7775
"proxy-agent": "^4.0.0",
@@ -106,7 +104,6 @@
106104
"@types/graceful-fs": "4.1.2",
107105
"@types/gulp-postcss": "^8.0.0",
108106
"@types/http-proxy-agent": "^2.0.1",
109-
"@types/keytar": "^4.4.0",
110107
"@types/minimist": "^1.2.1",
111108
"@types/mocha": "^8.2.0",
112109
"@types/node": "^12.19.9",

lib/vscode/src/typings/keytar.d.ts

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Definitions by: Milan Burda <https://github.com/miniak>, Brendan Forster <https://github.com/shiftkey>, Hari Juturu <https://github.com/juturu>
2+
// Adapted from DefinitelyTyped: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/keytar/index.d.ts
3+
4+
// NOTE@coder: copy in from keytar upstream and modify
5+
// keytar pulls in libsecret-dev, which we want to avoid,
6+
// and vscode has a 'fallback' for web use that redirects keytar calls to use localStorage.
7+
// Keep types in here for it to compile correctly.
8+
9+
declare module 'keytar' {
10+
/**
11+
* Get the stored password for the service and account.
12+
*
13+
* @param service The string service name.
14+
* @param account The string account name.
15+
*
16+
* @returns A promise for the password string.
17+
*/
18+
export function getPassword(service: string, account: string): Promise<string | null>;
19+
20+
/**
21+
* Add the password for the service and account to the keychain.
22+
*
23+
* @param service The string service name.
24+
* @param account The string account name.
25+
* @param password The string password.
26+
*
27+
* @returns A promise for the set password completion.
28+
*/
29+
export function setPassword(service: string, account: string, password: string): Promise<void>;
30+
31+
/**
32+
* Delete the stored password for the service and account.
33+
*
34+
* @param service The string service name.
35+
* @param account The string account name.
36+
*
37+
* @returns A promise for the deletion status. True on success.
38+
*/
39+
export function deletePassword(service: string, account: string): Promise<boolean>;
40+
41+
/**
42+
* Find a password for the service in the keychain.
43+
*
44+
* @param service The string service name.
45+
*
46+
* @returns A promise for the password string.
47+
*/
48+
export function findPassword(service: string): Promise<string | null>;
49+
50+
/**
51+
* Find all accounts and passwords for `service` in the keychain.
52+
*
53+
* @param service The string service name.
54+
*
55+
* @returns A promise for the array of found credentials.
56+
*/
57+
export function findCredentials(service: string): Promise<Array<{ account: string, password: string}>>;
58+
}
+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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+
6+
// NOTE@coder: copy from native-keymap
7+
// only used in electron-main, so we remove it to avoid pulling X11 in at build time.
8+
// these types are required during compile, but functions are never used
9+
10+
declare module 'native-keymap' {
11+
export interface IWindowsKeyMapping {
12+
vkey: string;
13+
value: string;
14+
withShift: string;
15+
withAltGr: string;
16+
withShiftAltGr: string;
17+
}
18+
export interface IWindowsKeyboardMapping {
19+
[code: string]: IWindowsKeyMapping;
20+
}
21+
export interface ILinuxKeyMapping {
22+
value: string;
23+
withShift: string;
24+
withAltGr: string;
25+
withShiftAltGr: string;
26+
}
27+
export interface ILinuxKeyboardMapping {
28+
[code: string]: ILinuxKeyMapping;
29+
}
30+
export interface IMacKeyMapping {
31+
value: string;
32+
valueIsDeadKey: boolean;
33+
withShift: string;
34+
withShiftIsDeadKey: boolean;
35+
withAltGr: string;
36+
withAltGrIsDeadKey: boolean;
37+
withShiftAltGr: string;
38+
withShiftAltGrIsDeadKey: boolean;
39+
}
40+
export interface IMacKeyboardMapping {
41+
[code: string]: IMacKeyMapping;
42+
}
43+
44+
export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping;
45+
46+
export function getKeyMap(): IKeyboardMapping;
47+
48+
export interface IWindowsKeyboardLayoutInfo {
49+
name: string;
50+
id: string;
51+
text: string;
52+
}
53+
54+
export interface ILinuxKeyboardLayoutInfo {
55+
model: string;
56+
layout: string;
57+
variant: string;
58+
options: string;
59+
rules: string;
60+
}
61+
62+
export interface IMacKeyboardLayoutInfo {
63+
id: string;
64+
localizedName: string;
65+
lang: string;
66+
}
67+
68+
export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo;
69+
70+
export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo;
71+
72+
export function onDidChangeKeyboardLayout(callback: () => void): void;
73+
74+
export function isISOKeyboard(): boolean | undefined;
75+
}

0 commit comments

Comments
 (0)