Skip to content

Commit

Permalink
chore: upgraded test utils and removed unused shimmer.patchModule and…
Browse files Browse the repository at this point in the history
… shimmer.unpatchModule (#1769)
  • Loading branch information
bizob2828 authored Aug 30, 2023
1 parent 6a72d1f commit 96620ef
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 28 deletions.
2 changes: 1 addition & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -1892,7 +1892,7 @@ This product includes source derived from [@newrelic/newrelic-oss-cli](https://g

### @newrelic/test-utilities

This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v8.0.0](https://github.com/newrelic/node-test-utilities/tree/v8.0.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v8.0.0/LICENSE):
This product includes source derived from [@newrelic/test-utilities](https://github.com/newrelic/node-test-utilities) ([v8.1.0](https://github.com/newrelic/node-test-utilities/tree/v8.1.0)), distributed under the [Apache-2.0 License](https://github.com/newrelic/node-test-utilities/blob/v8.1.0/LICENSE):

```
Apache License
Expand Down
8 changes: 0 additions & 8 deletions lib/shimmer.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,6 @@ const shimmer = (module.exports = {
_firstPartyInstrumentation(agent, filePath, shim, uninstrumented, mojule)
}
},
// TODO: remove the following methods once test-utilities have been updated and released
// with the new registerHooks and removeHooks methods
patchModule(agent) {
shimmer.registerHooks(agent)
},
unpatchModule() {
shimmer.removeHooks()
},
registerHooks(agent) {
this._ritm = new Hook(pkgsToHook, function onHook(exports, name, basedir) {
return _postLoad(agent, exports, name, basedir)
Expand Down
26 changes: 14 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
"devDependencies": {
"@newrelic/eslint-config": "^0.3.0",
"@newrelic/newrelic-oss-cli": "^0.1.2",
"@newrelic/test-utilities": "^8.0.0",
"@newrelic/test-utilities": "^8.1.0",
"@octokit/rest": "^18.0.15",
"@slack/bolt": "^3.7.0",
"ajv": "^6.12.6",
Expand Down
12 changes: 6 additions & 6 deletions third_party_manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"lastUpdated": "Mon Aug 28 2023 13:40:33 GMT-0400 (Eastern Daylight Time)",
"lastUpdated": "Wed Aug 30 2023 11:23:58 GMT-0400 (Eastern Daylight Time)",
"projectName": "New Relic Node Agent",
"projectUrl": "https://github.com/newrelic/node-newrelic",
"includeOptDeps": true,
Expand Down Expand Up @@ -276,15 +276,15 @@
"licenseTextSource": "file",
"publisher": "New Relic"
},
"@newrelic/test-utilities@8.0.0": {
"@newrelic/test-utilities@8.1.0": {
"name": "@newrelic/test-utilities",
"version": "8.0.0",
"range": "^8.0.0",
"version": "8.1.0",
"range": "^8.1.0",
"licenses": "Apache-2.0",
"repoUrl": "https://github.com/newrelic/node-test-utilities",
"versionedRepoUrl": "https://github.com/newrelic/node-test-utilities/tree/v8.0.0",
"versionedRepoUrl": "https://github.com/newrelic/node-test-utilities/tree/v8.1.0",
"licenseFile": "node_modules/@newrelic/test-utilities/LICENSE",
"licenseUrl": "https://github.com/newrelic/node-test-utilities/blob/v8.0.0/LICENSE",
"licenseUrl": "https://github.com/newrelic/node-test-utilities/blob/v8.1.0/LICENSE",
"licenseTextSource": "file",
"publisher": "New Relic Node.js agent team",
"email": "[email protected]"
Expand Down

0 comments on commit 96620ef

Please sign in to comment.