Skip to content

Commit e8715ad

Browse files
committed
prepublish
1 parent 2671fb8 commit e8715ad

File tree

6 files changed

+30
-1613
lines changed

6 files changed

+30
-1613
lines changed

.npmignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ project.xcworkspace
3939
local.properties
4040
android/build
4141
android/obj
42+
.project
4243

4344
# node.js
4445
#
@@ -47,11 +48,24 @@ npm-debug.log
4748
Example
4849
yarn.lock
4950
bun.lock
51+
*.test.ts
52+
*.test.js
5053

5154
domains.json
5255
endpoints.json
5356
endpoints_cresc.json
5457

5558
tea.yaml
5659

57-
e2e/
60+
e2e/
61+
62+
harmony/**
63+
!harmony/pushy.har
64+
65+
.tmp
66+
.cursor
67+
68+
android/jni/lzma/bin
69+
android/jni/lzma/DOC
70+
71+

android/jni/Application.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
APP_PLATFORM := android-16
1+
APP_PLATFORM := android-21
22
APP_CFLAGS += -Wno-error=format-security
33
APP_CFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
44
APP_CFLAGS += -ffunction-sections -fdata-sections

error.js

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
{
22
"name": "react-native-update",
3-
"version": "10.37.13",
3+
"version": "10.38.0-beta.0",
44
"description": "react-native hot update",
55
"main": "src/index",
66
"scripts": {
77
"prepublishOnly": "NODE_ENV=production bun scripts/prepublish.ts",
8+
"publish:local": "SKIP_NATIVE_BUILD=1 npm publish",
89
"postinstall": "node scripts/check-expo-version.js",
910
"prepack": "bun submodule && bun lint",
1011
"lint": "eslint \"src/*.@(ts|tsx|js|jsx)\" && tsc --noEmit",

scripts/prepublish.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ function isGitHubCI(): boolean {
102102
return process.env.GITHUB_ACTIONS === 'true';
103103
}
104104

105+
function shouldSkipNativeBuild(): boolean {
106+
return process.argv.includes('--skip') || process.env.SKIP_NATIVE_BUILD === '1';
107+
}
108+
105109
async function buildNativeArtifacts(): Promise<void> {
106110
console.log('Building Harmony HAR...');
107111
const harResult = Bun.spawnSync(['npm', 'run', 'build:harmony-har'], {
@@ -136,7 +140,13 @@ async function main(): Promise<void> {
136140
console.log(
137141
'ℹ️ Not in GitHub CI, skipping version resolution and package.json modification',
138142
);
139-
await buildNativeArtifacts();
143+
if (shouldSkipNativeBuild()) {
144+
console.log(
145+
'ℹ️ --skip flag detected, skipping native artifacts build',
146+
);
147+
} else {
148+
await buildNativeArtifacts();
149+
}
140150
}
141151

142152
console.log('✅ Prepublish script completed successfully');

src/core.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { NativeEventEmitter, NativeModules, Platform } from 'react-native';
22
import { emptyModule, error, log } from './utils';
33
import i18n from './i18n';
4+
/* eslint-disable @react-native/no-deep-imports */
45
const {
56
version: v,
67
} = require('react-native/Libraries/Core/ReactNativeVersion');

0 commit comments

Comments
 (0)