Skip to content

Commit 242f65c

Browse files
authored
[Test][core-amqp] fix deprecated dependency warnings (Azure#29668)
Use `esbuild-plugin-polyfill-node` for node polyfills per recommendation at https://github.com/remorses/esbuild-plugins
1 parent 6bc0f6c commit 242f65c

File tree

3 files changed

+49
-32
lines changed

3 files changed

+49
-32
lines changed

common/config/rush/pnpm-lock.yaml

Lines changed: 42 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdk/core/core-amqp/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,7 @@
8787
"devDependencies": {
8888
"@azure/dev-tool": "^1.0.0",
8989
"@azure/eslint-plugin-azure-sdk": "^3.0.0",
90-
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
91-
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
90+
"esbuild-plugin-polyfill-node": "^0.3.0",
9291
"@microsoft/api-extractor": "^7.43.1",
9392
"@types/debug": "^4.1.12",
9493
"@types/node": "^18.0.0",

sdk/core/core-amqp/vitest.browser.config.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
// Licensed under the MIT license.
33

44
import { defineConfig } from "vitest/config";
5-
import { NodeGlobalsPolyfillPlugin } from "@esbuild-plugins/node-globals-polyfill";
6-
import { NodeModulesPolyfillPlugin } from "@esbuild-plugins/node-modules-polyfill";
5+
import { polyfillNode } from "esbuild-plugin-polyfill-node";
76

87
export default defineConfig({
98
optimizeDeps: {
@@ -14,11 +13,11 @@ export default defineConfig({
1413
},
1514
// Enable esbuild polyfill plugins
1615
plugins: [
17-
NodeGlobalsPolyfillPlugin({
18-
buffer: true,
19-
process: true,
20-
}),
21-
NodeModulesPolyfillPlugin(),
16+
polyfillNode({
17+
polyfills: {
18+
buffer: true,
19+
process: true,
20+
}}),
2221
],
2322
},
2423
},

0 commit comments

Comments
 (0)