@vscodium/native-keymap 3.3.7-258423 → 3.3.9-260952

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/README.md CHANGED
@@ -1,82 +1,20 @@
1
- # OS key mapping node module
2
- Returns what characters are produced by pressing keys with different modifiers on the current system keyboard layout.
1
+ [@vscodium/native-keymap](https://github.com/VSCodium/native-keymap)
2
+ ======================================================================
3
3
 
4
- ## Installing
4
+ [![Version](https://img.shields.io/npm/v/@vscodium/native-keymap.svg)](https://npmjs.org/package/@vscodium/native-keymap)
5
5
 
6
- * On Debian-based Linux: `sudo apt-get install libx11-dev libxkbfile-dev`
7
- * On Red Hat-based Linux: `sudo yum install libx11-devel.x86_64 libxkbfile-devel.x86_64 # or .i686`
8
- * On SUSE-based Linux: `sudo zypper install libX11-devel libxkbfile-devel`
9
- * On FreeBSD: `sudo pkg install libX11 libxkbfile`
6
+ ## <a id="fork"></a>Why fork from microsoft/node-native-keymap
10
7
 
11
- ```sh
12
- npm install @vscodium/native-keymap
13
- ```
8
+ The purpose of the fork is to provide prebuilt binaries for all the architectures supported by VSCodium.
9
+ The source code hasn't been changed.
14
10
 
15
- ## Using
11
+ ## <a id="usage"></a>Usage
16
12
 
17
- ```javascript
13
+ ```js
18
14
  var keymap = require('@vscodium/native-keymap');
19
15
  console.log(keymap.getKeyMap());
20
16
  ```
21
17
 
22
- Example output when using standard US keyboard layout (on Windows):
23
- ```
24
- [
25
- ...
26
- Space: { vkey: 'VK_SPACE', value: ' ', withShift: ' ', withAltGr: '', withShiftAltGr: '' },
27
- Minus: { vkey: 'VK_OEM_MINUS', value: '-', withShift: '_', withAltGr: '', withShiftAltGr: '' },
28
- Equal: { vkey: 'VK_OEM_PLUS', value: '=', withShift: '+', withAltGr: '', withShiftAltGr: '' },
29
- BracketLeft: { vkey: 'VK_OEM_4', value: '[', withShift: '{', withAltGr: '', withShiftAltGr: '' },
30
- BracketRight: { vkey: 'VK_OEM_6', value: ']', withShift: '}', withAltGr: '', withShiftAltGr: '' },
31
- Backslash: { vkey: 'VK_OEM_5', value: '\\', withShift: '|', withAltGr: '', withShiftAltGr: '' },
32
- Semicolon: { vkey: 'VK_OEM_1', value: ';', withShift: ':', withAltGr: '', withShiftAltGr: '' },
33
- Quote: { vkey: 'VK_OEM_7', value: '\'', withShift: '"', withAltGr: '', withShiftAltGr: '' },
34
- Backquote: { vkey: 'VK_OEM_3', value: '`', withShift: '~', withAltGr: '', withShiftAltGr: '' },
35
- Comma: { vkey: 'VK_OEM_COMMA', value: ',', withShift: '<', withAltGr: '', withShiftAltGr: '' },
36
- Period: { vkey: 'VK_OEM_PERIOD', value: '.', withShift: '>', withAltGr: '', withShiftAltGr: '' },
37
- Slash: { vkey: 'VK_OEM_2', value: '/', withShift: '?', withAltGr: '', withShiftAltGr: '' },
38
- ...
39
- ]
40
- ```
41
-
42
- Example output when using German (Swiss) keyboard layout (on Windows):
43
- ```
44
- [
45
- ...
46
- Space: { vkey: 'VK_SPACE', value: ' ', withShift: ' ', withAltGr: '', withShiftAltGr: '' },
47
- Minus: { vkey: 'VK_OEM_4', value: '\'', withShift: '?', withAltGr: '´', withShiftAltGr: '' },
48
- Equal: { vkey: 'VK_OEM_6', value: '^', withShift: '`', withAltGr: '~', withShiftAltGr: '' },
49
- BracketLeft: { vkey: 'VK_OEM_1', value: 'ü', withShift: 'è', withAltGr: '[', withShiftAltGr: '' },
50
- BracketRight: { vkey: 'VK_OEM_3', value: '¨', withShift: '!', withAltGr: ']', withShiftAltGr: '' },
51
- Backslash: { vkey: 'VK_OEM_8', value: '$', withShift: '£', withAltGr: '}', withShiftAltGr: '' },
52
- Semicolon: { vkey: 'VK_OEM_7', value: 'ö', withShift: 'é', withAltGr: '', withShiftAltGr: '' },
53
- Quote: { vkey: 'VK_OEM_5', value: 'ä', withShift: 'à', withAltGr: '{', withShiftAltGr: '' },
54
- Backquote: { vkey: 'VK_OEM_2', value: '§', withShift: '°', withAltGr: '', withShiftAltGr: '' },
55
- Comma: { vkey: 'VK_OEM_COMMA', value: ',', withShift: ';', withAltGr: '', withShiftAltGr: '' },
56
- Period: { vkey: 'VK_OEM_PERIOD', value: '.', withShift: ':', withAltGr: '', withShiftAltGr: '' },
57
- Slash: { vkey: 'VK_OEM_MINUS', value: '-', withShift: '_', withAltGr: '', withShiftAltGr: '' },
58
- ...
59
- ]
60
- ```
61
-
62
- ## Supported OSes
63
-
64
- - linux (X11)
65
- - windows
66
- - mac
67
- - freebsd
68
-
69
- ## Known issues
70
-
71
- - only tested from the Electron Main process
72
-
73
- ## Developing
74
-
75
- - `npm install -g node-gyp`
76
- - `node-gyp configure` (for debugging use `node-gyp configure -d`)
77
- - `node-gyp build`
78
- - `npm test` (for debugging change `index.js` to load the node module from the `Debug` folder and press `F5`)
79
-
80
- ## License
18
+ ## <a id="license"></a>License
81
19
 
82
20
  [MIT](https://github.com/VSCodium/native-keymap/blob/master/LICENSE)
package/binding.gyp CHANGED
@@ -7,7 +7,7 @@
7
7
  "src/keymapping.cc"
8
8
  ],
9
9
  'cflags': [
10
- '-O2', '-D_FORTIFY_SOURCE=2'
10
+ '-O2', '-fstack-protector-strong'
11
11
  ],
12
12
  'msvs_configuration_attributes': {
13
13
  'SpectreMitigation': 'Spectre'
@@ -18,8 +18,9 @@
18
18
  '/guard:cf',
19
19
  '/sdl',
20
20
  '/W3',
21
- '/w34244',
22
- '/w34267',
21
+ '/we4146',
22
+ '/we4244',
23
+ '/we4267',
23
24
  '/ZH:SHA_256'
24
25
  ]
25
26
  },
package/checksum.txt CHANGED
@@ -1,22 +1,22 @@
1
- fefb5f22b365fb31a684b88d52a006ece40cb9187112f8311373e60a8acee683 native-keymap-3.3.7-258423-darwin-arm64.tar.gz
2
- ff8ba051903e8ebbcf87dc370d3566ba7b048c51b051c545a6c4151aba7bd2ef native-keymap-3.3.7-258423-darwin-x64.tar.gz
3
- 9956527fe4c14fe4a2d1ff0e67503d6585918372dd81aaafab4fd7a6c4d7354b native-keymap-3.3.7-258423-linux-arm64.tar.gz
4
- edb962b5111848917a8b00b1aa8d3a69e2a74cb1a49b2d5639d0531e0a71fa89 native-keymap-3.3.7-258423-linux-armhf.tar.gz
5
- f7f21c5e48f5bf0a8e9dd87e1fac7fde2b45b9578b6ed8305a52430de568843c native-keymap-3.3.7-258423-linux-loong64.tar.gz
6
- f93f2e8c11250f58167b699e37289fff90d5122f8f1232e23403e83a533245ae native-keymap-3.3.7-258423-linux-ppc64le.tar.gz
7
- 8e186aefe8155868c5c34fe664892b09d16a996bef02541a47a0c60f4b08f566 native-keymap-3.3.7-258423-linux-riscv64.tar.gz
8
- f9f22a0e64fb2e317cab7ed36ffd17a88b53e64372f88a1e752fbfe8d5407637 native-keymap-3.3.7-258423-linux-s390x.tar.gz
9
- d9fba94176ca7b5d25e282e457548abc24050891618f159bc37fa11bbe454e03 native-keymap-3.3.7-258423-linux-x64.tar.gz
10
- bb245def8e5eff5ef069b72d766c3cd3cfcc4d7a7721e53b21a3ddd990b2f7d2 *native-keymap-3.3.7-258423-win32-arm64.tar.gz
11
- 6c0632c10bda1b6af0f810de14e007596eb53069f4a605477a6caf4dd2b00dae *native-keymap-3.3.7-258423-win32-x64.tar.gz
12
- fefb5f22b365fb31a684b88d52a006ece40cb9187112f8311373e60a8acee683 native-keymap-3.3.7-258423-darwin-arm64.tar.gz
13
- ff8ba051903e8ebbcf87dc370d3566ba7b048c51b051c545a6c4151aba7bd2ef native-keymap-3.3.7-258423-darwin-x64.tar.gz
14
- 9956527fe4c14fe4a2d1ff0e67503d6585918372dd81aaafab4fd7a6c4d7354b native-keymap-3.3.7-258423-linux-arm64.tar.gz
15
- edb962b5111848917a8b00b1aa8d3a69e2a74cb1a49b2d5639d0531e0a71fa89 native-keymap-3.3.7-258423-linux-armhf.tar.gz
16
- f7f21c5e48f5bf0a8e9dd87e1fac7fde2b45b9578b6ed8305a52430de568843c native-keymap-3.3.7-258423-linux-loong64.tar.gz
17
- f93f2e8c11250f58167b699e37289fff90d5122f8f1232e23403e83a533245ae native-keymap-3.3.7-258423-linux-ppc64le.tar.gz
18
- 8e186aefe8155868c5c34fe664892b09d16a996bef02541a47a0c60f4b08f566 native-keymap-3.3.7-258423-linux-riscv64.tar.gz
19
- f9f22a0e64fb2e317cab7ed36ffd17a88b53e64372f88a1e752fbfe8d5407637 native-keymap-3.3.7-258423-linux-s390x.tar.gz
20
- d9fba94176ca7b5d25e282e457548abc24050891618f159bc37fa11bbe454e03 native-keymap-3.3.7-258423-linux-x64.tar.gz
21
- bb245def8e5eff5ef069b72d766c3cd3cfcc4d7a7721e53b21a3ddd990b2f7d2 *native-keymap-3.3.7-258423-win32-arm64.tar.gz
22
- 6c0632c10bda1b6af0f810de14e007596eb53069f4a605477a6caf4dd2b00dae *native-keymap-3.3.7-258423-win32-x64.tar.gz
1
+ a54aed1ff10d7a295316a541f98e6215dc666dd688f5dd3495b5da187881abc5 native-keymap-3.3.9-260952-darwin-arm64.tar.gz
2
+ 27ee94e3e1e88392e8246e5524e02c658860d0d64014f2c2140a3222ded234e6 native-keymap-3.3.9-260952-darwin-x64.tar.gz
3
+ 8d9e5276c82388deb7a715e027ceac398591ed8e4a40213fe17b33fd1f7e8283 native-keymap-3.3.9-260952-linux-arm64.tar.gz
4
+ 66326aef37a829bf6d4048fbef9993a588018a63d850d30ce7f10086d598fabc native-keymap-3.3.9-260952-linux-armhf.tar.gz
5
+ 5662c84a845de403dd292a742d1b1de0f1da4e93069c80cb5035401c93b0f66b native-keymap-3.3.9-260952-linux-loong64.tar.gz
6
+ e2c0399418c14e09b296b30de397abab7986f39dd9e014d2354933ba04243418 native-keymap-3.3.9-260952-linux-ppc64le.tar.gz
7
+ 3d7b9ea9b56acfb604bec95a45c4c8778be8fbf8e37d00cc71cee3919d89a615 native-keymap-3.3.9-260952-linux-riscv64.tar.gz
8
+ d90c2e4561324306db5d2eba183687a990840a24682486584f22c0d17515c188 native-keymap-3.3.9-260952-linux-s390x.tar.gz
9
+ 3b79f4838a0a7bc070a9778c940afee02103c18a71a769e47a0e30c0d87a7f8e native-keymap-3.3.9-260952-linux-x64.tar.gz
10
+ 8d626c6f371020a269fa059b5bbef3b8e8adc4b26892997df657082939f1385c *native-keymap-3.3.9-260952-win32-arm64.tar.gz
11
+ a62d1b5708a48a9f48b851456dadfee7689538097cece30d63e1334166e39965 *native-keymap-3.3.9-260952-win32-x64.tar.gz
12
+ a54aed1ff10d7a295316a541f98e6215dc666dd688f5dd3495b5da187881abc5 native-keymap-3.3.9-260952-darwin-arm64.tar.gz
13
+ 27ee94e3e1e88392e8246e5524e02c658860d0d64014f2c2140a3222ded234e6 native-keymap-3.3.9-260952-darwin-x64.tar.gz
14
+ 8d9e5276c82388deb7a715e027ceac398591ed8e4a40213fe17b33fd1f7e8283 native-keymap-3.3.9-260952-linux-arm64.tar.gz
15
+ 66326aef37a829bf6d4048fbef9993a588018a63d850d30ce7f10086d598fabc native-keymap-3.3.9-260952-linux-armhf.tar.gz
16
+ 5662c84a845de403dd292a742d1b1de0f1da4e93069c80cb5035401c93b0f66b native-keymap-3.3.9-260952-linux-loong64.tar.gz
17
+ e2c0399418c14e09b296b30de397abab7986f39dd9e014d2354933ba04243418 native-keymap-3.3.9-260952-linux-ppc64le.tar.gz
18
+ 3d7b9ea9b56acfb604bec95a45c4c8778be8fbf8e37d00cc71cee3919d89a615 native-keymap-3.3.9-260952-linux-riscv64.tar.gz
19
+ d90c2e4561324306db5d2eba183687a990840a24682486584f22c0d17515c188 native-keymap-3.3.9-260952-linux-s390x.tar.gz
20
+ 3b79f4838a0a7bc070a9778c940afee02103c18a71a769e47a0e30c0d87a7f8e native-keymap-3.3.9-260952-linux-x64.tar.gz
21
+ 8d626c6f371020a269fa059b5bbef3b8e8adc4b26892997df657082939f1385c *native-keymap-3.3.9-260952-win32-arm64.tar.gz
22
+ a62d1b5708a48a9f48b851456dadfee7689538097cece30d63e1334166e39965 *native-keymap-3.3.9-260952-win32-x64.tar.gz
package/install.js CHANGED
@@ -10,8 +10,7 @@ const os = require('node:os');
10
10
  const path = require('node:path');
11
11
  const { pipeline } = require('node:stream');
12
12
  const { promisify } = require('node:util');
13
- const tar = require('tar');
14
- const { spawnSync } = require('node:child_process');
13
+ const { spawn, spawnSync } = require('node:child_process');
15
14
 
16
15
  const pipelineAsync = promisify(pipeline);
17
16
  const PACKAGE_ROOT = path.resolve(__dirname);
@@ -137,7 +136,7 @@ async function downloadPrebuilt(platform, arch) {
137
136
  const checksumRaw = await loadChecksumManifest();
138
137
  const expectedHash = parseChecksum(checksumRaw, assetName);
139
138
  await verifySha256(archivePath, expectedHash);
140
- await tar.x({ file: archivePath, cwd: tmpDir });
139
+ await extractWithSystemTar(archivePath, tmpDir);
141
140
  const binaryPath = path.join(tmpDir, 'keymapping.node');
142
141
  await fsp.access(binaryPath, fs.constants.R_OK);
143
142
 
@@ -157,14 +156,8 @@ async function downloadFile(url, destination) {
157
156
  }
158
157
 
159
158
  async function loadChecksumManifest() {
160
- try {
161
- const content = await fsp.readFile(LOCAL_CHECKSUM_PATH, 'utf8');
162
- return content;
163
- } catch (error) {
164
- if (error.code && error.code !== 'ENOENT') {
165
- throw error;
166
- }
167
- }
159
+ const content = await fsp.readFile(LOCAL_CHECKSUM_PATH, 'utf8');
160
+ return content;
168
161
  }
169
162
 
170
163
  function httpGet(url, redirects = 0) {
@@ -244,6 +237,21 @@ async function verifySha256(filePath, expectedHash) {
244
237
  }
245
238
  }
246
239
 
240
+ async function extractWithSystemTar(archivePath, destinationDir) {
241
+ await new Promise((resolve, reject) => {
242
+ const args = ['-xzf', archivePath, '-C', destinationDir];
243
+ const child = spawn('tar', args, { stdio: 'inherit' });
244
+ child.on('error', reject);
245
+ child.on('close', (code) => {
246
+ if (code !== 0) {
247
+ reject(new Error(`tar exited with code ${code}`));
248
+ return;
249
+ }
250
+ resolve();
251
+ });
252
+ });
253
+ }
254
+
247
255
  async function cleanup(dirPath) {
248
256
  if (!dirPath) {
249
257
  return;
package/package.json CHANGED
@@ -1,17 +1,21 @@
1
1
  {
2
2
  "name": "@vscodium/native-keymap",
3
- "version": "3.3.7-258423",
3
+ "version": "3.3.9-260952",
4
4
  "description": "Get OS key mapping",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
7
7
  "scripts": {
8
+ "ci:lint": "zizmor .",
9
+ "ci:lint:fix": "zizmor . --fix=all",
10
+ "ci:update": "pinact run -min-age 7 -update",
8
11
  "install": "node install.js",
9
12
  "release": "release-it --no-increment",
10
13
  "test": "node test/test.js"
11
14
  },
15
+ "homepage": "https://github.com/VSCodium/native-keymap",
12
16
  "repository": {
13
17
  "type": "git",
14
- "url": "git+https://github.com/vscodium/native-keymap.git"
18
+ "url": "git+https://github.com/VSCodium/native-keymap.git"
15
19
  },
16
20
  "author": "Microsoft Corporation",
17
21
  "license": "MIT",
@@ -22,8 +26,5 @@
22
26
  "branches": [
23
27
  "main"
24
28
  ]
25
- },
26
- "dependencies": {
27
- "tar": "^7.5.2"
28
29
  }
29
30
  }