Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52633
Changelog: [internal]
Now that we have the correct type definition for `console.timeStamp` we can remove the unnecessary `$FlowFixMe` annotations we had to add to use the new arguments.
Reviewed By: hoxyq
Differential Revision: D78405312
fbshipit-source-id: 29378ee6fa5986e22d0dfdfb85b7e25375361dc9
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52632
Changelog: [internal]
This improves the type definitions for methods in the global `console` object, most importantly:
- Removes use of `any`.
- Defines correct typing for `console.timeStamp`, including new parameters for the Chrome Extensibility API.
Reviewed By: hoxyq
Differential Revision: D78405314
fbshipit-source-id: 6f31cc3005ff708ef6aa155bcd150d53a845e66c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52168
# Changelog: [Internal]
The main reason for the stub is to make sure this method is always installed. The actual implementation will be part of the `jsinspector-modern` stack, which is fully initialized in production builds.
Once there is a gurantee that RuntimeTarget globals are always installed in any environments, we can remove polyfills altogether.
Reviewed By: rubennorte, GijsWeterings
Differential Revision: D76987507
fbshipit-source-id: 2602af28f9e4359cf58dfafdf84802c0bf92372d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48592
Changelog: [General][Added] Add support for the second parameter of `console.table` to specify a list of columns to print in the table.
Reviewed By: javache
Differential Revision: D67803665
fbshipit-source-id: 354476404bad7cd2d280c8b3d963d5acba41f86b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48591
Changelog: [General][Changed] Improved formatting of values logged via `console.table` (including Markdown format).
This provides several improvements over the format of tables logged via `console.table`:
* Markdown format for easy integration in existing documents.
* Increased alignment with the spec and Chrome/Firefox implementations:
* Added index columns.
* Logged all available columns.
* Format for all types of values (including objects, functions, etc.).
Reviewed By: javache
Differential Revision: D67794858
fbshipit-source-id: 464c938ed51f28a8e071bc46f0f5b0d970005873
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48589
Changelog: [internal]
Added basic tests for the current implementation of the `console.table` polyfill (not the CDP implementation).
Reviewed By: sammy-SC
Differential Revision: D67791579
fbshipit-source-id: 80d64903a92e87e0724ed302ec0521419f45f9a7
Summary:
Both `hermes` and `JSC` supports `Object.{values & entries}`, so this polyfills aren't used any more.
## Changelog:
[GENERAL][REMOVED]: removed `Object.{values & entries}` from polyfills
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
Pull Request resolved: https://github.com/facebook/react-native/pull/40747
Test Plan:
1. We can confirm with `hermes` tests: https://github.com/facebook/hermes/blob/main/test/hermes/object-functions.js#L256
2. Remove this polyfills and check that the code runs as expected.
3. You can also run: `console.log(Object.entries.toString());` and verify that this is `[native code]`
Reviewed By: christophpurrer
Differential Revision: D50100639
Pulled By: robhogan
fbshipit-source-id: b1cea88bd984e99f304a3a063e985eecff8831dd