fix-keymap.patch 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. diff --git a/.npmrc b/.npmrc
  2. index e4a5cc2..71db628 100644
  3. --- a/.npmrc
  4. +++ b/.npmrc
  5. @@ -5,2 +5,3 @@ runtime="electron"
  6. build_from_source="true"
  7. +build_from_source_native_keymap="no"
  8. legacy-peer-deps="true"
  9. diff --git a/build/.moduleignore b/build/.moduleignore
  10. index 0459b46..cd99c71 100644
  11. --- a/build/.moduleignore
  12. +++ b/build/.moduleignore
  13. @@ -65,7 +65,7 @@ fsevents/test/**
  14. -native-keymap/binding.gyp
  15. -native-keymap/build/**
  16. -native-keymap/src/**
  17. -native-keymap/deps/**
  18. -!native-keymap/build/Release/*.node
  19. +@vscodium/native-keymap/binding.gyp
  20. +@vscodium/native-keymap/build/**
  21. +@vscodium/native-keymap/src/**
  22. +@vscodium/native-keymap/deps/**
  23. +!@vscodium/native-keymap/build/Release/*.node
  24. diff --git a/eslint.config.js b/eslint.config.js
  25. index 8fda673..967ae23 100644
  26. --- a/eslint.config.js
  27. +++ b/eslint.config.js
  28. @@ -1475,3 +1475,3 @@ export default tseslint.config(
  29. 'node:module',
  30. - 'native-keymap',
  31. + '@vscodium/native-keymap',
  32. 'native-watchdog',
  33. diff --git a/package-lock.json b/package-lock.json
  34. index 2b1154b..834f597 100644
  35. --- a/package-lock.json
  36. +++ b/package-lock.json
  37. @@ -29,2 +29,3 @@
  38. "@vscode/windows-registry": "^1.1.0",
  39. + "@vscodium/native-keymap": "3.3.7-258424",
  40. "@xterm/addon-clipboard": "^0.2.0-beta.119",
  41. @@ -46,3 +47,2 @@
  42. "native-is-elevated": "0.8.0",
  43. - "native-keymap": "^3.3.5",
  44. "native-watchdog": "^1.4.1",
  45. @@ -3300,2 +3300,9 @@
  46. },
  47. + "node_modules/@vscodium/native-keymap": {
  48. + "version": "3.3.7-258424",
  49. + "resolved": "https://registry.npmjs.org/@vscodium/native-keymap/-/native-keymap-3.3.7-258424.tgz",
  50. + "integrity": "sha512-HZ20QfExV0kE2l939yE3wn0LezSV7BcpxOFmlUMUHBQbdANMSLkwzo6Zw1xOEZDoYm3VTDHt8/+WwLBR2MpA3A==",
  51. + "hasInstallScript": true,
  52. + "license": "MIT"
  53. + },
  54. "node_modules/@webassemblyjs/ast": {
  55. @@ -12662,5 +12669,6 @@
  56. "node_modules/napi-build-utils": {
  57. - "version": "1.0.2",
  58. - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
  59. - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
  60. + "version": "2.0.0",
  61. + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz",
  62. + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==",
  63. + "license": "MIT"
  64. },
  65. @@ -12673,9 +12681,2 @@
  66. },
  67. - "node_modules/native-keymap": {
  68. - "version": "3.3.7",
  69. - "resolved": "https://registry.npmjs.org/native-keymap/-/native-keymap-3.3.7.tgz",
  70. - "integrity": "sha512-07n5kF0L9ERC9pilqEFucnhs1XG4WttbHAMWhhOSqQYXhB8mMNTSCzP4psTaVgDSp6si2HbIPhTIHuxSia6NPQ==",
  71. - "hasInstallScript": true,
  72. - "license": "MIT"
  73. - },
  74. "node_modules/native-watchdog": {
  75. @@ -14180,5 +14181,6 @@
  76. "node_modules/prebuild-install": {
  77. - "version": "7.1.2",
  78. - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.2.tgz",
  79. - "integrity": "sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==",
  80. + "version": "7.1.3",
  81. + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz",
  82. + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==",
  83. + "license": "MIT",
  84. "dependencies": {
  85. @@ -14189,3 +14191,3 @@
  86. "mkdirp-classic": "^0.5.3",
  87. - "napi-build-utils": "^1.0.1",
  88. + "napi-build-utils": "^2.0.0",
  89. "node-abi": "^3.3.0",
  90. diff --git a/package.json b/package.json
  91. index 9ef8381..a3f77c0 100644
  92. --- a/package.json
  93. +++ b/package.json
  94. @@ -108,3 +108,3 @@
  95. "native-is-elevated": "0.8.0",
  96. - "native-keymap": "^3.3.5",
  97. + "@vscodium/native-keymap": "3.3.7-258424",
  98. "native-watchdog": "^1.4.1",
  99. diff --git a/src/vs/platform/environment/test/node/nativeModules.integrationTest.ts b/src/vs/platform/environment/test/node/nativeModules.integrationTest.ts
  100. index 5099915..aa1b0b8 100644
  101. --- a/src/vs/platform/environment/test/node/nativeModules.integrationTest.ts
  102. +++ b/src/vs/platform/environment/test/node/nativeModules.integrationTest.ts
  103. @@ -44,8 +44,8 @@ flakySuite('Native Modules (all platforms)', () => {
  104. test('native-keymap', async () => {
  105. - const keyMap = await import('native-keymap');
  106. - assert.ok(typeof keyMap.onDidChangeKeyboardLayout === 'function', testErrorMessage('native-keymap'));
  107. - assert.ok(typeof keyMap.getCurrentKeyboardLayout === 'function', testErrorMessage('native-keymap'));
  108. + const keyMap = await import('@vscodium/native-keymap');
  109. + assert.ok(typeof keyMap.onDidChangeKeyboardLayout === 'function', testErrorMessage('@vscodium/native-keymap'));
  110. + assert.ok(typeof keyMap.getCurrentKeyboardLayout === 'function', testErrorMessage('@vscodium/native-keymap'));
  111. const result = keyMap.getCurrentKeyboardLayout();
  112. - assert.ok(result, testErrorMessage('native-keymap'));
  113. + assert.ok(result, testErrorMessage('@vscodium/native-keymap'));
  114. });
  115. diff --git a/src/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.ts b/src/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.ts
  116. index 8950ce2..f31cea6 100644
  117. --- a/src/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.ts
  118. +++ b/src/vs/platform/keyboardLayout/electron-main/keyboardLayoutMainService.ts
  119. @@ -5,3 +5,3 @@
  120. -import type * as nativeKeymap from 'native-keymap';
  121. +import type * as nativeKeymap from '@vscodium/native-keymap';
  122. import * as platform from '../../../base/common/platform.js';
  123. @@ -48,3 +48,3 @@ export class KeyboardLayoutMainService extends Disposable implements INativeKeyb
  124. private async _doInitialize(): Promise<void> {
  125. - const nativeKeymapMod = await import('native-keymap');
  126. + const nativeKeymapMod = await import('@vscodium/native-keymap');