Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

util: rename CallSite.column to columnNumber #56584

Merged

Conversation

legendecas
Copy link
Member

Align the property names lineNumber and columnNumber.

The name should either be line and column, or lineNumber and columnNumber, but not mixing up. This leads confusing doc like

node/lib/util.js

Lines 337 to 344 in db7a31e

/**
* @typedef {object} CallSite // The call site
* @property {string} scriptName // The name of the resource that contains the
* script for the function for this StackFrame
* @property {string} functionName // The name of the function associated with this stack frame
* @property {number} lineNumber // The number, 1-based, of the line for the associate function call
* @property {number} columnNumber // The 1-based column offset on the line for the associated function call
*/

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Jan 13, 2025
Copy link
Member

@BridgeAR BridgeAR left a comment

Choose a reason for hiding this comment

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

I think we could already add a doc only deprecation in this PR. Otherwise LGTM

Align the property names `lineNumber` and `columnNumber`.
@legendecas legendecas force-pushed the util/callsites-column-number branch from edb6b7f to 40a94ec Compare January 13, 2025 13:28
@legendecas
Copy link
Member Author

@BridgeAR in the change section, a deprecation note "Property column is deprecated in favor of columnNumber." was added. Are you suggesting adding other form of deprecation notation? AFAICT, frontmatter deprecation (e.g.

deprecated: v6.0.0
) or deprecation section (
> Stability: 0 - Deprecated: Use [`Object.assign()`][] instead.
) do not help in this case as the property its own is as a section.

@BridgeAR
Copy link
Member

We just need to assign a new deprecation number and document it in the specific deprecation section: https://github.com/nodejs/node/blob/main/doc/api/deprecations.md

@legendecas
Copy link
Member Author

legendecas commented Jan 13, 2025

This API is still "Stability: 1.1 - Active development". Deprecations in experimental APIs do not necesirily need a deprecation code through the deprecation cycle: https://github.com/nodejs/node/blob/main/doc/api/documentation.md#stability-index

Copy link

codecov bot commented Jan 13, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.19%. Comparing base (db7a31e) to head (40a94ec).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56584      +/-   ##
==========================================
- Coverage   89.19%   89.19%   -0.01%     
==========================================
  Files         662      662              
  Lines      191794   191797       +3     
  Branches    36927    36919       -8     
==========================================
+ Hits       171076   171078       +2     
+ Misses      13568    13565       -3     
- Partials     7150     7154       +4     
Files with missing lines Coverage Δ
lib/util.js 97.76% <100.00%> (+<0.01%) ⬆️
src/node_util.cc 86.03% <100.00%> (+0.10%) ⬆️

... and 23 files with indirect coverage changes

@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label Jan 13, 2025
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jan 13, 2025
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@legendecas legendecas added the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 15, 2025
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jan 15, 2025
@nodejs-github-bot nodejs-github-bot merged commit 1238f0a into nodejs:main Jan 15, 2025
61 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in 1238f0a

@legendecas legendecas deleted the util/callsites-column-number branch January 15, 2025 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants