Skip to content

Commit 9d290d2

Browse files
committed
Merge branch 'main' into szymonrybczak/feat-add-rnta
2 parents 54d13ea + 48b0e9a commit 9d290d2

File tree

22 files changed

+2100
-121
lines changed

22 files changed

+2100
-121
lines changed

.github/workflows/build-templates.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,8 @@ jobs:
198198
working-directory: ${{ env.work_dir }}
199199
run: |
200200
yarn typecheck
201+
# FIXME: Remove this once we fix the typecheck errors
202+
continue-on-error: true
201203

202204
- name: Test library
203205
working-directory: ${{ env.work_dir }}

.github/workflows/check-project.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,8 @@ jobs:
2626
- name: Typecheck
2727
run: yarn typecheck
2828

29+
- name: Test
30+
run: yarn test
31+
2932
- name: Build packages
3033
run: yarn lerna run prepare

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"lint": "eslint \"**/*.{js,ts,tsx}\"",
1919
"typecheck": "tsc --noEmit",
2020
"watch": "concurrently 'yarn typecheck --watch' 'lerna run --parallel prepare -- --watch'",
21+
"test": "yarn workspace react-native-builder-bob test",
2122
"docs": "yarn workspace docs"
2223
},
2324
"devDependencies": {
@@ -48,7 +49,8 @@
4849
"node_modules/",
4950
"coverage/",
5051
"lib/",
51-
"templates/"
52+
"templates/",
53+
"__fixtures__/"
5254
],
5355
"prettier": {
5456
"singleQuote": true,

packages/create-react-native-library/src/utils/generateExampleApp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ export default async function generateExampleApp({
145145

146146
const SCRIPTS_TO_ADD = {
147147
'build:android':
148-
'cd android && ./gradlew assembleDebug --no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a',
149-
'build:ios': `cd ios && xcodebuild -workspace ${projectName}Example.xcworkspace -scheme ${projectName}Example -configuration Debug -sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO`,
148+
'react-native build-android --extra-params "--no-daemon --console=plain -PreactNativeArchitectures=arm64-v8a"',
149+
'build:ios': `react-native build-ios --scheme ${projectName}Example --mode Debug --extra-params "-sdk iphonesimulator CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ GCC_OPTIMIZATION_LEVEL=0 GCC_PRECOMPILE_PREFIX_HEADER=YES ASSETCATALOG_COMPILER_OPTIMIZATION=time DEBUG_INFORMATION_FORMAT=dwarf COMPILER_INDEX_STORE_ENABLE=NO"`,
150150
};
151151

152152
if (type !== 'expo') {

packages/react-native-builder-bob/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434
"registry": "https://registry.npmjs.org/"
3535
},
3636
"scripts": {
37-
"prepare": "babel --extensions .ts,.tsx src --out-dir lib --source-maps --delete-dir-on-start"
37+
"prepare": "babel --extensions .ts,.tsx src --out-dir lib --source-maps --delete-dir-on-start",
38+
"test": "jest"
39+
},
40+
"jest": {
41+
"testPathIgnorePatterns": [
42+
"/lib/"
43+
]
3844
},
3945
"dependencies": {
4046
"@babel/core": "^7.18.5",
@@ -59,6 +65,7 @@
5965
},
6066
"devDependencies": {
6167
"@babel/cli": "^7.17.10",
68+
"@jest/globals": "^29.7.0",
6269
"@types/babel__core": "^7.1.19",
6370
"@types/browserslist": "^4.15.0",
6471
"@types/cross-spawn": "^6.0.2",
@@ -70,6 +77,7 @@
7077
"@types/prompts": "^2.0.14",
7178
"@types/which": "^2.0.1",
7279
"@types/yargs": "^17.0.10",
73-
"concurrently": "^7.2.2"
80+
"concurrently": "^7.2.2",
81+
"jest": "^29.7.0"
7482
}
7583
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import "@";
2+
import f from "@/f";
3+
import "@something";
4+
import "./@";
5+
import "file";
6+
import { something } from "something";
7+
import "something/somefile";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import "..";
2+
import f from "../f";
3+
import "@something";
4+
import "./@";
5+
import "../f";
6+
import { something } from "another";
7+
import "another/somefile";
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
export * as a from "a";
2+
export * as b from "./b";
3+
export * as c from "./c";
4+
export * as d from "./d";
5+
export * as e from "./e.story";
6+
export * as f from "../f";
7+
export * as pac from "..";
8+
export * as pak from "../";
9+
export * as pax from "../index";
10+
11+
export { a as a1 } from "./a";
12+
export * from "./b";
13+
14+
export type { A } from "./a";
15+
16+
export const foo = "foo";
17+
18+
const bar = "bar";
19+
20+
export { bar };
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export * as a from "a";
2+
export * as b from "./b.mjs";
3+
export * as c from "./c.mjs";
4+
export * as d from "./d";
5+
export * as e from "./e.story.mjs";
6+
export * as f from "../f.mjs";
7+
export * as pac from "../index.mjs";
8+
export * as pak from "../index.mjs";
9+
export * as pax from "../index.mjs";
10+
export { a as a1 } from "./a.mjs";
11+
export * from "./b.mjs";
12+
export type { A } from "./a";
13+
export const foo = "foo";
14+
const bar = "bar";
15+
export { bar };
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import "./a";
2+
import a from "a";
3+
import b from "./b";
4+
import c from "./c";
5+
import d from "./d";
6+
import e from "./e.story";
7+
import f from "../f";
8+
import pac from "..";
9+
import pak from "../";
10+
import pax from "../index";
11+
12+
import { a as a1 } from "./a";
13+
import * as b1 from "./b";
14+
import something, { c as c1 } from "./c";
15+
16+
import type { A } from "./a";

0 commit comments

Comments
 (0)