Socket
Socket
Sign inDemoInstall

@newrelic/native-metrics

Package Overview
Dependencies
35
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 10.0.1 to 10.1.0

build.js

8

CHANGELOG.md

@@ -0,1 +1,9 @@

### v10.1.0 (2024-03-05)
* Migrated to using prebuildify and node-gyp-install.
+ Prebuilt binaries are now shipped in the npm package.
+ Prebuilt binaries are included for Node.js 16, 18, and 20 across Windows x86/x64, Linux amd64/arm64, and macOS arm64.
+ The environment variables `NR_NATIVE_METRICS_NO_DOWNLOAD`, `NR_NATIVE_METRICS_NO_BUILD`, `NR_NATIVE_METRICS_DOWNLOAD_HOST`, and `NR_NATIVE_METRICS_REMOTE_PATH` have been removed.
* Bumped [@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse) from 7.22.5 to 7.23.2.
### v10.0.1 (2023-09-11)

@@ -2,0 +10,0 @@

3

index.js

@@ -10,4 +10,3 @@ /*

const util = require('util')
const preBuild = require('./lib/pre-build')
const natives = preBuild.load('native_metrics')
const natives = require('node-gyp-build')(__dirname)
const semver = require('semver')

@@ -14,0 +13,0 @@

{
"name": "@newrelic/native-metrics",
"version": "10.0.1",
"version": "10.1.0",
"description": "A module for generating metrics from V8.",
"main": "index.js",
"scripts": {
"build": "node ./lib/pre-build build native_metrics",
"clean": "node-gyp clean",
"rebuild": "node ./lib/pre-build rebuild native_metrics",
"upload": "node ./lib/upload native_metrics",
"build": "node ./build.js",
"lint": "eslint .",

@@ -18,4 +15,4 @@ "lint:fix": "eslint . --fix",

"test": "npm run unit && npm run integration",
"install": "node ./lib/pre-build.js install native_metrics",
"prepare": "husky install",
"install": "node-gyp-build",
"prepare": "husky install || true",
"third-party-updates": "oss third-party manifest && oss third-party notices && git add THIRD_PARTY_NOTICES.md third_party_manifest.json"

@@ -104,4 +101,5 @@ },

"dependencies": {
"https-proxy-agent": "^5.0.1",
"nan": "^2.17.0",
"nan": "^2.18.0",
"node-gyp-build": "^4.8.0",
"prebuildify": "^6.0.0",
"semver": "^7.5.2"

@@ -111,7 +109,6 @@ },

"index.js",
"build.js",
"prebuilds/**/*",
"src/*cpp",
"src/*.hpp",
"lib/common.js",
"lib/pre-build.js",
"lib/gyp-utils.js",
"binding.gyp",

@@ -118,0 +115,0 @@ "*.md"

@@ -25,5 +25,11 @@ <a href="https://opensource.newrelic.com/oss-category/#community-plus"><picture><source media="(prefers-color-scheme: dark)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/dark/Community_Plus.png"><source media="(prefers-color-scheme: light)" srcset="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"><img alt="New Relic Open Source community plus project banner." src="https://github.com/newrelic/opensource-website/raw/main/src/images/categories/Community_Plus.png"></picture></a>

Note that this is a native module and thus must be compiled to function.
Pre-built binaries are provided for Linux servers running supported versions of
Node. If you are not using Linux or not using a supported version of Node, you
will need to have a compiler installed on the machine where this is to be
Pre-built binaries are included in the package for the following platforms, across all LTS versions of Node.js:
+ Linux/amd64
+ Linux/arm64
+ macOS/arm64
+ Windows/x64
+ Windows/x86
If your system does not match the above matrix, you will need to have a compiler installed on the machine where this is to be
deployed. See [node-gyp](https://www.npmjs.com/package/node-gyp#installation)

@@ -37,41 +43,8 @@ for more information on compiling native addons.

During installation, the module will first attempt build from source on the
target machine. If that fails, it will attempt to download a pre-built binary
for your system. You can disable the download attempt by setting
`NR_NATIVE_METRICS_NO_DOWNLOAD` to `true` in your environment before
installation.
During installation, the module will first attempt to locate a prebuilt binary for the target machine within its included list of prebuilt binaries. If that fails, it will attempt a standard [node-gyp](https://www.npmjs.com/package/node-gyp#installation) build. If you do not want to use prebuilt binary, or know that it will need to be built, you can force a build:
```sh
$ export NR_NATIVE_METRICS_NO_DOWNLOAD=true
$ npm install @newrelic/native-metrics
$ npm install @newrelic/native-metrics --build-from-source
```
If you would like to skip the build step and only attempt to download a
pre-build binary, set `NR_NATIVE_METRICS_NO_BUILD` to `true`.
```sh
$ export NR_NATIVE_METRICS_NO_BUILD=true
$ npm install @newrelic/native-metrics
```
If both env vars are set, `NO_BUILD` will override `NO_DOWNLOAD`.
If you are working behind a firewall and want to cache the downloads internally
you can set the value of the download host and remote path instead of forcing a
build:
```sh
$ export NR_NATIVE_METRICS_DOWNLOAD_HOST=http://your-internal-cache/
$ export NR_NATIVE_METRICS_REMOTE_PATH=path/to/download/folder/
$ npm install @newrelic/native-metrics
```
You can also specify a proxy host to route requests through using the `NR_NATIVE_METRICS_PROXY_HOST` environment variable:
```sh
$ export NR_NATIVE_METRICS_NO_BUILD=true
$ export NR_NATIVE_METRICS_PROXY_HOST=http://your-proxy-host/
$ npm install @newrelic/native-metrics
```
For more information, please see the agent [installation guide][install-node] and [compatibility and requirements][compatibility].

@@ -189,2 +162,2 @@

[3]: https://codecov.io/gh/newrelic/node-native-metrics/branch/main/graph/badge.svg
[4]: https://codecov.io/gh/newrelic/node-native-metrics
[4]: https://codecov.io/gh/newrelic/node-native-metrics

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc