Skip to content

Commit c649701

Browse files
authored
Merge pull request #13 from blazejkustra/bundle-mode
Bundle mode
2 parents f62cb15 + c9c2c7a commit c649701

File tree

183 files changed

+12603
-18281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+12603
-18281
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
blank_issues_enabled: true
1+
blank_issues_enabled: false
22
contact_links:
33
- name: Feature Request 💡
4-
url: https://github.com/blazejkustra/react-native-backgrounds/discussions/new?category=ideas
4+
url: https://github.com/blazejkustra/react-native-effects/discussions/new?category=ideas
55
about: If you have a feature request, please create a new discussion on GitHub.
66
- name: Discussions on GitHub 💬
7-
url: https://github.com/blazejkustra/react-native-backgrounds/discussions
7+
url: https://github.com/blazejkustra/react-native-effects/discussions
88
about: If this library works as promised but you need help, please ask questions there.

.github/ISSUE_TEMPLATE/new-background-request.yml

Lines changed: 0 additions & 101 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2424

2525
- name: Setup
2626
uses: ./.github/actions/setup
@@ -36,7 +36,7 @@ jobs:
3636

3737
# steps:
3838
# - name: Checkout
39-
# uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
39+
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4040

4141
# - name: Setup
4242
# uses: ./.github/actions/setup
@@ -49,24 +49,24 @@ jobs:
4949

5050
steps:
5151
- name: Checkout
52-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
52+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
5353

5454
- name: Setup
5555
uses: ./.github/actions/setup
5656

5757
- name: Build package
5858
run: yarn prepare
5959

60-
build-web:
61-
runs-on: ubuntu-latest
60+
# build-web:
61+
# runs-on: ubuntu-latest
6262

63-
steps:
64-
- name: Checkout
65-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63+
# steps:
64+
# - name: Checkout
65+
# uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6666

67-
- name: Setup
68-
uses: ./.github/actions/setup
67+
# - name: Setup
68+
# uses: ./.github/actions/setup
6969

70-
- name: Build example for Web
71-
run: |
72-
yarn example expo export --platform web
70+
# - name: Build example for Web
71+
# run: |
72+
# yarn example expo export --platform web
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
diff --git a/src/node-haste/DependencyGraph.js b/src/node-haste/DependencyGraph.js
2+
index bd42485a8a6647757c0f5b2f2c4a5e659125fcdd..417de6c997067b4b1c686c35fe5007ba199b3897 100644
3+
--- a/src/node-haste/DependencyGraph.js
4+
+++ b/src/node-haste/DependencyGraph.js
5+
@@ -186,6 +186,14 @@ class DependencyGraph extends _events.default {
6+
return (0, _nullthrows.default)(this._fileSystem).getAllFiles();
7+
}
8+
async getOrComputeSha1(mixedPath) {
9+
+ if (mixedPath.includes("react-native-worklets/.worklets/")) {
10+
+ const createHash = require("crypto").createHash;
11+
+ return {
12+
+ sha1: createHash("sha1")
13+
+ .update(performance.now().toString())
14+
+ .digest("hex"),
15+
+ };
16+
+ }
17+
const result = await this._fileSystem.getOrComputeSha1(mixedPath);
18+
if (!result || !result.sha1) {
19+
throw new Error(`Failed to get the SHA-1 for: ${mixedPath}.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
diff --git a/src/modules/HMRClient.js b/src/modules/HMRClient.js
2+
index 3e2652d7a43ff0d2ab3ad7556ecf79f88f7a6edb..47de354ddfd3858187048e84b5a62b412a28c640 100644
3+
--- a/src/modules/HMRClient.js
4+
+++ b/src/modules/HMRClient.js
5+
@@ -2,6 +2,9 @@
6+
7+
const EventEmitter = require("./vendor/eventemitter3");
8+
const inject = ({ module: [id, code], sourceURL }) => {
9+
+ if (global.__workletsModuleProxy?.propagateModuleUpdate) {
10+
+ global.__workletsModuleProxy.propagateModuleUpdate(code, sourceURL);
11+
+ }
12+
if (global.globalEvalWithSourceUrl) {
13+
global.globalEvalWithSourceUrl(code, sourceURL);
14+
} else {
15+
diff --git a/src/polyfills/require.js b/src/polyfills/require.js
16+
index 367cabb90c6e016dc024d4f7fadfee6c3a52ca32..c6399316700b0295441a42ba19d29b171e54015b 100644
17+
--- a/src/polyfills/require.js
18+
+++ b/src/polyfills/require.js
19+
@@ -334,14 +334,14 @@ function unknownModuleError(id) {
20+
}
21+
return Error(message);
22+
}
23+
+metroRequire.getModules = () => {
24+
+ return modules;
25+
+};
26+
if (__DEV__) {
27+
metroRequire.Systrace = {
28+
beginEvent: () => {},
29+
endEvent: () => {},
30+
};
31+
- metroRequire.getModules = () => {
32+
- return modules;
33+
- };
34+
var createHotReloadingObject = function () {
35+
const hot = {
36+
_acceptCallback: null,

0 commit comments

Comments
 (0)