This package is used to help generate a unique random UUID as a deviceId.
Getting Started
Clone the repository.
Run npm install.
Start developing.
Build and Test
Run npm run compile.
Run npm test and npm run lint.
Windows native package
Published packages include Node-API 8 prebuilds for Windows x64 and arm64.
Installation uses the matching prebuild without downloading a binary or requiring
Python, Visual Studio, or Spectre-mitigated libraries. The prebuild also works when
npm install scripts are disabled. Non-Windows installations skip native tooling.
An unsupported Windows architecture, or a prebuild that cannot load, falls back
to node-gyp rebuild. A source build still needs Python and Visual Studio C++
tools with the target architecture's Spectre-mitigated libraries. Set
npm_config_build_from_source=true to request a source build explicitly.
Bundlers must preserve the package's prebuilds directory alongside its code.
To prepare a release on Windows with both C++ toolchains installed:
npm ci --ignore-scriptsnpm run prebuild:windows -- --arch=x64npm run prebuild:windows -- --arch=arm64npm testnpm run lintnpm packnpm run test:package
npm pack compiles the JavaScript and requires both prebuilds. The package check
installs the tarball with build tooling blocked, then with install scripts
disabled, and loads the native exports without modifying the device ID.
CI preserves each binary and its matching PDB before building the next
architecture and retains both pairs under symbols in the build drop.
PDBs are not source-indexed or included in the npm package. Release archives the
PDBs to Symweb/MSDL under project DDE, feature VSCodeDeviceId; the release
pipeline needs BARSD approval for the VSEng-SymbolsUpload service connection.
The current MicroBuild archive task filters out .node binaries, so the exact
binaries remain in the build drop rather than the long-term symbol archive.
Symbols for consumer source builds must be generated by that consumer.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.