Skip to content

Commit 01aa5ad

Browse files
author
Akash Satheesan
committed
fix(lib/vscode): remove native-keymap
native-keymap is only used in the electron process, so we don't need it. This allows us to drop our libx11 and libxkbfile build dependencies.
1 parent 9a7908e commit 01aa5ad

File tree

6 files changed

+76
-15
lines changed

6 files changed

+76
-15
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 libsecret-devel
1212

1313
RUN npm config set python python2
1414

ci/images/debian10/Dockerfile

+1-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ RUN curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
1616

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

2321
# Installs envsubst.
2422
RUN apt-get install -y gettext-base

docs/npm.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ Related:
2626
sudo apt-get install -y \
2727
build-essential \
2828
pkg-config \
29-
libx11-dev \
30-
libxkbfile-dev \
3129
libsecret-1-dev \
3230
python3
3331
npm config set python python3
@@ -38,14 +36,14 @@ npm config set python python3
3836
```bash
3937
sudo yum groupinstall -y 'Development Tools'
4038
sudo yum config-manager --set-enabled PowerTools # unnecessary on CentOS 7
41-
sudo yum install -y python2 libsecret-devel libX11-devel libxkbfile-devel
39+
sudo yum install -y python2 libsecret-devel
4240
npm config set python python2
4341
```
4442

4543
## Alpine
4644

4745
```bash
48-
apk add alpine-sdk bash libstdc++ libc6-compat libx11-dev libxkbfile-dev libsecret-dev
46+
apk add alpine-sdk bash libstdc++ libc6-compat libsecret-dev
4947
npm config set python python3
5048
```
5149

@@ -59,5 +57,5 @@ xcode-select --install
5957

6058
```sh
6159
pkg install -y git python npm-node12 yarn-node12 pkgconf
62-
pkg install -y libsecret libxkbfile libx11 libinotify
60+
pkg install -y libsecret libinotify
6361
```

lib/vscode/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@
7171
"keytar": "7.2.0",
7272
"minimist": "^1.2.5",
7373
"native-is-elevated": "0.4.1",
74-
"native-keymap": "2.2.1",
7574
"native-watchdog": "1.3.0",
7675
"node-pty": "0.10.0-beta19",
7776
"proxy-agent": "^4.0.0",
+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
declare module 'native-keymap' {
7+
export interface IWindowsKeyMapping {
8+
vkey: string;
9+
value: string;
10+
withShift: string;
11+
withAltGr: string;
12+
withShiftAltGr: string;
13+
}
14+
export interface IWindowsKeyboardMapping {
15+
[code: string]: IWindowsKeyMapping;
16+
}
17+
export interface ILinuxKeyMapping {
18+
value: string;
19+
withShift: string;
20+
withAltGr: string;
21+
withShiftAltGr: string;
22+
}
23+
export interface ILinuxKeyboardMapping {
24+
[code: string]: ILinuxKeyMapping;
25+
}
26+
export interface IMacKeyMapping {
27+
value: string;
28+
valueIsDeadKey: boolean;
29+
withShift: string;
30+
withShiftIsDeadKey: boolean;
31+
withAltGr: string;
32+
withAltGrIsDeadKey: boolean;
33+
withShiftAltGr: string;
34+
withShiftAltGrIsDeadKey: boolean;
35+
}
36+
export interface IMacKeyboardMapping {
37+
[code: string]: IMacKeyMapping;
38+
}
39+
40+
export type IKeyboardMapping = IWindowsKeyboardMapping | ILinuxKeyboardMapping | IMacKeyboardMapping;
41+
42+
export function getKeyMap(): IKeyboardMapping;
43+
44+
export interface IWindowsKeyboardLayoutInfo {
45+
name: string;
46+
id: string;
47+
text: string;
48+
}
49+
50+
export interface ILinuxKeyboardLayoutInfo {
51+
model: string;
52+
layout: string;
53+
variant: string;
54+
options: string;
55+
rules: string;
56+
}
57+
58+
export interface IMacKeyboardLayoutInfo {
59+
id: string;
60+
localizedName: string;
61+
lang: string;
62+
}
63+
64+
export type IKeyboardLayoutInfo = IWindowsKeyboardLayoutInfo | ILinuxKeyboardLayoutInfo | IMacKeyboardLayoutInfo;
65+
66+
export function getCurrentKeyboardLayout(): IKeyboardLayoutInfo;
67+
68+
export function onDidChangeKeyboardLayout(callback: () => void): void;
69+
70+
export function isISOKeyboard(): boolean | undefined;
71+
}

lib/vscode/yarn.lock

-5
Original file line numberDiff line numberDiff line change
@@ -6513,11 +6513,6 @@ [email protected]:
65136513
resolved "https://registry.yarnpkg.com/native-is-elevated/-/native-is-elevated-0.4.1.tgz#f6391aafb13441f5b949b39ae0b466b06e7f3986"
65146514
integrity sha512-2vBXCXCXYKLDjP0WzrXs/AFjDb2njPR31EbGiZ1mR2fMJg211xClK1Xm19RXve35kvAL4dBKOFGCMIyc2+pPsw==
65156515

6516-
6517-
version "2.2.1"
6518-
resolved "https://registry.yarnpkg.com/native-keymap/-/native-keymap-2.2.1.tgz#537023ec6e73591a68659f6a14eba8e1965b0633"
6519-
integrity sha512-rsEf2gbFFNEy3MxxQocCn9XpNyqBa8kMFFrjXFWCp3lWuhk3svHnWYZOj3Or8lNoAIjVxAPLdMClraLXHz6dnw==
6520-
65216516
65226517
version "1.3.0"
65236518
resolved "https://registry.yarnpkg.com/native-watchdog/-/native-watchdog-1.3.0.tgz#88cee94c9dc766b85c8506eda14c8bd8c9618e27"

0 commit comments

Comments
 (0)