Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Feb 22, 2024
1 parent c7e525b commit b002d69
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/js/builtins/ProcessObjectInternals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export function windowsEnv(internalEnv: InternalEnvMap, envMapList: Array<string
o[k] = internalEnv[k.toUpperCase()];
}
return o;
}
};

return new Proxy(internalEnv, {
get(_, p) {
Expand Down
32 changes: 19 additions & 13 deletions test/js/web/console/console-log.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,25 +176,31 @@ console.log({ "": "" });

{
// proxy
const proxy = Proxy.revocable({ hello: 2 }, {
get(target, prop, receiver) {
console.log('FAILED: GET', prop);
return Reflect.get(target, prop, receiver);
},
set(target, prop, value, receiver) {
console.log('FAILED: SET', prop, value);
return Reflect.set(target, prop, value, receiver);
const proxy = Proxy.revocable(
{ hello: 2 },
{
get(target, prop, receiver) {
console.log("FAILED: GET", prop);
return Reflect.get(target, prop, receiver);
},
set(target, prop, value, receiver) {
console.log("FAILED: SET", prop, value);
return Reflect.set(target, prop, value, receiver);
},
},
});
);
console.log(proxy.proxy);
proxy.revoke();
console.log(proxy.proxy);
}

{
// proxy custom inspect
const proxy = new Proxy({
[Bun.inspect.custom]: () => 'custom inspect',
}, { });
const proxy = new Proxy(
{
[Bun.inspect.custom]: () => "custom inspect",
},
{},
);
console.log(proxy);
}
}

0 comments on commit b002d69

Please sign in to comment.