use non deprecated way to get record name

Open Beginner friendly
#10 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
tooling

Research direction

Start in packages/devtools/src/createFormatters.ts at the two cited locations that access ._name, then compare the deprecated API reference in Record.js with the modern record-name API. Centralize the lookup with backward compatibility and verify that record formatting still obtains names without relying directly on the deprecated access.

Written by the indexing model from the issue text.

Description

multiple locations [1] get record name using ._name which is marked as deprecated [2]

we could have an utility function that uses the modern way and falls back to _name if not found to be backward compatible but allow future versions of immutable to drop ._name.

[1] https://github.com/immutable-js/immutable-devtools/blob/3bd80e851f51a1b78a860c1e6e47c69e400b268f/packages/devtools/src/createFormatters.ts#L121

https://github.com/immutable-js/immutable-devtools/blob/3bd80e851f51a1b78a860c1e6e47c69e400b268f/packages/devtools/src/createFormatters.ts#L148

[2] https://github.com/immutable-js/immutable-js/blob/9acd11a87e1c628f08639f9ae0539073f4ee46d8/src/Record.js#L63

Dominant language
JavaScript
Stars
1
Forks
1
Avg merge
1m
Merged PRs (30d)
1

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from immutable-js/immutable-devtools

All issues in immutable-js/immutable-devtools

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.