Skip to content

Commit 99db275

Browse files
1 parent 4e4eb23 commit 99db275

File tree

46 files changed

+22896
-31564
lines changed

Some content is hidden

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

46 files changed

+22896
-31564
lines changed

.gitignore

-14
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,6 @@ build
3636
#
3737
npm-debug.log
3838

39-
# Yarn
40-
#
41-
yarn-error.log
42-
.yarn/*
43-
!.yarn/patches
44-
!.yarn/plugins
45-
!.yarn/releases
46-
!.yarn/sdks
47-
!.yarn/versions
48-
49-
# nx
50-
#
51-
.nx/*
52-
5339
# Lerna
5440
#
5541
lerna-debug.log

.prettierignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,4 @@ allure-results
2323
pluginTemplates
2424
templateFiles/**/*
2525
!/**/*/*.json
26-
*.d.ts
27-
/.nx/workspace-data
26+
*.d.ts

.yarn/releases/yarn-3.6.4.cjs

-874
This file was deleted.

.yarnrc.yml

-5
This file was deleted.

lerna.json

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
{
22
"version": "independent",
33
"npmClient": "yarn",
4-
"packages": ["packages/*"],
5-
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
4+
"useWorkspaces": true,
5+
"command": {
6+
"bootstrap": {
7+
"npmClientArgs": ["--no-package-lock", "--unsafe-perm=true", "--no-optional"]
8+
}
9+
}
610
}

nx.json

-10
This file was deleted.

package.json

+20-9
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,8 @@
5656
"url": "git://github.com/flexn-io/renative.git"
5757
},
5858
"scripts": {
59-
"bootstrap": "yarn install && yarn setup",
60-
"bootstrap-clean": "yarn clean-gitignore && yarn install && yarn setup",
61-
"setup": "yarn build && yarn link:rnv && yarn generateSchema && yarn resetOverrides",
59+
"bootstrap": "npx lerna@6 bootstrap && yarn build && yarn link:rnv && yarn generateSchema && yarn resetOverrides",
60+
"bootstrap-clean": "yarn clean-gitignore && yarn bootstrap",
6261
"build": "lerna run build",
6362
"clean-gitignore": "git clean -f -d -i -X",
6463
"compile": "npx lerna run compile",
@@ -69,7 +68,7 @@
6968
"generateSchema": "npx rnv hooks run -x generateSchema && yarn prettier-write-json",
7069
"link:rnv": "npm r rnv -g && cd packages/rnv && npm link",
7170
"lint": "npx eslint ./packages",
72-
"postinstall": " npx jetify && npx husky install",
71+
"postinstall": "npx lerna link --force-local && npx jetify && npx husky install",
7372
"pre-publish": "yarn build && yarn link:rnv && yarn lint && yarn test && rnv hooks run -x prePublish && rnv hooks run -x gitCommitAndTag && yarn generateSchema",
7473
"prettier-write-all": "npx prettier '**/*.{js,jsx,ts,tsx,mjs,cjs,json,md}' --write --config .prettierrc.js",
7574
"prettier-write-json": "npx prettier '**/{package.json,renative.json,renative.**.json,rnv.json,rnv.**.json,renative-1.0.schema.json}' --write --config .prettierrc.js",
@@ -82,9 +81,6 @@
8281
"watch": "npx lerna exec yarn watch --parallel",
8382
"watch-alt": "npx lerna run compile & npx lerna watch -- lerna run compile"
8483
},
85-
"workspaces": [
86-
"packages/*"
87-
],
8884
"devDependencies": {
8985
"@babel/eslint-parser": "7.17.0",
9086
"@flexn/eslint-config": "1.0.0",
@@ -113,7 +109,7 @@
113109
"jest": "^29.6.3",
114110
"jest-environment-jsdom": "29.7.0",
115111
"json-diff": "1.0.6",
116-
"lerna": "^8.1.9",
112+
"lerna": "^6.6.2",
117113
"lint-staged": "12.3.4",
118114
"madge": "6.1.0",
119115
"prettier": "2.8.8",
@@ -144,5 +140,20 @@
144140
"eslint"
145141
]
146142
},
147-
"packageManager": "[email protected]"
143+
"workspaces": {
144+
"packages": [
145+
"packages/*"
146+
],
147+
"nohoist": [
148+
"html-webpack-plugin",
149+
"html-webpack-harddisk-plugin",
150+
"webpack",
151+
"mini-css-extract-plugin",
152+
"execa",
153+
"**/@flexn/graybox",
154+
"**/appium-*",
155+
"**/@wdio/*",
156+
"**/@react-native/metro-babel-transformer"
157+
]
158+
}
148159
}

packages/adapter/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
"watch": "tsc --watch --preserveWatchOutput"
3030
},
3131
"dependencies": {
32-
"babel-plugin-module-resolver": "^5.0.0",
33-
"rimraf": "2.6.2",
34-
"typescript": "5.2.2"
32+
"babel-plugin-module-resolver": "^5.0.0"
3533
},
3634
"publishConfig": {
3735
"access": "public"

packages/app-harness/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,17 @@
5252
"react": "18.3.1",
5353
"react-art": "18.3.1",
5454
"react-dom": "18.3.1",
55-
"react-native": "0.76.3",
55+
"react-native": "0.76.5",
5656
"react-native-carplay": "2.3.0",
5757
"react-native-fs": "2.20.0",
5858
"react-native-gesture-handler": "2.21.2",
5959
"react-native-google-cast": "4.8.3",
6060
"react-native-orientation-locker": "1.7.0",
6161
"react-native-permissions": "5.2.1",
62-
"react-native-photo-editor": "github:AppGyver/react-native-photo-editor#0.1.2",
62+
"react-native-photo-editor": "github:AppGyver/react-native-photo-editor#v0.1.2",
6363
"react-native-safe-area-context": "5.0.0",
6464
"react-native-splash-screen": "3.3.0",
65-
"react-native-tvos": "0.76.3-0",
65+
"react-native-tvos": "0.76.5-0",
6666
"react-native-web": "0.19.12",
6767
"rn-fetch-blob": "0.12.0"
6868
},

packages/app-harness/renative.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
"disabled": true
223223
},
224224
"pluginDependencies": null,
225-
"version": "github:AppGyver/react-native-photo-editor#0.1.2"
225+
"version": "github:AppGyver/react-native-photo-editor#v0.1.2"
226226
},
227227
"react-native-permissions": {
228228
"ios": {

packages/build-hooks-git/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,7 @@
2828
},
2929
"dependencies": {
3030
"rimraf": "2.6.2",
31-
"simple-git": "3.24.0",
32-
"typescript": "5.2.2"
31+
"simple-git": "3.24.0"
3332
},
3433
"peerDependencies": {
3534
"@rnv/core": "^1.9.0-rc.0"

packages/build-hooks-schema/package.json

-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@
2727
"watch": "tsc --watch --preserveWatchOutput"
2828
},
2929
"dependencies": {
30-
"rimraf": "2.6.2",
31-
"typescript": "5.2.2",
3230
"zod": "3.23.8",
3331
"zod-to-json-schema": "3.23.0"
3432
},

packages/cli/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@
3737
"chalk": "4.1.0",
3838
"commander": "12.1.0",
3939
"inquirer": "8.2.0",
40-
"inquirer-autocomplete-prompt": "2.0.1",
41-
"rimraf": "2.6.2",
42-
"typescript": "5.2.2"
40+
"inquirer-autocomplete-prompt": "2.0.1"
4341
},
4442
"devDependencies": {
4543
"@types/inquirer-autocomplete-prompt": "^3.0.3"

packages/config-templates/renative.templates.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@
454454
"version": "0.5.9"
455455
},
456456
"@react-native-community/cli": {
457-
"disableNpm": false,
457+
"disableNpm": true,
458458
"version": "15.0.1",
459459
"supportedPlatforms": ["tvos", "ios"]
460460
},
@@ -1560,7 +1560,7 @@
15601560
"URL_NAME": "",
15611561
"URL_SCHEME": ""
15621562
},
1563-
"version": "0.76.3"
1563+
"version": "0.76.5"
15641564
},
15651565
"react-native-actionsheet": {
15661566
"version": "2.4.2"
@@ -3363,7 +3363,7 @@
33633363
}
33643364
},
33653365
"react-native-tvos": {
3366-
"version": "0.76.3-0",
3366+
"version": "0.76.5-0",
33673367
"supportedPlatforms": ["tvos", "firetv", "androidtv"]
33683368
},
33693369
"react-native-tvos-controller": {

packages/core/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,5 @@
5858
"publishConfig": {
5959
"access": "public"
6060
},
61-
"title": "ReNative Core SDK",
62-
"packageManager": "[email protected]"
61+
"title": "ReNative Core SDK"
6362
}

packages/core/src/projects/npm.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ import { isOfflineMode } from './utils';
1212
export const checkIfProjectAndNodeModulesExists = async () => {
1313
logDefault('checkIfProjectAndNodeModulesExists');
1414

15-
// const c = getContext();
15+
const c = getContext();
1616

17-
// if (c.paths.project.configExists && !fsExistsSync(c.paths.project.nodeModulesDir)) {
18-
// c._requiresNpmInstall = false;
19-
// logInfo('node_modules folder is missing. INSTALLING...');
20-
// await installPackageDependencies();
21-
// }
17+
if (c.paths.project.configExists && !fsExistsSync(c.paths.project.nodeModulesDir)) {
18+
c._requiresNpmInstall = false;
19+
logInfo('node_modules folder is missing. INSTALLING...');
20+
await installPackageDependencies();
21+
}
2222
};
2323

2424
export const checkNpxIsInstalled = async () => {

packages/core/src/schema/defaults.ts

-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,4 @@ export const DEFAULTS = {
1010
author: 'Unknown',
1111
certificateProfile: 'RNVanillaCert',
1212
signingConfig: 'Debug',
13-
yarnVersion: '3.6.4',
1413
};

packages/engine-core/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
"iocane": "4.0.0",
3535
"kill-port": "1.6.1",
3636
"lodash": "4.17.21",
37-
"rimraf": "2.6.2",
3837
"tar": "6.2.1",
3938
"typescript": "5.2.2"
4039
},

packages/engine-core/src/tasks/bootstrap/__tests__/taskNew.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import bookmarkTemplate from '../questions/bookmarkTemplate';
2424
import configTemplates from '../questions/configTemplates';
2525
import projectFolder from '../questions/projectFolder';
2626
import installProject from '../questions/installProject';
27-
import inquiryYarnVersion from '../questions/configureYarnVersion';
27+
import inquiryHandlePeerDepsNpm from '../questions/resolvePeerDepsNPM';
2828

2929
jest.mock('@rnv/core');
3030
jest.mock('lodash/set');
@@ -48,7 +48,7 @@ jest.mock('../questions/projectFolder');
4848
jest.mock('../questions/installProject');
4949
jest.mock('../questionHelpers');
5050
jest.mock('../questions/appConfigs');
51-
jest.mock('../questions/configureYarnVersion');
51+
jest.mock('../questions/resolvePeerDepsNPM');
5252

5353
beforeEach(() => {
5454
createRnvContext();
@@ -115,6 +115,6 @@ describe('taskNew tests', () => {
115115
expect(configTemplates).toHaveBeenCalled();
116116
expect(projectFolder).toHaveBeenCalled();
117117
expect(installProject).toHaveBeenCalled();
118-
expect(inquiryYarnVersion).toHaveBeenCalled();
118+
expect(inquiryHandlePeerDepsNpm).toHaveBeenCalled();
119119
});
120120
});

packages/engine-core/src/tasks/bootstrap/questions/configureYarnVersion.ts

-29
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import { getContext, inquirerPrompt, isYarnInstalled, writeFileSync } from '@rnv/core';
2+
import path from 'path';
3+
4+
const Question = async () => {
5+
if (isYarnInstalled()) return;
6+
const c = getContext();
7+
const content = 'legacy-peer-deps=true';
8+
9+
const { confirmCreateNpmrc } = await inquirerPrompt({
10+
name: 'confirmCreateNpmrc',
11+
type: 'confirm',
12+
message: `To avoid the issue with the resolving peer dependencies .npmrc file with content: "${content}" will be added to your project`,
13+
});
14+
15+
if (confirmCreateNpmrc) {
16+
const npmrcPath = path.join(c.paths.project.dir, '.npmrc');
17+
18+
writeFileSync(npmrcPath, content);
19+
}
20+
};
21+
22+
export default Question;

packages/engine-core/src/tasks/bootstrap/taskNew.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import inquiryBookmarkTemplate from './questions/bookmarkTemplate';
2424
import inquiryAppConfigs from './questions/appConfigs';
2525
import inquiryConfigTemplates from './questions/configTemplates';
2626
import inquiryProjectInstall from './questions/installProject';
27-
import inquiryYarnVersion from './questions/configureYarnVersion';
27+
import inquiryHandlePeerDepsNpm from './questions/resolvePeerDepsNPM.ts';
2828
import inquiryInstallEngines from './questions/installEngines';
2929
import {
3030
configureConfigOverrides,
@@ -48,7 +48,6 @@ export default createTask({
4848
await inquiryHasNodeModules(payload);
4949
await inquiryWorkspace(payload);
5050
await saveProgressIntoProjectConfig(payload);
51-
await inquiryYarnVersion(payload);
5251
// Switch execution context to new directory
5352
await processChdirToProject();
5453
// Install template only (this avoids whole npm project install)
@@ -76,6 +75,7 @@ export default createTask({
7675
await configureTemplateFiles();
7776
await generateLocalJsonSchemas();
7877
await inquiryAppConfigs(payload);
78+
await inquiryHandlePeerDepsNpm();
7979
await inquiryInstallEngines(payload);
8080
// Telementry
8181
await telemetryNewProject(payload);

packages/engine-lightning/package.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@
3636
"@lightningjs/sdk": "5.5.1",
3737
"@rnv/sdk-tizen": "1.9.0-rc.0",
3838
"@rnv/sdk-utils": "1.9.0-rc.0",
39-
"@rnv/sdk-webos": "1.9.0-rc.0",
40-
"rimraf": "2.6.2",
41-
"typescript": "5.2.2"
39+
"@rnv/sdk-webos": "1.9.0-rc.0"
4240
},
4341
"peerDependencies": {
4442
"@rnv/core": "^1.9.0-rc.0"

packages/engine-rn-electron/package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,15 @@
3333
"watch": "tsc --watch --preserveWatchOutput"
3434
},
3535
"dependencies": {
36-
"@react-native/babel-preset": "0.76.3",
36+
"@react-native/babel-preset": "0.76.5",
3737
"@rnv/adapter": "1.9.0-rc.0",
3838
"@rnv/sdk-react-native": "1.9.0-rc.0",
3939
"@rnv/sdk-utils": "1.9.0-rc.0",
4040
"@rnv/sdk-webpack": "1.9.0-rc.0",
4141
"electron": "26.3.0",
4242
"electron-builder": "24.13.3",
4343
"electron-notarize": "1.2.2",
44-
"metro-react-native-babel-preset": "0.76.8",
45-
"rimraf": "2.6.2",
46-
"typescript": "5.2.2"
44+
"metro-react-native-babel-preset": "0.76.8"
4745
},
4846
"peerDependencies": {
4947
"@rnv/core": "^1.9.0-rc.0"

0 commit comments

Comments
 (0)