Giter Site home page Giter Site logo

desktop / registry-js Goto Github PK

View Code? Open in Web Editor NEW
152.0 152.0 47.0 4.79 MB

A simple and opinionated library for working with the Windows registry

License: MIT License

TypeScript 39.27% Python 3.30% C++ 51.21% JavaScript 1.15% PowerShell 5.08%
nodejs registry typescript windows

registry-js's Introduction

GitHub Desktop is an open-source Electron-based GitHub app. It is written in TypeScript and uses React.

A screenshot of the GitHub Desktop application showing changes being viewed and committed with two attributed co-authors

Where can I get it?

Download the official installer for your operating system:

Linux is not officially supported; however, you can find installers created for Linux from a fork of GitHub Desktop in the Community Releases section.

Beta Channel

Want to test out new features and get fixes before everyone else? Install the beta channel to get access to early builds of Desktop:

The release notes for the latest beta versions are available here.

Community Releases

There are several community-supported package managers that can be used to install GitHub Desktop:

  • Windows users can install using winget c:\> winget install github-desktop or Chocolatey c:\> choco install github-desktop
  • macOS users can install using Homebrew package manager: $ brew install --cask github

Installers for various Linux distributions can be found on the shiftkey/desktop fork.

Is GitHub Desktop right for me? What are the primary areas of focus?

This document describes the focus of GitHub Desktop and who the product is most useful for.

I have a problem with GitHub Desktop

Note: The GitHub Desktop Code of Conduct applies in all interactions relating to the GitHub Desktop project.

First, please search the open issues and closed issues to see if your issue hasn't already been reported (it may also be fixed).

There is also a list of known issues that are being tracked against Desktop, and some of these issues have workarounds.

If you can't find an issue that matches what you're seeing, open a new issue, choose the right template and provide us with enough information to investigate further.

The issue I reported isn't fixed yet. What can I do?

If nobody has responded to your issue in a few days, you're welcome to respond to it with a friendly ping in the issue. Please do not respond more than a second time if nobody has responded. The GitHub Desktop maintainers are constrained in time and resources, and diagnosing individual configurations can be difficult and time consuming. While we'll try to at least get you pointed in the right direction, we can't guarantee we'll be able to dig too deeply into any one person's issue.

How can I contribute to GitHub Desktop?

The CONTRIBUTING.md document will help you get setup and familiar with the source. The documentation folder also contains more resources relevant to the project.

If you're looking for something to work on, check out the help wanted label.

Building Desktop

To setup your development environment for building Desktop, check out: setup.md.

More Resources

See desktop.github.com for more product-oriented information about GitHub Desktop.

See our getting started documentation for more information on how to set up, authenticate, and configure GitHub Desktop.

License

MIT

The MIT license grant is not for GitHub's trademarks, which include the logo designs. GitHub reserves all trademark and copyright rights in and to all GitHub trademarks. GitHub's logos include, for instance, the stylized Invertocat designs that include "logo" in the file title in the following folder: logos.

GitHub® and its stylized versions and the Invertocat mark are GitHub's Trademarks or registered Trademarks. When using GitHub's logos, be sure to follow the GitHub logo guidelines.

registry-js's People

Contributors

danilaml avatar dennisameling avatar dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar espresso3389 avatar mylesborins avatar niik avatar ottosson avatar pimterry avatar porges avatar rcorredera avatar rcorrederalsi avatar sergiou87 avatar shiftkey avatar subash avatar tidy-dev avatar vhashimotoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

registry-js's Issues

LTS policy

Hi :) I noticed that [email protected] dropped prebuilds for node 8 (dbceb16). Node 8 isn't EOL yet, so I'm wondering what your policy is regarding node versions and/or prebuilds, if any?

Could not detect abi for version 6.0.0 and runtime electron

Hi

I just updated my electron project from 5 to 6 and get the following error when running npm install:

> node postinstall

  • electron-builder  version=21.2.0
  • loaded configuration  file=C:\project\electron-builder.json
  • rebuilding native dependencies  [email protected] platform=win32 arch=x64
  • install prebuilt binary  name=registry-js version=1.8.0 platform=win32 arch=x64
  • build native dependency from sources  name=registry-js
                                          version=1.8.0
                                          platform=win32
                                          arch=x64
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=C:\project\node_modules\node-abi\index.js:30
      throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '.  Updating "node-abi" might help solve this issue if it is a new release of ' + runtime)
      ^

    Error: Could not detect abi for version 6.0.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
...

I have removed my node_modules folder and updated to the latest version of registry-js (1.8.0) but still get the error. Not sure if I have missed something else... Any suggestion?

Address double-cast in ReadValues

..\src\main.cc(161): warning C4244: 'initializing': conversion from 'double' to 'ULONG', possible loss of data [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
..\src\main.cc(166): warning C4312: 'type cast': conversion from 'ULONG' to 'HKEY' of greater size [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
     Creating library C:\projects\lean-mean-registry-client\build\Release\registry.lib and object C:\projects\lean-mean-registry-client\build\Release\registry.exp

This was some lazy code to get this up and running sooner - we can do better.

From the JS side, I've got a lookup that converts the string enum to the long specified in MSDN:

function mapToLong(key: HKEY): number {
if (key === HKEY.HKEY_CLASSES_ROOT) return 0x80000000
if (key === HKEY.HKEY_CURRENT_USER) return 0x80000001
if (key === HKEY.HKEY_LOCAL_MACHINE) return 0x80000002
if (key === HKEY.HKEY_USERS) return 0x80000003
if (key === HKEY.HKEY_PERFORMANCE_DATA) return 0x80000004
if (key === HKEY.HKEY_CURRENT_CONFIG) return 0x80000005
if (key === HKEY.HKEY_DYN_DATA) return 0x80000006
if (key === HKEY.HKEY_CURRENT_USER_LOCAL_SETTINGS) return 0x80000007
if (key === HKEY.HKEY_PERFORMANCE_TEXT) return 0x80000050
if (key === HKEY.HKEY_PERFORMANCE_NLSTEXT) return 0x80000060
return assertNever(key, 'The key does not map to an expected number value')
}

Then, in the C++ side, we need to cast this to a HKEY to use it with RegOpenKeyEx:

registry-js/src/main.cc

Lines 152 to 161 in 7b0da43

ULONG first = info[0]->NumberValue();
auto second = *v8::String::Utf8Value(info[1]);
HKEY hCurrentKey;
LONG openKey = RegOpenKeyEx(
(HKEY)first,
second,
0,
KEY_READ | KEY_WOW64_64KEY,
&hCurrentKey);

These look like this in winreg.h:

#define HKEY_CLASSES_ROOT                   (( HKEY ) (ULONG_PTR)((LONG)0x80000000) )
#define HKEY_CURRENT_USER                   (( HKEY ) (ULONG_PTR)((LONG)0x80000001) )
#define HKEY_LOCAL_MACHINE                  (( HKEY ) (ULONG_PTR)((LONG)0x80000002) )
#define HKEY_USERS                          (( HKEY ) (ULONG_PTR)((LONG)0x80000003) )
#define HKEY_PERFORMANCE_DATA               (( HKEY ) (ULONG_PTR)((LONG)0x80000004) )
#define HKEY_PERFORMANCE_TEXT               (( HKEY ) (ULONG_PTR)((LONG)0x80000050) )
#define HKEY_PERFORMANCE_NLSTEXT            (( HKEY ) (ULONG_PTR)((LONG)0x80000060) )

Just need to figure out how to marshal these properly from V8's types...

Any plans for prebuilt binaries?

It's fairly straight-forward with prebuild and greatly reduces support requests. I can help if you're interested.

And many thanks for registry-js! It's so much better than messing with reg.exe, FFI or JScript. I'm using it in win-detect-browsers now, with a 2x performance boost.

PS. Which node versions are supported? My test matrix includes 6, 8, 9 and 10 - no problems so far.

destroy a key

  • test how this works with local group policy enforced
  • documentation

build error when add registry-js

Hi,
When I add registry-js via npm install registry-js, the program build will fail. the details log is as below:

=======================================================================
C:\code\Msp_electron>npm install registry-js --python="C:\Users\zredb\miniconda3\python.exe"

[email protected] install C:\code\Msp_electron\node_modules\registry-js
prebuild-install || node-gyp rebuild

prebuild-install WARN install unexpected end of file

C:\code\Msp_electron\node_modules\registry-js>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (node "C:\Program Files\nodejs\node_
modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
在此解决方案中一次生成一个项目。若要启用并行生成,请添加“-m”开关。
main.cc
win_delay_load_hook.cc
正在创建库 C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.lib 和对象 C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.exp
registry.vcxproj -> C:\code\Msp_electron\node_modules\registry-js\build\Release\registry.node
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

  • [email protected]
    added 34 packages from 25 contributors, removed 2 packages and audited 1666 packages in 25.114s
    found 1 low severity vulnerability
    run npm audit fix to fix them, or npm audit for details

C:\code\Msp_electron>yarn serve
yarn run v1.21.1
$ vue-cli-service electron:serve
INFO Starting development server...
98% after emitting CopyPlugin

DONE Compiled successfully in 28118ms 9:11:15

App running at:

Note that the development build is not optimized.
To create a production build, run yarn build.

\ Bundling main process...

ERROR Failed to compile with 1 errors 9:11:18

error in ./node_modules/registry-js/build/Release/registry.node

Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
(Source code omitted for this binary file)

@ ./node_modules/registry-js/dist/lib/registry.js 5:6-50
@ ./node_modules/registry-js/dist/lib/index.js
@ ./src/background.js
@ multi ./src/background.js

ERROR Build failed with errors.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

C:\code\Msp_electron>

Any one can give some suggestion?

create a key

  • test how this works with local group policy enforced
  • documentation

src directory not included in package

Looks like you recently added src directory to the .npmignore file. The package installs just fine if there is a prebuilt binary available for the system but fails if there is no prebuilt binary available. It's also not possible to rebuild the binary with node-gyp rebuild anymore because the package no longer includes the src directory to build from.

Undefined elements returned from enumerateValues

https://github.com/desktop/registry-js/blob/master/src/main.cc#L109
This line allocates an array of fixed size, which is then populated with values on these lines:
https://github.com/desktop/registry-js/blob/master/src/main.cc#L133:L149

Only REG_SZ, REG_EXPAND_SZ and REG_DWORD is supported.

If an unsupported value is enumerated, this produces an array in typescript that could end up looking like this:

[{ ... REG_DWORD value }, undefined, { ...REG_SZ value }]

The typings does not reflect that undefined is a possibility. Either the typings should change, or the array returned from the EnumerateValues function should not return empty values.

Editing the Registry

Hello,

Does this package allow for mutating/editing values/keys in the registry? Looking through the documentation, it does not seem so.

Thanks.

Missing registry-js-v1.12.0-electron-v82-win32-x64.tar.gz?

When I build my electron application I get the following output, where it says it's unable to download registry-js-v1.12.0-electron-v82-win32-x64.tar.gz.

I don't know if it's because it can access cached builds but I don't notice any problems running my application after it has been built.

Where does it get that url?

• electron-builder  version=22.8.1 os=10.0.19041
• loaded configuration  file=C:\dev\electron-app\electron-builder.json
• writing effective config  file=release\builder-effective-config.yaml
• rebuilding native dependencies  [email protected] platform=win32 arch=x64
• install prebuilt binary  name=registry-js version=1.12.0 platform=win32 arch=x64
• build native dependency from sources  name=registry-js
                                        version=1.12.0
                                        platform=win32
                                        arch=x64
                                        reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                        error=prebuild-install info begin Prebuild-install version 5.3.5
    prebuild-install WARN install prebuilt binaries enforced with --force!
    prebuild-install WARN install prebuilt binaries may be out of date!
    prebuild-install info looking for cached prebuild @ C:\Users\me\AppData\Roaming\npm-cache\_prebuilds\52c192-registry-js-v1.12.0-electron-v82-win32-x64.tar.gz
    prebuild-install http request GET https://github.com/desktop/registry-js/releases/download/v1.12.0/registry-js-v1.12.0-electron-v82-win32-x64.tar.gz
    prebuild-install http 404 https://github.com/desktop/registry-js/releases/download/v1.12.0/registry-js-v1.12.0-electron-v82-win32-x64.tar.gz
    prebuild-install WARN install No prebuilt binaries found (target=10.1.3 runtime=electron arch=x64 libc= platform=win32)

Running install script, failed in 1.4s ... WARN install No prebuilt binaries found

Packages are copied from the content-addressable store to the virtual store.
  Content-addressable store is at: /home/snowy/.local/share/pnpm/store/v3
  Virtual store is at:             node_modules/.pnpm
Progress: resolved 1452, reused 1450, downloaded 0, added 1452, done
node_modules/.pnpm/@[email protected]/node_modules/@bitdisaster/exe-icon-extractor: Running install script, failed in 792ms (skipped as optional)
node_modules/.pnpm/[email protected]/node_modules/registry-js: Running install script, failed in 1.4s
.../node_modules/registry-js install$ prebuild-install || node-gyp rebuild
│ prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=x64 libc= platform=linux)
│ gyp info it worked if it ends with ok
│ gyp info using [email protected]
│ gyp info using [email protected] | linux | x64
│ gyp info find Python using Python version 3.10.6 found at "/usr/bin/python3"
│ gyp info spawn /usr/bin/python3
│ gyp info spawn args [
│ gyp info spawn args   '/home/snowy/.nvm/versions/node/v18.15.0/lib/node_modules/pnpm/dist/node_modules/node-gyp/gyp/gyp_main.py',
│ gyp info spawn args   'binding.gyp',
│ gyp info spawn args   '-f',
│ gyp info spawn args   'make',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js/build/config.gypi',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/snowy/.nvm/versions/node/v18.15.0/lib/node_modules/pnpm/dist/node_modules/node-gyp/addon.gypi',
│ gyp info spawn args   '-I',
│ gyp info spawn args   '/home/snowy/.cache/node-gyp/18.15.0/include/node/common.gypi',
│ gyp info spawn args   '-Dlibrary=shared_library',
│ gyp info spawn args   '-Dvisibility=default',
│ gyp info spawn args   '-Dnode_root_dir=/home/snowy/.cache/node-gyp/18.15.0',
│ gyp info spawn args   '-Dnode_gyp_dir=/home/snowy/.nvm/versions/node/v18.15.0/lib/node_modules/pnpm/dist/node_modules/node-gyp',
│ gyp info spawn args   '-Dnode_lib_file=/home/snowy/.cache/node-gyp/18.15.0/<(target_arch)/node.lib',
│ gyp info spawn args   '-Dmodule_root_dir=/home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js',
│ gyp info spawn args   '-Dnode_engine=v8',
│ gyp info spawn args   '--depth=.',
│ gyp info spawn args   '--no-parallel',
│ gyp info spawn args   '--generator-output',
│ gyp info spawn args   'build',
│ gyp info spawn args   '-Goutput_dir=.'
│ gyp info spawn args ]
│ gyp info spawn make
│ gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
│ make: 进入目录“/home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js/build”
│   SOLINK_MODULE(target) Release/obj.target/registry.node
│ make: g++: 没有那个文件或目录
│ make: *** [registry.target.mk:22:Release/obj.target/registry.node] 错误 127
│ make: 离开目录“/home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js/build”
│ gyp ERR! build error 
│ gyp ERR! stack Error: `make` failed with exit code: 2
│ gyp ERR! stack     at ChildProcess.onExit (/home/snowy/.nvm/versions/node/v18.15.0/lib/node_modules/pnpm/dist/node_modules/node-gyp/lib/build.js:203:23)
│ gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
│ gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
│ gyp ERR! System Linux 5.15.0-56-generic
│ gyp ERR! command "/home/snowy/.nvm/versions/node/v18.15.0/bin/node" "/home/snowy/.nvm/versions/node/v18.15.0/lib/node_modules/pnpm/dist/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
│ gyp ERR! cwd /home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js
│ gyp ERR! node -v v18.15.0
│ gyp ERR! node-gyp -v v9.4.0
│ gyp ERR! not ok 
└─ Failed in 1.5s at /home/snowy/TidGi-Desktop/node_modules/.pnpm/[email protected]/node_modules/registry-js
 ELIFECYCLE  Command failed with exit code 1.

How to require it in node module syntax

I get syntax error if i use this syntax:
import { enumerateValues, HKEY, RegistryValueType } from 'registry-js'

How can I use the module like below?
const { enumerateValues, HKEY, RegistryValueType } = require('registry-js');

I am writing an electron application. All source codes are written in node require style, uses module.exports. Could anyone help me?

Node-Gyp failure while packing registry.js on Electron App

c:\users\lamathe\appdata\local\temp\electron-packager\win32-x64\chime-win32-x64\resources\app\node_modules\registry-js\node_modules\node-addon-api\napi-inl.h(1393): error C3861: 'napi_object_freeze': identifier not found [C:\Users\lamathe\AppData\Local\Temp\electron-packager\win32-x64\Chime-win32-x64\resources\app\node_modules\registry-js\build\registry.vcxproj]
c:\users\lamathe\appdata\local\temp\electron-packager\win32-x64\chime-win32-x64\resources\app\node_modules\registry-js\node_modules\node-addon-api\napi-inl.h(1399): error C3861: 'napi_object_seal': identifier not found [C:\Users\lamathe\AppData\Local\Temp\electron-packager\win32-x64\Chime-win32-x64\resources\app\node_modules\registry-js\build\registry.vcxproj]

An unhandled error has occurred inside Forge:
node-gyp failed to rebuild 'C:\Users\lamathe\AppData\Local\Temp\electron-packager\win32-x64\Chime-win32-x64\resources\app\node_modules\registry-js'.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1

Error: node-gyp failed to rebuild 'C:\Users\lamathe\AppData\Local\Temp\electron-packager\win32-x64\Chime-win32-x64\resources\app\node_modules\registry-js'.
Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1

at ModuleRebuilder.rebuildNodeGypModule (C:\Users\lamathe\Documents\GitHub\ChimeElectron\src\ChimeElectron\node_modules\electron-rebuild\src\module-rebuilder.ts:231:13)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at Rebuilder.rebuildModuleAt (C:\Users\lamathe\Documents\GitHub\ChimeElectron\src\ChimeElectron\node_modules\electron-rebuild\src\rebuild.ts:283:5)
at Rebuilder.rebuild (C:\Users\lamathe\Documents\GitHub\ChimeElectron\src\ChimeElectron\node_modules\electron-rebuild\src\rebuild.ts:189:9)
at C:\Users\lamathe\Documents\GitHub\ChimeElectron\src\ChimeElectron\node_modules\@electron-forge\core\src\util\rebuild.ts:33:5

Error while packaging the electron app

address deprecation warnings reported by Node 12+

Node 12 has marked some of these APIs as deprecated:

c:\projects\lean-mean-registry-client\src\main.cc(64): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\projects\lean-mean-registry-client\src\main.cc(65): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\projects\lean-mean-registry-client\src\main.cc(66): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\projects\lean-mean-registry-client\src\main.cc(76): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\projects\lean-mean-registry-client\src\main.cc(77): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'
c:\projects\lean-mean-registry-client\src\main.cc(78): warning C4996: 'v8::Object::Set': was declared deprecated [C:\projects\lean-mean-registry-client\build\registry.vcxproj]
  c:\users\appveyor\.node-gyp\12.3.1\include\node\v8.h(3358): note: see declaration of 'v8::Object::Set'

See atom/node-keytar#186 for a suggested way to migrate to the recommended API, using Nan::GetCurrentContext()

support writing tests in C++ to test internals better

From #27

Need to add a test for dodgy non-null-terminated data, but I'm not sure the best way to actually get this into the registry in the first place, since REG.EXE is going to do it correctly. Can we add adjunct C++ programs to the test code somehow?

@Porges what your preferred C++ test framework for this sort of thing?

Failed to compile

I am developing an electron application and I need to access window registry entries.

npm install --save registry-js
It installed successfully but on run time I am getting the following error:

ERROR in ./node_modules/registry-js/build/Release/registry.node 1:2
Module parse failed: Unexpected character '�' (1:2)
You may need an appropriate loader to handle this file type.
(Source code omitted for this binary file)

git:/ 1:

          This is bad.. but didn't know how to properly do the typing stuff on this. unless I did a `getBoolean`, getNumber`, `getObject`... but, didn't want to explore more because I was just trying to do quick/dirty POC right now.

Originally posted by @tidy-dev in desktop/desktop#17386 (comment)

Limit to win32

Can you use https://docs.npmjs.com/cli/v10/configuring-npm/package-json#os to limit it to only install (and gpy build) on windows?

Because it breaks mac and linux build, if use with

  "pnpm": {
    "overrides": {
      "node-abi": "latest",
      "prebuild-install": "latest"
    },

which is required to fix

Error: Could not detect abi for version 28.1.0 and runtime electron. Updating "node-abi" might help solve this issue if it is a new release of electron - Google Search

But if override node-abi to latest, I get error like #224 on mac and linux builds.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.