Skip to content

Commit

Permalink
chore(react-native): remove deprecated options in the code (#19665)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi authored Oct 17, 2023
1 parent 476e13d commit aaea8f9
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 86 deletions.
11 changes: 0 additions & 11 deletions docs/generated/packages/react-native/executors/run-android.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
"examples": ["debug", "release"],
"x-priority": "important"
},
"packager": {
"type": "boolean",
"description": "Launch packager while building",
"default": true
},
"port": {
"type": "number",
"description": "The port where the packager server is listening on.",
Expand Down Expand Up @@ -95,12 +90,6 @@
"type": "boolean",
"description": "Explicitly select build type and flavour to use before running a build"
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add sync-deps to dependsOn for this target in project.json instead",
"default": true
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
Expand Down
17 changes: 0 additions & 17 deletions docs/generated/packages/react-native/executors/run-ios.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,28 +76,11 @@
],
"description": "Custom params that will be passed to xcodebuild command."
},
"install": {
"type": "boolean",
"description": "Runs `pod install` for native modules before building iOS app.",
"default": true,
"x-deprecated": "Add `pod-install` to dependsOn for this target in project.json instead."
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add `sync-deps` to dependsOn for this target in project.json instead.",
"default": true
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
"default": false
},
"packager": {
"type": "boolean",
"description": "Launch packager while building",
"default": true
},
"binaryPath": {
"type": "string",
"description": "Path relative to project root where pre-built .app binary lives."
Expand Down
2 changes: 1 addition & 1 deletion packages/expo/src/executors/run/run.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function runCliRun(
});
}

const nxOptions = ['sync', 'platform', 'install', 'clean'];
const nxOptions = ['platform', 'clean'];
const iOSOptions = ['xcodeConfiguration', 'schema'];
const androidOptions = ['variant'];
/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const customConfig = {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
blockList: exclusionList([/^(?!.*node_modules).*\/dist\/.*/]),
unstable_enableSymlinks: true,
// unstable_enableSymlinks: true,
// unstable_enablePackageExports: true,
},
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,8 @@ function runCliBuild(
});
}

const nxOptions = ['sync', 'packager'];
const startOptions = ['port', 'resetCache'];
const deprecatedOptions = ['apk', 'debug', 'gradleTask'];

function createBuildAndroidOptions(options: ReactNativeBuildAndroidOptions) {
return getCliOptions<ReactNativeBuildAndroidOptions>(options, [
...nxOptions,
...startOptions,
...deprecatedOptions,
]);
return getCliOptions<ReactNativeBuildAndroidOptions>(options, startOptions);
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,10 @@ function runCliBuildIOS(
});
}

const nxOptions = ['sync', 'install', 'packager'];
const startOptions = ['port', 'resetCache'];

function createBuildIOSOptions(options: ReactNativeBuildIosOptions) {
return getCliOptions<ReactNativeBuildIosOptions>(
options,
[...nxOptions, ...startOptions],
['buildFolder']
);
return getCliOptions<ReactNativeBuildIosOptions>(options, startOptions, [
'buildFolder',
]);
}
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,12 @@ function runCliRunAndroid(
});
}

const nxOptions = ['sync', 'packager'];
const startOptions = ['port', 'resetCache'];
const deprecatedOptions = ['variant', 'jetifier'];

function createRunAndroidOptions(options: ReactNativeRunAndroidOptions) {
return getCliOptions<ReactNativeRunAndroidOptions>(
options,
[...nxOptions, ...startOptions, ...deprecatedOptions],
['appId', 'appIdSuffix', 'deviceId']
);
return getCliOptions<ReactNativeRunAndroidOptions>(options, startOptions, [
'appId',
'appIdSuffix',
'deviceId',
]);
}
11 changes: 0 additions & 11 deletions packages/react-native/src/executors/run-android/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,6 @@
"examples": ["debug", "release"],
"x-priority": "important"
},
"packager": {
"type": "boolean",
"description": "Launch packager while building",
"default": true
},
"port": {
"type": "number",
"description": "The port where the packager server is listening on.",
Expand Down Expand Up @@ -95,12 +90,6 @@
"type": "boolean",
"description": "Explicitly select build type and flavour to use before running a build"
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add sync-deps to dependsOn for this target in project.json instead",
"default": true
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
Expand Down
10 changes: 3 additions & 7 deletions packages/react-native/src/executors/run-ios/run-ios.impl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,10 @@ function runCliRunIOS(
});
}

const nxOptions = ['sync', 'install', 'packager'];
const startOptions = ['port', 'resetCache'];
const deprecatedOptions = ['xcodeConfiguration'];

function createRunIOSOptions(options: ReactNativeRunIosOptions) {
return getCliOptions<ReactNativeRunIosOptions>(
options,
[...nxOptions, ...startOptions, ...deprecatedOptions],
['buildFolder']
);
return getCliOptions<ReactNativeRunIosOptions>(options, startOptions, [
'buildFolder',
]);
}
17 changes: 0 additions & 17 deletions packages/react-native/src/executors/run-ios/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,28 +82,11 @@
],
"description": "Custom params that will be passed to xcodebuild command."
},
"install": {
"type": "boolean",
"description": "Runs `pod install` for native modules before building iOS app.",
"default": true,
"x-deprecated": "Add `pod-install` to dependsOn for this target in project.json instead."
},
"sync": {
"type": "boolean",
"description": "Syncs npm dependencies to `package.json` (for React Native autolink).",
"x-deprecated": "Add `sync-deps` to dependsOn for this target in project.json instead.",
"default": true
},
"resetCache": {
"type": "boolean",
"description": "Resets metro cache.",
"default": false
},
"packager": {
"type": "boolean",
"description": "Launch packager while building",
"default": true
},
"binaryPath": {
"type": "string",
"description": "Path relative to project root where pre-built .app binary lives."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const customConfig = {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
blockList: exclusionList([/^(?!.*node_modules).*\/dist\/.*/]),
unstable_enableSymlinks: true,
// unstable_enableSymlinks: true,
// unstable_enablePackageExports: true,
},
};
Expand Down

1 comment on commit aaea8f9

@vercel
Copy link

@vercel vercel bot commented on aaea8f9 Oct 17, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nx-dev – ./

nx-dev-git-master-nrwl.vercel.app
nx-dev-nrwl.vercel.app
nx-five.vercel.app
nx.dev

Please sign in to comment.