Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: newrelic/node-newrelic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v11.17.0
Choose a base ref
...
head repository: newrelic/node-newrelic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v11.18.0
Choose a head ref
  • 16 commits
  • 50 files changed
  • 6 contributors

Commits on May 15, 2024

  1. docs: Updated compatibility report (#2194)

    Co-authored-by: mrickard <11327+mrickard@users.noreply.github.com>
    github-actions[bot] and mrickard authored May 15, 2024
    Copy the full SHA
    77aacb4 View commit details

Commits on May 20, 2024

  1. chore: Removed unused express5 feature flag (#2197)

    jsumners-nr authored May 20, 2024
    Copy the full SHA
    366504b View commit details
  2. chore: Removed outdated Slack reference (#2198)

    jsumners-nr authored May 20, 2024
    Copy the full SHA
    8110d42 View commit details
  3. ci: Updated the langchain vectorstore test to reference the correct v…

    …ersion of `@langchain/core` getting tested (#2202)
    bizob2828 authored May 20, 2024
    Copy the full SHA
    ed81852 View commit details
  4. feat: Added support for redis v4 legacyMode client.v4.<command> (#2200

    )
    bizob2828 authored May 20, 2024
    Copy the full SHA
    b2284c5 View commit details
  5. docs: Updated compatibility report (#2203)

    Co-authored-by: bizob2828 <1874937+bizob2828@users.noreply.github.com>
    github-actions[bot] and bizob2828 authored May 20, 2024
    Copy the full SHA
    fcb285a View commit details

Commits on May 23, 2024

  1. chore: Removed package-lock.json (#2208)

    jsumners-nr authored May 23, 2024
    Copy the full SHA
    b267695 View commit details
  2. chore: Fixed aws-sdk-v3 bedrock tests (#2211)

    jsumners-nr authored May 23, 2024
    Copy the full SHA
    050469e View commit details
  3. chore: Fixed aws-sdk-v3 bedrock tests (again) (#2212)

    jsumners-nr authored May 23, 2024
    Copy the full SHA
    330cc4b View commit details

Commits on May 24, 2024

  1. refactor: Updated shim.recordConsume to use shim.record and added…

    … ability to invoke an after hook with callback args (#2207)
    bizob2828 authored May 24, 2024
    Copy the full SHA
    4f48fc3 View commit details

Commits on May 28, 2024

  1. chore: Added updating of docs site with compat table (#2205)

    jsumners-nr authored May 28, 2024
    Copy the full SHA
    c28a938 View commit details
  2. chore: Fixed should-run CI step (#2214)

    jsumners-nr authored May 28, 2024
    Copy the full SHA
    d0a481d View commit details
  3. chore: Fixed CI jobs (#2215)

    jsumners-nr authored May 28, 2024
    Copy the full SHA
    8b030fb View commit details
  4. test: Updated langchain versioned tests to separate the vectorstore a…

    …nd other tests. This is to avoid peer resolution of `@langchain/community` package that is being used to test the elasticsearch vectorstore (#2216)
    bizob2828 authored May 28, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    davidmc24 David M. Carr
    Copy the full SHA
    e768955 View commit details

Commits on May 29, 2024

  1. docs: Updated compatibility report (#2223)

    Co-authored-by: bizob2828 <1874937+bizob2828@users.noreply.github.com>
    newrelic-node-agent-team and bizob2828 authored May 29, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    davidmc24 David M. Carr
    Copy the full SHA
    a256ca0 View commit details
  2. chore: release v11.18.0 (#2225)

    github-actions[bot] authored May 29, 2024
    Copy the full SHA
    b94ea43 View commit details
Showing with 819 additions and 17,761 deletions.
  1. +44 −45 .github/workflows/ci-workflow.yml
  2. +50 −3 .github/workflows/compatibility-report.yml
  3. +1 −1 .github/workflows/notify-release.yml
  4. +1 −1 .github/workflows/post-release.yml
  5. +2 −2 .github/workflows/prep-release.yml
  6. +1 −1 .github/workflows/publish-branch.yml
  7. +2 −2 .github/workflows/release-creation.yml
  8. +1 −1 .github/workflows/smoke-test-workflow.yml
  9. +2 −2 .github/workflows/update-snyk-prs.yml
  10. +1 −1 .github/workflows/versioned-coverage.yml
  11. +1 −1 .github/workflows/versioned-security-agent.yml
  12. +1 −0 .gitignore
  13. +1 −0 .npmrc
  14. +0 −7 CONTRIBUTING.md
  15. +33 −0 NEWS.md
  16. +11 −1 changelog.json
  17. +57 −53 compatibility.md
  18. +4 −1 lib/feature_flags.js
  19. +4 −0 lib/instrumentation/@node-redis/client.js
  20. +9 −9 lib/instrumentation/amqplib/amqplib.js
  21. +1 −2 lib/instrumentation/aws-sdk/v3/bedrock.js
  22. +1 −1 lib/instrumentation/core/inspector.js
  23. +2 −4 lib/instrumentation/langchain/runnable.js
  24. +1 −2 lib/instrumentation/langchain/tools.js
  25. +1 −2 lib/instrumentation/langchain/vectorstore.js
  26. +1 −1 lib/instrumentation/memcached.js
  27. +2 −4 lib/instrumentation/openai.js
  28. +3 −3 lib/instrumentation/redis.js
  29. +1 −1 lib/instrumentation/superagent.js
  30. +9 −119 lib/shim/message-shim/consume.js
  31. +2 −11 lib/shim/message-shim/index.js
  32. +4 −5 lib/shim/message-shim/subscribe-consume.js
  33. +61 −35 lib/shim/shim.js
  34. +10 −7 lib/shim/specs/recorder.js
  35. +6 −6 lib/shim/webframework-shim/middleware.js
  36. +0 −17,289 package-lock.json
  37. +1 −2 package.json
  38. +1 −1 test/smoke/index/index.tap.js
  39. +2 −2 test/smoke/newrelic.js
  40. +2 −1 test/unit/feature_flag.test.js
  41. +2 −73 test/unit/shim/message-shim.test.js
  42. +63 −44 test/unit/shim/shim.test.js
  43. +6 −1 test/versioned/amqplib/amqp-utils.js
  44. +52 −1 test/versioned/amqplib/callback.tap.js
  45. +55 −1 test/versioned/amqplib/promises.tap.js
  46. +17 −7 test/versioned/aws-sdk-v3/bedrock-chat-completions.tap.js
  47. +17 −3 test/versioned/langchain/package.json
  48. +11 −1 test/versioned/langchain/vectorstore.tap.js
  49. +2 −1 test/versioned/redis/package.json
  50. +257 −0 test/versioned/redis/redis-v4-legacy-mode.tap.js
89 changes: 44 additions & 45 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
name: Node Agent CI

on: [push, pull_request, workflow_dispatch]
on:
push:
pull_request:
workflow_dispatch:

env:
# Enable versioned runner quiet mode to make CI output easier to read:
OUTPUT_MODE: quiet

jobs:
should_run:
# We only want the test suites to run when code has changed, or when
# a dependency update has occurred.
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
javascript_changed: ${{ steps.filter.output.javascript }}
javascript_changed: ${{ steps.filter.outputs.javascript }}
deps_changed: ${{ steps.deps.outputs.divergent }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
javascript:
- '**/*.js'
- '**/*.json'
- '**/*.mjs'
- '**/*.cjs'
skip_if_release:
runs-on: ubuntu-latest

outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}

steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
- 'api.js'
- 'esm-loader.mjs'
- 'index.js'
- 'stub_api.js'
- 'lib/**/*.{js,json,mjs,cjs}'
- 'test/**/*.{js,json,mjs,cjs}'
- uses: jsumners-nr/gha-node-deps-divergent@643628fe0da51ec025e984c4644f17fd9f9e93f6
id: deps
with:
paths_ignore: '["NEWS.md", "changelog.json", "package.json", "package-lock.json"]'
skip_after_successful_duplicate: false
do_not_skip: '["workflow_dispatch", "pull_request"]'
base-sha: ${{ github.base_ref || 'main' }}
current-sha: ${{ github.sha }}

lint:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ubuntu-latest

strategy:
@@ -58,18 +59,16 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Linting
run: npm run lint
- name: Inspect Lockfile
run: npm run lint:lockfile

ci:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ubuntu-latest

strategy:
@@ -84,16 +83,16 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run CI Script Unit Tests
run: npm run unit:scripts

unit:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ubuntu-latest

strategy:
@@ -108,7 +107,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Unit Tests
run: npm run unit
- name: Archive Unit Test Coverage
@@ -119,10 +118,10 @@ jobs:

integration:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ubuntu-latest

env:
@@ -140,7 +139,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Docker Services
run: npm run services
- name: Run Integration Tests
@@ -160,10 +159,10 @@ jobs:

versioned-internal:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }}

strategy:
@@ -178,7 +177,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Docker Services
run: npm run services
- name: Run Versioned Tests
@@ -211,10 +210,10 @@ jobs:
# There is no coverage for external as that's tracked in their respective repos
versioned-external:
needs:
- skip_if_release
- should_run
if: needs.skip_if_release.outputs.should_skip != 'true'
|| needs.should_run.outputs.javascript_changed == 'true'
if: github.event_name == 'workflow_dispatch' ||
(needs.should_run.outputs.javascript_changed == 'true' ||
needs.should_run.outputs.deps_changed == 'true')
runs-on: ${{ github.ref == 'refs/heads/main' && vars.NR_RUNNER || 'ubuntu-latest' }}

strategy:
@@ -229,7 +228,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Versioned Tests
run: TEST_CHILD_TIMEOUT=600000 npm run versioned:external
env:
53 changes: 50 additions & 3 deletions .github/workflows/compatibility-report.yml
Original file line number Diff line number Diff line change
@@ -54,17 +54,64 @@ jobs:
path: compatibility.md

# Generate the new PR to update the doc in the repo.
- run: |
git config user.name $GITHUB_ACTOR
git config user.email gh-actions-${GITHUB_ACTOR}@github.com
- run: |
rm -f status.log
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
title: "docs: Updated compatibility report"
commit-message: "docs: Updated compatibility report"
branch: "compatibility-report/auto-update"
delete-branch: true
base: main
labels: "documentation"

docs:
runs-on: ubuntu-latest
if:
github.event_name == 'push' ||
(github.event.workflow_run && github.event.workflow_run.conclusion == 'success') ||
(github.event_name == 'workflow_dispatch' &&
(inputs.repo_target == 'docs' || inputs.repo_target == 'both'))
env:
DOCS_TARGET: src/content/docs/apm/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent.mdx
steps:
- uses: actions/checkout@v4
with:
path: agent
- uses: actions/checkout@v4
with:
repository: newrelic/docs-website
path: docs
- uses: jaxxstorm/action-install-gh-release@71d17cb091aa850acb2a1a4cf87258d183eb941b
with:
repo: newrelic/newrelic-node-versions
platform: linux
arch: amd64
cache: enable
- run: |
nrversions -v -r agent -R ./docs/${DOCS_TARGET} 2>docs-status.log
# Upload generated artifacts for potential debugging purposes.
- uses: actions/upload-artifact@v4
with:
name: docs-status.log
path: docs-status.log
- uses: actions/upload-artifact@v4
with:
name: compatibility-requirements-nodejs-agent.mdx
path: docs/${{ env.DOCS_TARGET }}

# Generate the new PR to update the doc in the repo.
- run: |
rm -f docs-status.log
- uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e
with:
token: ${{ secrets.NODE_AGENT_GH_TOKEN || secrets.GITHUB_TOKEN }}
title: "docs: Updated Node.js agent compatibility report"
commit-message: "docs: Updated Node.js agent compatibility report"
branch: "nodejs-compatibility-report/auto-update"
delete-branch: true
base: develop
path: docs
labels: "documentation"
2 changes: 1 addition & 1 deletion .github/workflows/notify-release.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ jobs:
with:
node-version: lts/*
- name: Install Dependencies
run: npm ci
run: npm install
- name: Check for PRs not yet released
run: node ./bin/pending-prs.js --repos $NR_REPOS --ignore-labels $IGNORE_LABELS
env:
2 changes: 1 addition & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Setup GitHub Credentials
run: |
git config user.name $GITHUB_ACTOR
4 changes: 2 additions & 2 deletions .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ on:
default: NEWS.md
changelog_json:
description: Whether or not it should generate a changelog.json (should only be for node-newrelic)
type: boolean
type: boolean
required: false

jobs:
@@ -41,7 +41,7 @@ jobs:
node-version: ${{ matrix.node-version }}
# Only need to install deps in agent-repo because of the bin scripts
- name: Install Dependencies
run: npm ci --prefix agent-repo
run: npm install --prefix agent-repo
- name: Setup GitHub Credentials
run: |
git config user.name $GITHUB_ACTOR
2 changes: 1 addition & 1 deletion .github/workflows/publish-branch.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies
run: npm ci
run: npm install
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AGENT_NPM_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/release-creation.yml
Original file line number Diff line number Diff line change
@@ -45,9 +45,9 @@ jobs:
- name: Install Dependencies
run: |
# Install deps in caller repo
npm ci
npm install
# Install deps in agent repo
npm ci --prefix agent-repo
npm install --prefix agent-repo
- name: Setup GitHub Credentials
run: |
git config user.name $GITHUB_ACTOR
2 changes: 1 addition & 1 deletion .github/workflows/smoke-test-workflow.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Smoke Tests
run: npm run smoke
env:
4 changes: 2 additions & 2 deletions .github/workflows/update-snyk-prs.yml
Original file line number Diff line number Diff line change
@@ -11,15 +11,15 @@ jobs:
permissions:
pull-requests: write
runs-on: ubuntu-latest
if: ${{ github.event.sender.login == 'snyk-bot' }}
if: ${{ github.event.sender.login == 'snyk-bot' }}
steps:
- uses: actions/checkout@v3
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
- name: Install Dependencies
run: npm ci
run: npm install
- name: Update Snyk PR Title
run: node ./bin/update-snyk-pr.js'
env:
2 changes: 1 addition & 1 deletion .github/workflows/versioned-coverage.yml
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Run Docker Services
run: npm run services
- name: Run Legacy Context Versioned Tests
2 changes: 1 addition & 1 deletion .github/workflows/versioned-security-agent.yml
Original file line number Diff line number Diff line change
@@ -82,7 +82,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
run: npm install
- name: Install Version ${{ inputs.version }} of security agent
if: ${{ inputs.version }}
run: npm install @newrelic/security-agent@${{ inputs.version }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
package-lock.json
node_modules
newrelic_agent.log
.coverage_data
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
7 changes: 0 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -37,13 +37,6 @@ For more information about CLAs, please check out Alex Russell’s excellent
post, [“Why Do I Need to Sign
This?”](https://infrequently.org/2008/06/why-do-i-need-to-sign-this/).

### Slack

We host a public Slack with a dedicated channel for contributors and
maintainers of open source projects hosted by New Relic. If you are
contributing to this project, you're welcome to request access to the
\#oss-contributors channel in the newrelicusers.slack.com workspace. To request access, please use this [link](https://join.slack.com/t/newrelicusers/shared_invite/zt-1ayj69rzm-~go~Eo1whIQGYnu3qi15ng).

## PR Guidelines

### Version Support
Loading