Skip to content

Commit

Permalink
refactor(react-native-github/polyfills): rename polyfills to js-polyf…
Browse files Browse the repository at this point in the history
…ills

Summary:
Changelog:
[General][Changed] - renamed polyfills package to js-polyfills as a part of [migration to monorepo structure](facebook#34692)

Differential Revision: https://internalfb.com/D41190595

fbshipit-source-id: 8158c8c2c4f5bf013e8cde5111d880d7929e426c
  • Loading branch information
Ruslan Lesiutin authored and facebook-github-bot committed Nov 16, 2022
1 parent da27c78 commit 2b89104
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Libraries/vendor/core/ErrorUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @flow strict
*/

import type {ErrorUtilsT} from '@react-native/polyfills/error-guard';
import type {ErrorUtilsT} from '@react-native/js-polyfills/error-guard';

/**
* The particular require runtime that we are using looks for a global
Expand Down
4 changes: 2 additions & 2 deletions jest/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
const MockNativeMethods = jest.requireActual('./MockNativeMethods');
const mockComponent = jest.requireActual('./mockComponent');

jest.requireActual('@react-native/polyfills/Object.es8');
jest.requireActual('@react-native/polyfills/error-guard');
jest.requireActual('@react-native/js-polyfills/Object.es8');
jest.requireActual('@react-native/js-polyfills/error-guard');

global.__DEV__ = true;

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"Libraries",
"LICENSE",
"local-cli",
"packages/polyfills",
"React-Core.podspec",
"react-native.config.js",
"react.gradle",
Expand Down Expand Up @@ -114,7 +115,6 @@
"@react-native-community/cli-platform-ios": "10.0.0-alpha.3",
"@react-native/assets": "1.0.0",
"@react-native/normalize-color": "2.1.0",
"@react-native/polyfills": "2.0.0",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"base64-js": "^1.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/polyfills/BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ yarn_workspace(

rn_library(
name = "polyfills",
base_path = relative_path_to_js_root() + "node_modules/@react-native/polyfills/",
base_path = relative_path_to_js_root() + "node_modules/@react-native/js-polyfills/",
is_polyfill = True,
labels = [
"pfh:ReactNative_CommonInfrastructurePlaceholder",
Expand Down
4 changes: 2 additions & 2 deletions packages/polyfills/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@react-native/polyfills",
"version": "2.0.0",
"name": "@react-native/js-polyfills",
"version": "0.72.0",
"description": "Polyfills for React Native.",
"repository": {
"type": "git",
Expand Down
3 changes: 2 additions & 1 deletion rn-get-polyfills.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@

'use strict';

module.exports = require('@react-native/polyfills');
// Although symlink for @react-native/js-polyfills is present, Metro couldn't handle it
module.exports = require('./packages/polyfills');

0 comments on commit 2b89104

Please sign in to comment.