@granite-js/react-native 0.1.25 → 0.1.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @granite-js/react-native
2
2
 
3
+ ## 0.1.26
4
+
5
+ ### Patch Changes
6
+
7
+ - 41f9ab3: ensure polyfill setup during initialization and update package.json config for improve tree shaking
8
+ - Updated dependencies [41f9ab3]
9
+ - @granite-js/style-utils@0.1.26
10
+ - @granite-js/lottie@0.1.26
11
+ - @granite-js/image@0.1.26
12
+ - @granite-js/jest@0.1.26
13
+ - @granite-js/cli@0.1.26
14
+ - @granite-js/mpack@0.1.26
15
+ - @granite-js/native@0.1.26
16
+ - @granite-js/plugin-core@0.1.26
17
+
3
18
  ## 0.1.25
4
19
 
5
20
  ### Patch Changes
@@ -1 +1 @@
1
- export declare function setup(): void;
1
+ export declare function setupPolyfills(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/react-native",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "description": "The Granite Framework",
5
5
  "bin": {
6
6
  "granite": "./bin/cli.js"
@@ -86,7 +86,7 @@
86
86
  "@babel/core": "^7.24.9",
87
87
  "@babel/preset-env": "^7.24.8",
88
88
  "@babel/preset-typescript": "^7.24.7",
89
- "@granite-js/native": "0.1.25",
89
+ "@granite-js/native": "0.1.26",
90
90
  "@testing-library/dom": "^10.4.0",
91
91
  "@testing-library/react": "^16.1.0",
92
92
  "@types/babel__core": "^7",
@@ -112,14 +112,18 @@
112
112
  "react-native": "*"
113
113
  },
114
114
  "dependencies": {
115
- "@granite-js/cli": "0.1.25",
116
- "@granite-js/image": "0.1.25",
117
- "@granite-js/jest": "0.1.25",
118
- "@granite-js/lottie": "0.1.25",
119
- "@granite-js/mpack": "0.1.25",
120
- "@granite-js/plugin-core": "0.1.25",
121
- "@granite-js/style-utils": "0.1.25",
115
+ "@granite-js/cli": "0.1.26",
116
+ "@granite-js/image": "0.1.26",
117
+ "@granite-js/jest": "0.1.26",
118
+ "@granite-js/lottie": "0.1.26",
119
+ "@granite-js/mpack": "0.1.26",
120
+ "@granite-js/plugin-core": "0.1.26",
121
+ "@granite-js/style-utils": "0.1.26",
122
122
  "es-toolkit": "^1.39.8",
123
123
  "react-native-url-polyfill": "1.3.0"
124
- }
124
+ },
125
+ "sideEffects": [
126
+ "dist/async-bridges.*",
127
+ "dist/constant-bridges.*"
128
+ ]
125
129
  }
@@ -6,6 +6,7 @@ import type { RouterProps, RequireContext } from '../router';
6
6
  import { AppRoot } from './AppRoot';
7
7
  import { HostAppRoot } from './HostAppRoot';
8
8
  import { getSchemeUri } from '../constant-bridges';
9
+ import { setupPolyfills } from '../rn-polyfills';
9
10
 
10
11
  export interface GraniteProps {
11
12
  /**
@@ -50,6 +51,8 @@ export interface GraniteProps {
50
51
  const createApp = () => {
51
52
  let _appName: string | null = null;
52
53
 
54
+ setupPolyfills();
55
+
53
56
  function registerComponent(appKey: string, component: React.ComponentType<any>): string {
54
57
  if (AppRegistry.getAppKeys().includes(appKey)) {
55
58
  // `AppRegistry.registerComponent` returns the app key.
@@ -1,9 +1,6 @@
1
1
  import type { ComponentType } from 'react';
2
2
  import { AppRegistry } from 'react-native';
3
3
  import { ENTRY_BUNDLE_NAME } from '../constants';
4
- import { setup } from '../rn-polyfills';
5
-
6
- setup();
7
4
 
8
5
  export function register(Component: ComponentType<any>) {
9
6
  if (AppRegistry.getAppKeys().includes(ENTRY_BUNDLE_NAME)) {
@@ -1,7 +1,7 @@
1
1
  import { setup as setupSymbolAsyncIterator } from './symbol-asynciterator';
2
2
  import { setup as setupURLPolyfill } from './url';
3
3
 
4
- export function setup() {
4
+ export function setupPolyfills() {
5
5
  setupSymbolAsyncIterator();
6
6
  setupURLPolyfill();
7
7
  }