From 96620efa725f0f548b683825cb3cefff270fb252 Mon Sep 17 00:00:00 2001 From: Bob Evans Date: Wed, 30 Aug 2023 14:02:47 -0400 Subject: [PATCH] chore: upgraded test utils and removed unused shimmer.patchModule and shimmer.unpatchModule (#1769) --- THIRD_PARTY_NOTICES.md | 2 +- lib/shimmer.js | 8 -------- package-lock.json | 26 ++++++++++++++------------ package.json | 2 +- third_party_manifest.json | 12 ++++++------ 5 files changed, 22 insertions(+), 28 deletions(-) diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md index 564e0c6d71..2f1bceed97 100644 --- a/THIRD_PARTY_NOTICES.md +++ b/THIRD_PARTY_NOTICES.md @@ -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 diff --git a/lib/shimmer.js b/lib/shimmer.js index 1c770a7bb6..bef8de489d 100644 --- a/lib/shimmer.js +++ b/lib/shimmer.js @@ -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) diff --git a/package-lock.json b/package-lock.json index fa5e5a536d..08105325c7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,10 +13,9 @@ "@grpc/proto-loader": "^0.7.5", "@newrelic/aws-sdk": "^7.0.0", "@newrelic/koa": "^8.0.0", - "@newrelic/native-metrics": "^10.0.0", "@newrelic/security-agent": "0.2.1", "@newrelic/superagent": "^7.0.0", - "@prisma/prisma-fmt-wasm": "^4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085", + "@tyriar/fibonacci-heap": "^2.0.7", "concat-stream": "^2.0.0", "https-proxy-agent": "^7.0.1", "import-in-the-middle": "^1.4.2", @@ -33,7 +32,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", @@ -80,7 +79,8 @@ }, "optionalDependencies": { "@contrast/fn-inspect": "^3.3.0", - "@newrelic/native-metrics": "^10.0.0" + "@newrelic/native-metrics": "^10.0.0", + "@prisma/prisma-fmt-wasm": "^4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085" } }, "node_modules/@ampproject/remapping": { @@ -1562,9 +1562,9 @@ } }, "node_modules/@newrelic/test-utilities": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@newrelic/test-utilities/-/test-utilities-8.0.0.tgz", - "integrity": "sha512-cv0/A+tNfmmrsEcY2N3jMVaDCoISQESU+hMfG25qSYonN8e6N9oAyVRL6rzo24sw/V1zIMcgUsJ+HFOGwiM9tg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@newrelic/test-utilities/-/test-utilities-8.1.0.tgz", + "integrity": "sha512-d/mNOM/R/VVSIKwUAW+29AtbOfPFosbxRfk+FAgtYZHbxCM016hTbRYyR2MuWkchXn29M3c+Iiiq23Fg5UYe1w==", "dev": true, "dependencies": { "async": "^3.2.3", @@ -4014,7 +4014,8 @@ "node_modules/@prisma/prisma-fmt-wasm": { "version": "4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085", "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085.tgz", - "integrity": "sha512-zYz3rFwPB82mVlHGknAPdnSY/a308dhPOblxQLcZgZTDRtDXOE1MgxoRAys+jekwR4/bm3+rZDPs1xsFMsPZig==" + "integrity": "sha512-zYz3rFwPB82mVlHGknAPdnSY/a308dhPOblxQLcZgZTDRtDXOE1MgxoRAys+jekwR4/bm3+rZDPs1xsFMsPZig==", + "optional": true }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", @@ -17879,9 +17880,9 @@ "requires": {} }, "@newrelic/test-utilities": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@newrelic/test-utilities/-/test-utilities-8.0.0.tgz", - "integrity": "sha512-cv0/A+tNfmmrsEcY2N3jMVaDCoISQESU+hMfG25qSYonN8e6N9oAyVRL6rzo24sw/V1zIMcgUsJ+HFOGwiM9tg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/@newrelic/test-utilities/-/test-utilities-8.1.0.tgz", + "integrity": "sha512-d/mNOM/R/VVSIKwUAW+29AtbOfPFosbxRfk+FAgtYZHbxCM016hTbRYyR2MuWkchXn29M3c+Iiiq23Fg5UYe1w==", "dev": true, "requires": { "async": "^3.2.3", @@ -19794,7 +19795,8 @@ "@prisma/prisma-fmt-wasm": { "version": "4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085", "resolved": "https://registry.npmjs.org/@prisma/prisma-fmt-wasm/-/prisma-fmt-wasm-4.17.0-16.27eb2449f178cd9fe1a4b892d732cc4795f75085.tgz", - "integrity": "sha512-zYz3rFwPB82mVlHGknAPdnSY/a308dhPOblxQLcZgZTDRtDXOE1MgxoRAys+jekwR4/bm3+rZDPs1xsFMsPZig==" + "integrity": "sha512-zYz3rFwPB82mVlHGknAPdnSY/a308dhPOblxQLcZgZTDRtDXOE1MgxoRAys+jekwR4/bm3+rZDPs1xsFMsPZig==", + "optional": true }, "@protobufjs/aspromise": { "version": "1.1.2", diff --git a/package.json b/package.json index b6db96c1f9..3aa5cd9873 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/third_party_manifest.json b/third_party_manifest.json index 8d40713327..a93ad5c313 100644 --- a/third_party_manifest.json +++ b/third_party_manifest.json @@ -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, @@ -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": "nodejs@newrelic.com"