Skip to content

Commit 618e099

Browse files
thymikeeokwasniewski
authored andcommitted
Rename react-native package to @callstack/react-native-visionos (#35)
* rename react-native package to @callstack/react-native-visionos * fix typo * Make JS and TS tests independent of react-native package name * change name in template * replace more refs in e2e tests * revert tests changes * disable js e2e tests for visionos * bring back react-native for other platforms compat * ci: run js, no e2e js
1 parent df0004d commit 618e099

File tree

6 files changed

+30
-18
lines changed

6 files changed

+30
-18
lines changed

.circleci/configurations/jobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ jobs:
9696
- run:
9797
name: "Run Tests: JavaScript Tests"
9898
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
99-
- run_e2e:
100-
platform: js
99+
# - run_e2e:
100+
# platform: js
101101

102102
# Optionally, run disabled tests
103103
- when:

jest.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ module.exports = {
4141
platforms: ['ios', 'android'],
4242
},
4343
moduleNameMapper: {
44+
// These mappers allow out-of-tree platforms tests to seamlessly resolve RN imports
45+
'^react-native/(.*)': '<rootDir>/packages/react-native/$1',
46+
'^react-native$': '<rootDir>/packages/react-native/index.js',
4447
// This module is internal to Meta and used by their custom React renderer.
4548
// In tests, we can just use a mock.
4649
'^ReactNativeInternalFeatureFlags$':

packages/react-native/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"name": "react-native",
2+
"name": "@callstack/react-native-visionos",
33
"version": "1000.0.0",
4-
"description": "A framework for building native apps using React",
4+
"description": "React Native for visionOS",
55
"license": "MIT",
66
"repository": {
77
"type": "git",
8-
"url": "https://github.com/facebook/react-native.git",
8+
"url": "https://github.com/callstack/react-native-visionos.git",
99
"directory": "packages/react-native"
1010
},
1111
"homepage": "https://reactnative.dev/",

packages/react-native/react-native.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ module.exports = {
5454
codegenCommand,
5555
],
5656
platforms: {
57+
visionos: {
58+
npmPackageName: '@callstack/react-native-visionos',
59+
projectConfig: ios.projectConfig,
60+
dependencyConfig: ios.dependencyConfig,
61+
},
5762
ios: {
5863
projectConfig: ios.projectConfig,
5964
dependencyConfig: ios.dependencyConfig,

packages/react-native/template/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
},
1212
"dependencies": {
1313
"react": "18.2.0",
14-
"react-native": "1000.0.0"
14+
"react-native": "1000.0.0",
15+
"@callstack/react-native-visionos": "1000.0.0"
1516
},
1617
"devDependencies": {
1718
"@babel/core": "^7.20.0",
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
{
2-
"compilerOptions": {
3-
"module": "commonjs",
4-
"lib": ["es6"],
5-
"noImplicitAny": true,
6-
"noImplicitThis": true,
7-
"strictFunctionTypes": true,
8-
"strictNullChecks": true,
9-
"types": [],
10-
"jsx": "react",
11-
"noEmit": true,
12-
"forceConsistentCasingInFileNames": true,
13-
"paths": {"react-native": ["."]}
2+
"compilerOptions": {
3+
"module": "commonjs",
4+
"lib": ["es6"],
5+
"noImplicitAny": true,
6+
"noImplicitThis": true,
7+
"strictFunctionTypes": true,
8+
"strictNullChecks": true,
9+
"types": [],
10+
"jsx": "react",
11+
"noEmit": true,
12+
"forceConsistentCasingInFileNames": true,
13+
"paths": {
14+
"react-native": ["."],
15+
"react-native/*": ["../*"]
1416
}
1517
}
18+
}

0 commit comments

Comments
 (0)