Skip to content

Commit

Permalink
Rename react-native package to @callstack/react-native-visionos (#35)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
thymikee authored Nov 30, 2023
1 parent 3da6f78 commit 24c9dbc
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .circleci/configurations/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ jobs:
- run:
name: "Run Tests: JavaScript Tests"
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- run_e2e:
platform: js
# - run_e2e:
# platform: js

# Optionally, run disabled tests
- when:
Expand Down
3 changes: 3 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ module.exports = {
platforms: ['ios', 'android'],
},
moduleNameMapper: {
// These mappers allow out-of-tree platforms tests to seamlessly resolve RN imports
'^react-native/(.*)': '<rootDir>/packages/react-native/$1',
'^react-native$': '<rootDir>/packages/react-native/index.js',
// This module is internal to Meta and used by their custom React renderer.
// In tests, we can just use a mock.
'^ReactNativeInternalFeatureFlags$':
Expand Down
6 changes: 3 additions & 3 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "react-native",
"name": "@callstack/react-native-visionos",
"version": "1000.0.0",
"description": "A framework for building native apps using React",
"description": "React Native for visionOS",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/facebook/react-native.git",
"url": "https://github.com/callstack/react-native-visionos.git",
"directory": "packages/react-native"
},
"homepage": "https://reactnative.dev/",
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ module.exports = {
startCommand,
],
platforms: {
visionos: {
npmPackageName: '@callstack/react-native-visionos',
projectConfig: ios.projectConfig,
dependencyConfig: ios.dependencyConfig,
},
ios: {
projectConfig: ios.projectConfig,
dependencyConfig: ios.dependencyConfig,
Expand Down
3 changes: 2 additions & 1 deletion packages/react-native/template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
},
"dependencies": {
"react": "18.2.0",
"react-native": "1000.0.0"
"react-native": "1000.0.0",
"@callstack/react-native-visionos": "1000.0.0"
},
"devDependencies": {
"@babel/core": "^7.20.0",
Expand Down
27 changes: 15 additions & 12 deletions packages/react-native/types/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"types": [],
"jsx": "react",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {"react-native": ["."]}
"compilerOptions": {
"module": "commonjs",
"lib": ["es6"],
"noImplicitAny": true,
"noImplicitThis": true,
"strictFunctionTypes": true,
"strictNullChecks": true,
"types": [],
"jsx": "react",
"noEmit": true,
"forceConsistentCasingInFileNames": true,
"paths": {
"react-native": ["."],
"react-native/*": ["../*"]
}
}
}

0 comments on commit 24c9dbc

Please sign in to comment.