GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — console: Add common aliases for console methods by aks- · Pull Request #3486 · nodejs/node

Conversation

@aks-

@aks- aks- commented Oct 22, 2015

Copy link
Copy Markdown
Member
  • add common aliases as per following spec
  • https://github.com/DeveloperToolsWG/console-object/blob/master/api.md

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aks- aks- mentioned this pull request Oct 22, 2015
Add methods to console as per spec #3473
Closed
@Fishrock123 Fishrock123 added the console Issues and PRs related to the console subsystem. label Oct 22, 2015
silverwind
silverwind reviewed Oct 22, 2015
View reviewed changes
Comment thread doc/api/console.markdown Outdated

@silverwind silverwind Oct 22, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest using the same signature as in the spec: console.debug(object [,object, ...]).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aks- aks- Oct 23, 2015

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then we might want to change the complete doc for console. Because the signature to methods like log are also not matching with spec we are following https://github.com/nodejs/node/blob/master/doc/api/console.markdown#consolelogdata- Do you think I should change them as well?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@silverwind silverwind Oct 27, 2015

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think changing the signatures to match the spec would be preferred. Can you do so in a second commit?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@silverwind

silverwind commented Oct 22, 2015

Copy link
Copy Markdown
Contributor

Please also add some tests for these methods here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind silverwind added the semver-minor PRs that contain new features and should be released in the next minor version. label Oct 22, 2015
@jasnell

jasnell commented Oct 22, 2015

Copy link
Copy Markdown
Member

Wouldn't this need to be semver-major as it could break anyone who has monkey patched these? (same issue as nooping the undefined ones)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Oct 22, 2015

Copy link
Copy Markdown
Contributor

I don't think we have to support broken polyfills or monkey patches, and I think it's unlikely anyone would do so in the case of these methods.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aredridel

aredridel commented Oct 25, 2015

Copy link
Copy Markdown
Contributor

Hm. on the converse side, this lets things designed for the browser run as is, even if they use these features.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@chrisdickinson

chrisdickinson commented Oct 25, 2015

Copy link
Copy Markdown
Contributor

@jasnell:

Wouldn't this need to be semver-major as it could break anyone who has monkey patched these? (same issue as nooping the undefined ones)

It seems low risk. If code is monkeypatching the console object, that code's new debug/exception methods should (continue to) win. I might be missing something though — do you have a link to the problems arising from noop'ing handy?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aks-
aks- force-pushed the add-aliases-to-console branch 2 times, most recently from b26facc to ae36937 Compare October 28, 2015 19:13
@aks-

aks- commented Oct 29, 2015

Copy link
Copy Markdown
Member Author

@silverwind I have added the tests for this and changed the signture of newly added aliases as per browser spec. Besides that I created a new PR #3584 in which I changed the method signatures which were there previously in doc to follow the browser spec. I haven't changed the signatures of methods which have differnent behaviour in node than in browser (e.g. console.assert). Now I am in confusion if we are actually following the spec?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

@aks- thanks, I'll have a look later.

This PR is LGTM.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Oct 29, 2015

Copy link
Copy Markdown
Contributor

@aks- on second look, what's up with tools/v8-prof/tick-processor-tmp-1221 in this patch?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aks-
console: Add common aliases for console methods
16641f7
- add common aliases as per following spec
- https://github.com/DeveloperToolsWG/console-object/blob/master/api.md
@aks-
aks- force-pushed the add-aliases-to-console branch from ae36937 to 16641f7 Compare October 30, 2015 05:40
@aks-

aks- commented Oct 30, 2015

Copy link
Copy Markdown
Member Author

@silverwind sorry I added that by accident I guess...removed it now

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

CI: https://ci.nodejs.org/job/node-test-pull-request/665/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

LGTM, will likely land this tomorrow.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

I'm not sure this is a good idea actually if we aren't going to follow the rest of the "spec".

@aks- Sorry, my fault for pulling you into this console-spec thing. :/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

@Fishrock123 I think we should implement as much of this "spec" as is feasible. What's wrong with these alias methods?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

Nothing particularly but it's more things we need to keep supporting. Seems low-value -- stuff works fine if it follows this part but not another part kind of thing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aks-

aks- commented Nov 4, 2015

Copy link
Copy Markdown
Member Author

@Fishrock123 it's okay, I am actually learning a lot about the structure of node codebase :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@silverwind

silverwind commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

Guess I'll put this on hold then.

Interestingly, MDN says debug is deprecated and it lists exception only as _exception. I think some more research into browser behaviour is needed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Fishrock123

Fishrock123 commented Nov 4, 2015

Copy link
Copy Markdown
Contributor

See #3584 (comment), the situation is generally very silly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Trott
Trott force-pushed the master branch from 1e896a6 to 082cc8d Compare December 27, 2015 02:00
@jasnell jasnell added the stalled Issues and PRs manually marked as stalled and scheduled for automatic closure. label Mar 22, 2016
@jasnell

jasnell commented Mar 22, 2016

Copy link
Copy Markdown
Member

Closing due to lack of activity. Seems like there's very little interest in this in general.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@jasnell jasnell closed this Mar 22, 2016
@aliscco aliscco mentioned this pull request Apr 25, 2023
[Snyk] Fix for 14 vulnerabilities aliscco/alisco-node#174
Open
This was referenced Apr 29, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#375
Open
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#379
Open
This was referenced Jun 22, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#494
Open
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#532
Open
[Snyk] Security upgrade karma from 4.4.1 to 5.0.8 aliscco/alisco-node#562
Open
[Snyk] Security upgrade karma from 4.4.1 to 5.0.8 aliscco/alisco-node#595
Open
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#614
Open
This was referenced Jul 7, 2023
[Snyk] Fix for 14 vulnerabilities leonardoadame/node#58
Open
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 leonardoadame/node#143
Open
@aliscco aliscco mentioned this pull request Oct 27, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#646
Open
@aliscco aliscco mentioned this pull request Nov 28, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#695
Open
This was referenced Nov 29, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 leonardoadame/node#211
Open
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 leonardoadame/node#268
Open
@aliscco aliscco mentioned this pull request Dec 2, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 aliscco/alisco-node#1024
Open
@leonardoadame leonardoadame mentioned this pull request Dec 3, 2023
[Snyk] Security upgrade karma from 3.1.4 to 5.0.8 leonardoadame/node#479
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

console Issues and PRs related to the console subsystem. semver-minor PRs that contain new features and should be released in the next minor version. stalled Issues and PRs manually marked as stalled and scheduled for automatic closure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@aks- @silverwind @jasnell @aredridel @chrisdickinson @Fishrock123
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.