loynoir

Results 97 comments of loynoir

Quote https://github.com/nodejs/node/issues/48591#issuecomment-1637946944 > node does not currently support import maps and import maps don't support the proper values for things like delegation to the loader To me, permission policy.json seems...

``` "depd": "^2.0.0" ``` ``` $ node --frozen-intrinsics Welcome to Node.js v16.18.0. > require('depd')('http-errors')('non-error status code; use only 4xx or 5xx status codes') Uncaught: TypeError : callSite.getFileName is not a...

Ah I delete that warning, I guess easier to read. ``` $ pnpm node --frozen-intrinsics (node:6252) ExperimentalWarning: The --frozen-intrinsics flag is experimental (Use `node --trace-warnings ...` to show where the...

https://github.com/nodejs/node/issues/45336#issuecomment-1304839390

There is nodejs contributor suggestion, maybe, to use that flag to protect prototype pollution instead of crashed `Object.freeze(NODE_GLOBAL_AND_ITS_PROTOTYPE)`.

Ah, have a look where is the first place goes wrong when using that flag. https://github.com/dougwilson/nodejs-depd/blob/7ad9a48dff1e7fe52d4298da7c1235944073bfc9/index.js#L386 So, this seems related to https://github.com/dougwilson/nodejs-depd/issues/16 with `--frozen-intrinsics` ``` > Error.prepareStackTrace = ()=>{} [Function...

Although its name is `jsonschema`, but actually, it can also provide for `yaml` and `toml` https://github.com/SchemaStore/schemastore/blob/24a1f6e5e134d1f2dddf9d781fb5717a308c2822/src/api/json/catalog.json#L19

Workaround, tested same code works on both node and browser. ```sh wasm-pack build --target nodejs --out-dir ./dist/pkg && node ./patch.mjs ``` ```js import { readFile, writeFile } from "node:fs/promises"; const...

```js import { readFile, writeFile } from "node:fs/promises"; const cargoTomlContent = await readFile("./Cargo.toml", "utf8"); const cargoPackageName = /\[package\]\nname = "(.*?)"/.exec(cargoTomlContent)[1] const name = cargoPackageName.replace(/-/g, '_') const content = await readFile(`./dist/pkg/${name}.js`,...

### 3 days ago I benchmark `isomorphic-git` with ~2.5G repo yarnpkg/berry with 2.2M file. `isomorphic-git` is slow, but the test pass, was not encounter this bug. https://github.com/loynoir/git-bench/blob/44e2cab6e812432cf7f65ea0b8c0a4600c537c40/bench.txt ### Now I...