Skip to content

Commit 048d9ca

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 048d9ca

File tree

6 files changed

+74
-15
lines changed

6 files changed

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

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)