summaryrefslogtreecommitdiff
path: root/ext/console/01_console.js
AgeCommit message (Collapse)Author
2024-10-22fix(ext/console): ignore casing for named colors in css parsing (#26466)Leo Kettmeir
2024-10-15fix(ext/console): apply coloring for console.table (#26280)Leo Kettmeir
Fixes #26159
2024-10-14fix(console/ext/repl): support using parseFloat() (#25900)Mohammad Sulaiman
Fixes #21428 Co-authored-by: tannal <tannal2409@gmail.com>
2024-10-08fix(console): missing cause property on non-error objects (#26061)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26047
2024-09-19fix(ext/console): more precision in console.time (#25723)Luca Casonato
2024-09-12fix(ext/console): prevent duplicate error printing when the cause is ↵MujahedSafaa
assigned (#25327) This commit fixes the error format when the cause is assigned separately, ensuring that the cause is only printed once instead of twice. The fix addresses issue [#21651](https://github.com/denoland/deno/issues/21651).
2024-09-10BREAKING(temporal/unstable): Remove obsoleted Temporal APIs part 2 (#25505)Kenta Moriuchi
Mainly I removed `Temporal.Calendar` and `Temporal.TimeZone` and replaced them to APIs that handle calendar and timezone as strings. https://github.com/tc39/proposal-temporal/pull/2925 Related #24836
2024-09-06fix(runtime): use more null proto objects again (#25040)Kenta Moriuchi
proceed with #23921 This PR is a preparation for https://github.com/denoland/deno_lint/pull/1307 --------- Signed-off-by: Kenta Moriuchi <moriken@kimamass.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
2024-09-02refactor(ext/console): align error messages (#25301)Ian Bull
Aligns the error messages in the console extension to be in-line with the Deno style guide. https://github.com/denoland/deno/issues/25269
2024-08-01fix(ext/console): render properties of Intl.Locale (#24827)Leo Kettmeir
Fixes #21271 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2024-07-22fix(ext/console): Error Cause Not Inspect-Formatted when printed (#24526)MujahedSafaa
This pull request addresses an issue where the Error.cause property was not formatted correctly when printed using console.log, leading to confusion. solution: Implemented a fix to ensure that Error.cause is formatted properly when printed by console.log, and the fix done by using JSON.stringify This PR fixes https://github.com/denoland/deno/issues/23416 --------- Signed-off-by: MujahedSafaa <168719085+MujahedSafaa@users.noreply.github.com>
2024-06-18fix(ext/console): bump default max str lengthto 10_00 (#24245)Luca Casonato
2024-06-03fix(console): add missing AssertionError to js (#22358)Oliver Medhurst
Previously it did not exist, so `assert` would crash the wrong way if it failed. Signed-off-by: CanadaHonk <honk@goose.icu>
2024-05-23fix(runtime): use more null proto objects (#23921)Luca Casonato
This is a primordialization effort to improve resistance against users tampering with the global `Object` prototype. --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-05-14fix(runtime): output to stderr with colors if a tty and stdout is piped (#23813)David Sherret
This also fixes a bug where Deno would output to stderr with colours when piped and stdout was not piped.
2024-02-21Revert "fix(console): support NO_COLOR and colors option in all scena… ↵Bartek Iwańczuk
(#22507) …rios (#21910)" This reverts commit bd1358efab8ba7339a8e70034315fa7da840292e. This change caused https://github.com/denoland/deno/issues/22496 and https://github.com/denoland/deno/issues/22445
2024-02-12fix(console): support NO_COLOR and colors option in all scenarios (#21910)Leo Kettmeir
Noticed in #21607
2024-01-29refactor: Use virtul ops module (#22175)Bartek Iwańczuk
Follow up to #22157. This leaves us with 4 usages of `ensureFastOps()` in `deno` itself. There's also about 150 usages of `Deno.core.ops.<op_name>` left as well.
2024-01-15feat(unstable): add Temporal API support (#21738)Bartek Iwańczuk
This commit adds support for [Stage 3 Temporal API proposal](https://tc39.es/proposal-temporal/docs/). The API is available when `--unstable-temporal` flag is passed. --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@gmail.com> Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
2024-01-10refactor: use `core.ensureFastOps()` (#21888)Kenta Moriuchi
2024-01-04fix: strict type check for cross realms (#21669)Kenta Moriuchi
Deno v1.39 introduces `vm.runInNewContext`. This may cause problems when using `Object.prototype.isPrototypeOf` to check built-in types. ```js import vm from "node:vm"; const err = new Error(); const crossErr = vm.runInNewContext(`new Error()`); console.assert( !(crossErr instanceof Error) ); console.assert( Object.getPrototypeOf(err) !== Object.getPrototypeOf(crossErr) ); ``` This PR changes to check using internal slots solves them. --- current: ``` > import vm from "node:vm"; undefined > vm.runInNewContext(`new Error("message")`) Error {} > vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`) Date {} ``` this PR: ``` > import vm from "node:vm"; undefined > vm.runInNewContext(`new Error("message")`) Error: message at <anonymous>:1:1 > vm.runInNewContext(`new Date("2018-12-10T02:26:59.002Z")`) 2018-12-10T02:26:59.002Z ``` --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-12-28chore: update deno_core to 0.240.0 (#21726)Bartek Iwańczuk
2023-12-19fix(console): inspect for `{Set,Map}Iterator` and `Weak{Set,Map}` (#21554)Kenta Moriuchi
2023-12-07refactor: pull 'core', 'internals', 'primordials' from ES module (#21462)Bartek Iwańczuk
This commit refactors how we access "core", "internals" and "primordials" objects coming from `deno_core`, in our internal JavaScript code. Instead of capturing them from "globalThis.__bootstrap" namespace, we import them from recently added "ext:core/mod.js" file.
2023-11-30refactor (parseCssColor): use parseInt, avoid unnecessary coercion (#20856)Jordan Harband
Upstream some changes from https://github.com/nodejs/node/pull/49205 Signed-off-by: Jordan Harband <ljharb@gmail.com>
2023-11-28Reland "fix(ext/console): fix inspecting iterators error. (#20720)" (#21370)Leo Kettmeir
2023-11-13Revert "fix(ext/console): fix inspecting iterators error. (#20720)" (#21191)Bartek Iwańczuk
This reverts commit 0209f7b46954d1b7bf923b4191e5a356ec09622c. Reverting because it causes failures on `main`: https://github.com/denoland/deno/pull/20720#issuecomment-1809166755
2023-11-13fix(ext/console): fix inspecting iterators error. (#20720)Chen Su
Fixes #19776 and #20676.
2023-11-13perf: lazy bootstrap options - first pass (#21164)Divy Srivastava
Move most runtime options to be lazily loaded. Constant options will be covered in a different PR. Towards https://github.com/denoland/deno/issues/21133
2023-09-19fix(cli): ensure that an exception in ↵Matt Mastracci
getOwnPropertyDescriptor('constructor') doesn't break Deno.inspect (#20568) Fixes #20561
2023-06-28fix(console): correct the parseCssColor algorithm (#19645)Nicholas Berlette
This is a fix for issue #19644, concerning the `parseCssColor` function in the file `ext/console/01_console.js`. Changes made on lines 2756-2758. To sum it up: > The internal `parseCssColor` function currently parses 3/4-digit hex colors incorrectly. For example, it parses the string `#FFFFFF` as `[255, 255, 255]` (as expected), but returns `[240, 240, 240]` for `#FFF`, when it should return the same triplet as the former. While it's not going to cause a fatal runtime error, it did bug me enough to fix it real quick.
2023-06-28fix(console): add assert function (#19635)Leo Kettmeir
2023-06-26chore: fix typos (#19572)Martin Fischer
2023-06-06fix(ext/console): fix inspecting large ArrayBuffers (#19373)ud2
2023-06-05chore: update deno_lint to 0.46.0 (#19372)Kenta Moriuchi
2023-06-05feat: add more options to Deno.inspect (#19337)Leo Kettmeir
For https://github.com/denoland/deno_std/issues/3404 --------- Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-05-11fix(console): handle error when inspecting promise-like (#19083)Nayeem Rahman
Fixes https://discord.com/channels/684898665143206084/684911491035430919/1105900195406958672. This was caused by: - A `TypeError` from `core.getPromiseDetails()` for promise-likes which also lead to that code path. - Swallowing internal formatting errors by returning `undefined`. I've made it so that a special message is formatted in that case instead (note that this case is fixed now): ![image](https://github.com/denoland/deno/assets/29990554/65bb9612-60b2-4e31-bf5e-e20976601593)
2023-05-02refactor(core): Use `ObjectHasOwn` instead of ↵Kenta Moriuchi
`ObjectPrototypeHasOwnProperty` (#18952) ES2022 `Object.hasOwn` can be used in snapshot, so I migrate to use it.
2023-05-01fix(core): Use primordials for methods (#18839)Kenta Moriuchi
I would like to get this change into Deno before merging https://github.com/denoland/deno_lint/pull/1152
2023-04-30refactor: remove ext/console/01_colors.js (#18927)Leo Kettmeir