denoland / deno

A modern runtime for JavaScript and TypeScript.
https://deno.com
MIT License
97.22k stars 5.37k forks source link

Implement `PerformanceObserver.observe` from `node:perf_hooks` #25034

Open nicolo-ribaudo opened 2 months ago

nicolo-ribaudo commented 2 months ago

There has been recently an update in the grammardown npm package that makes ecmarkup not work anymore in Deno (I was trying in https://github.com/tc39/ecma262/):

deno run -A npm:ecmarkup --verbose spec.html --multipage out
error: Uncaught Error: Not implemented: PerformanceObserver.observe
    at notImplemented (ext:deno_node/_utils.ts:6:9)
    at PerformanceObserver.observe (node:perf_hooks:5:5)
    at reset (file:///home/nic/Documents/dev/github.com/tc39/ecma262/node_modules/.deno/grammarkdown@3.3.2/node_modules/grammarkdown/dist/performance.js:128:18)
    at Object.<anonymous> (file:///home/nic/Documents/dev/github.com/tc39/ecma262/node_modules/.deno/grammarkdown@3.3.2/node_modules/grammarkdown/dist/performance.js:88:1)
    at Object.<anonymous> (file:///home/nic/Documents/dev/github.com/tc39/ecma262/node_modules/.deno/grammarkdown@3.3.2/node_modules/grammarkdown/dist/performance.js:141:4)
    at Module._compile (node:module:659:34)
    at Object.Module._extensions..js (node:module:673:10)
    at Module.load (node:module:597:32)
    at Function.Module._load (node:module:484:12)
    at Module.require (node:module:609:19)

I saw that there is already https://github.com/denoland/deno/issues/11260 open, but that one looks to be about the global web API that has the same name.

nicolo-ribaudo commented 2 months ago

Actually, this didn't stop working due to a change in an npm package, but due to a change in Deno itself. deno run -A npm:ecmarkup --verbose spec.html --multipage out works when using Deno 1.41, and fails with 1.44.