- Dropped support for Node.js 16
- Reduced dependency on async library (#219) (582efe6)
- Removed install queue from versioned runner. It will install before running a given test and rely on the jobs limit (#221) (d9c6d1b)
- Added support for Node 22
- Removed --all flag from versioned runner as all runs will be using this since we no longer support Node.js versions that do not ship with npm7 (#216) (0db82d8)
- Removed
use_new_release
input from prepare release workflow (#200) (0f40f8b) - removed changelog.json file (#198) (3a32b2b)
- Added instrumentation tracking to support newrelic issue 2033 (#195) (730e747)
- Fixed typo in workflow variable (#196) (6535efa)
- Added new Amazon Titan LLM responses to support
token_count
work.
- Adds a new module that provides a mock server for AWS Bedrock.
- Bumps follow-redirects from 1.15.3 to 1.15.4.
- Bumps axios to 1.6.0 and updates ancestor dependency newrelic. These dependencies need to be updated together.
- Updates
axios
from 0.21.4 to 1.6.0 - Updates
newrelic
from 11.0.0 to 11.5.0 - Bumps and @babel/traverse. These dependencies needed to be updated together.
- Updates
@babel/traverse
from 7.22.8 to 7.23.2 - Updates
@babel/traverse
from 7.21.3 to 7.23.2
- Updated the TestAgent to call
shimmer.registerHooks
andshimmer.removeHooks
to set up instrumentation and remove it.
-
BREAKING CHANGE: Removed support for Node 14.
-
Added support for Node 20.
-
Gated usage of loader in versioned tests by NR_LOADER environment variable
-
Updated vulnerable dependencies:
- word-wrap from 1.2.3 to 1.2.4.
- protobufjs from 7.2.2 to 7.2.4.
- fast-xml-parser from 4.2.4 to 4.2.5
- @aws-sdk/client-lambda from 3.357.0 to 3.363.0
-
Updated
semver
to 7.5.2 -
Updated
newrelic
dev dependency to 10.3.0 -
Updated
@newrelic/eslint-config
to 0.3.0 -
Updated
eslint
dev dependency to 8.43.0 -
Updated README links to point to new forum link due to repolinter ruleset change
- Updated
TestAgent.getShim
to require an exported module and pull the shim symbol.
-
Provided ability to register only core instrumentation or both core and 3rd party instrumentation.
TestAgent.makeFullyInstrumented
will register both.TestAgent.makeInstrumented
will only register core instrumentation. -
Updated README header image to latest OSS office required images
- Bumps json5 from 2.2.1 to 2.2.2.
- Streamlined CLM assertions to inherit tap from context.
- Bypassed tapper/asserter abstractions so that CLM test failures are exposed.
- Added lockfile checks to CI workflow to prevent malicious changes
- Added
assertCLMAttrs
testing method to utils, so it can be used to test CLM behavior in external repos
- Added detection for node version < 18, to supply correct loader flag
- Added the capacity of running ES module tests with the ESM loader from agent or a path to an ESM loader set as process.env.NR_LOADER.
-
Added support for Node 18.
-
BREAKING Removed support for Node 12.
The minimum supported version is now Node v14. For further information on our support policy, see: https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent.
-
Updated test runner to use max CPUs available to run test folders in parallel when the
--jobs
parameter is not specified. -
Bumped moment from 2.29.2 to 2.29.4 in package-lock.
-
Bumped protobufjs from 6.11.2 to 6.11.3 in package-lock.
- Added TEST_CHILD_TIMEOUT environment variable to modify test timeout limits.
- Updated version runner to fail if package fails to install and not attempt to clean the npm cache.
-
Bumped async to ^3.2.3.
Updated usage of
queue.drain
which was a 3.x breaking change. -
Resolved dev-only audit warnings.
-
Bumped moment from 2.29.1 to 2.29.2.
-
Bumped
tap
to ^16.0.1.
- Fixed
util.maxVersionPerMode
sorting by handling numbers as semver versions and not floats.
- Fixed
util.maxVersionPerMode
by sorting versions to ensure the last package is the latest.
-
Fixed how version resolution occurs when semver ranges are not the latest major version.
-
Fixed how
latest
gets resolved by actually using the latest version. -
Added printing list of packages and their versions at the end of a run.
-
Fixed link to discuss.newrelic.com in README.
-
Resolved several dev-dependency audit warnings.
-
Bumped
glob
to ^7.2.0.
-
Added a warning and/or error when tests present in testing directory are not included in test specification.
-
Updated
add-to-board
to use org levelNODE_AGENT_GH_TOKEN
-
Added workflow to automate preparing release notes by reusing the newrelic/node-newrelic/.github/workflows/prep-release.yml@main workflow from agent repository.
-
Added job to automatically add issues/pr to Node.js Engineering board
-
Fixed overeager pattern-filter interpretation.
-
Added
getShim
method for retrieving a test Shim instance.This enables test setup involving instrumentation like scenarios (adding segments, etc.) without reaching into the internal tracer.
-
Added clearing of registered instrumentation to
unload
. -
Added
getContextManager
to retrieve the active context manager in agent versions 8.6.0+. -
Bumped
newrelic
dev dependency to^8.6.0
.
-
Fix pattern matching regression when parsing names of test files.
-
Refactored test pattern filtering by extracting to its own function. Also added a few missing test pattern test cases.
-
Added the
-P, --pattern
flag to allow filtering tests by keyword(s). -
Added support for running specific test files by name or globbing pattern.
-
Added a
--samples
value to CLI to allow an override of sampling for a given test run.Global sample value will be used when it is less than the samples value set on a given package in the tests stanza.
-
Added ability to run versioned tests against version tags. For example:
newrelic@latest
.When a version such as
package@latest
is specified in the versioned testpackage.json
declarations, it won't directly satisfy semver matches against the package versions manually pulled down and cached. The runner now attempts to directly install the configured version, which also results in a test failure if the package fails to install. Previously, failure to be able to install a dependency would log a warning and then just not run any tests and let CI pass. -
Upgraded setup-node CI job to v2 and changed the linting node version to lts/* for future proofing.
-
Added @newrelic/eslint-config to rely on a centralized eslint ruleset.
-
Added a pre-commit hook to check if package.json changes and run oss third-party manifest and oss third-party notices.
This will ensure the third_party_manifest.json and THIRD_PARTY_NOTICES.md are up to date.
-
Changed runner output to only list package versions when a test fails.
-
BREAKING Removed support for Node 10.
The minimum supported version is now Node v12. For further information on our support policy, see: https://docs.newrelic.com/docs/agents/nodejs-agent/getting-started/compatibility-requirements-nodejs-agent.
-
Added support for Node 16.
-
Updated package.json to use files list instead of
.npmignore
. -
Bumped
tap
to ^15.0.9. -
Upgraded
sinon
to ^11.1.1.
- Added enumerating and printing versions of every module being tested.
- Added flag to install every package on each test run for npm v7 compatibility.
- Added husky + lint-staged to run linting on all staged files.
- Added Node v14.x to CI.
- Removed Node v8.x from CI.
- Updates to README to match New Relic OSS template.
-
Creates config instance via Config.createInstance() to pass to agent instead of using Config.initialize().
Previously, the agent and created segments could end up with different config instances resulting in config updates (such as attribute configuration) not propagating correctly for tests. Now, the agent uses the same initialized singleton similar to regular execution.
- Improved handling of soft-matching segments for cases where siblings have duplicate names.
- Added TestAgent.getAgentApi() function that returns an agent API instance for the underlying agent instance.
-
Updated to Apache 2.0 license.
-
Bumped minimum dev dependency of newrelic (agent) to 6.11 for license matching.
-
Updated metric retrieval from agent for
assert.metrics
to match newer agent versions.Breaking: assertions are now only compatible with newrelic (agent) versions 6+.
-
Added third party notices file and metadata for dependencies.
-
Updated readme with more detail.
-
Added issue templates for bugs and enhancements.
-
Added code of conduct file.
-
Added contributing guide.
-
Added pull request template.
-
Migrated CI to GitHub Actions.
-
Added copyright headers to all source files.
-
Added .vscode to .gitignore.
-
Added additional items to .npmignore.
- Added the ability to skip tests using multiple keywords
-
Added new format for versioned test
Dependency version may now be sampled down to a constant number of versions. For example:
"dependencies": { "redis": { "versions": ">1.0.0", "samples": 10 } }
- Added
--skip
flag to allow for skipping certain test suites.
-
Added
setState
argument toTestAgent
constructor, which allows for automatic data collection in tests by default. -
Removed obsoleted
flags
argument fromTestAgent
constructor. Feature flags are now accounted for in standard config.
- Versioned test runner now uses
--no-package-lock
when installing test deps.
-
Dropped support for Node 0.10 and Node 0.12.
-
Added
isLocalhost
andgetDelocalizedHostname
to utilities methods.These methods are useful for determining the host name as the New Relic agent sees it. When making metrics and event attributes, the delocalized hostname is what the agent will use.
- Fixed default messages for tap assertions.
-
Added check for
AGENT_PATH
environment variable.This environment variable can be used to specify the location of the
newrelic
package that these test utilities will load. It should be the path to the root directory of the agent. If the environment variable is not set, then thenewrelic
module that was installed (e.g. is in anode_modules
directory) is used instead. -
With this change, the following syntaxes are now valid:
versioned-tests
: Will look for tests with the following globs:test/versioned/**/package.json
tests/versioned/**/package.json
node_modules/**/tests/versioned/**/package.json
<-- For the agent to seamlessly work with the tests of deps!
versioned-tests test/versioned/hapi
: Will look with these globs:test/versioned/hapi/package.json
test/versioned/hapi/**/package.json
versioned-tests test/versioned/mongodb/package.json
: Will look only at:test/versioned/mongodb/package.json
- Added
agent#registerInstrumentation
method to registering third-party instrumentations in a testing environment.
- Fixed invalid
TestAgent.extendTap
reference inindex.js
toassert.extendTap
.
-
Added
TestAgent#registerInstrumentation
method.This method allows third-party instrumentations to be registered in a test environment.
-
Added
TestAgent
helper class.This class provides simple to use helpers for running your tests with the agent and in transactions.
-
Added
tap
assertions.If your tests use
tap
, then you can add some helpful assertions to your tests using this module. -
Added version matrix test running.
This is a script for executing your instrumentation's tests against many versions of the module you are instrumenting.