Skip to content

Commit f2164ae

Browse files
authored
Update dc-polyfill and remove patches (#6141)
1 parent 229408a commit f2164ae

File tree

4 files changed

+5
-16
lines changed

4 files changed

+5
-16
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
"@opentelemetry/api": "1.8.0",
125125
"@opentelemetry/core": "^1.14.0",
126126
"crypto-randomuuid": "^1.0.0",
127-
"dc-polyfill": "^0.1.9",
127+
"dc-polyfill": "^0.1.10",
128128
"ignore": "^7.0.5",
129129
"import-in-the-middle": "^1.14.2",
130130
"istanbul-lib-coverage": "^3.2.2",

packages/dd-trace/src/appsec/rasp/fs-plugin.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ class AppsecFsPlugin extends Plugin {
3535
this.addBind('apm:fs:operation:finish', this._onFsOperationFinishOrRenderEnd)
3636
this.addBind('tracing:datadog:express:response:render:start', this._onResponseRenderStart)
3737
this.addBind('tracing:datadog:express:response:render:end', this._onFsOperationFinishOrRenderEnd)
38-
// TODO Remove this when dc-polyfill is fixed&updated
39-
// hack to node 18 and early 20.x
40-
// with dc-polyfill addBind is not enough to force a channel.hasSubscribers === true
41-
this.addSub('tracing:datadog:express:response:render:start', () => {})
4238

4339
super.configure(true)
4440
}

packages/dd-trace/test/appsec/rasp/fs-plugin.spec.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -226,12 +226,6 @@ describe('AppsecFsPlugin', () => {
226226

227227
it('should clean up store when finishing op', () => {
228228
let count = 4
229-
// TODO Remove this when node 18 is unsupported or dc-polyfill is fixed&updated
230-
// hack to node 18 and early 20.x
231-
// with dc-polyfill addBind is not enough to force a channel.hasSubscribers === true
232-
const onStart = () => {}
233-
opStartCh.subscribe(onStart)
234-
235229
const onFinish = () => {
236230
const store = storage('legacy').getStore()
237231
count--
@@ -251,7 +245,6 @@ describe('AppsecFsPlugin', () => {
251245
assert.strictEqual(count, 0)
252246
} finally {
253247
opFinishCh.unsubscribe(onFinish)
254-
opStartCh.unsubscribe(onStart)
255248
}
256249
})
257250
})

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,10 +1561,10 @@ data-view-byte-offset@^1.0.1:
15611561
es-errors "^1.3.0"
15621562
is-data-view "^1.0.1"
15631563

1564-
dc-polyfill@^0.1.9:
1565-
version "0.1.9"
1566-
resolved "https://registry.yarnpkg.com/dc-polyfill/-/dc-polyfill-0.1.9.tgz#ee594f4366a6dcf006db1c1f9d3672f57a720856"
1567-
integrity sha512-D5mJThEEk9hf+CJPwTf9JFsrWdlWp8Pccjxkhf7uUT/E/cU9Mx3ebWe2Bz2OawRmJ6WS9eaDPBkeBE4uOKq9uw==
1564+
dc-polyfill@^0.1.10:
1565+
version "0.1.10"
1566+
resolved "https://registry.yarnpkg.com/dc-polyfill/-/dc-polyfill-0.1.10.tgz#6f2ada1a9e449587c363ca98cfb79b443cf74b70"
1567+
integrity sha512-9iSbB8XZ7aIrhUtWI5ulEOJ+IyUN+axquodHK+bZO4r7HfY/xwmo6I4fYYf+aiDom+WMcN/wnzCz+pKvHDDCug==
15681568

15691569
debug@^3.2.7:
15701570
version "3.2.7"

0 commit comments

Comments
 (0)