Skip to content

Commit

Permalink
feat(detox): upgrade @config-plugins/detox to 7
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Feb 23, 2024
1 parent c2581dc commit aa38b3e
Show file tree
Hide file tree
Showing 9 changed files with 45 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/generated/packages/expo/executors/serve.json
Expand Up @@ -14,7 +14,7 @@
"port": {
"type": "number",
"description": "Port to start the native Metro bundler on (does not apply to web or tunnel)",
"default": 19000,
"default": 4200,
"alias": "p"
},
"clear": {
Expand Down
17 changes: 17 additions & 0 deletions packages/detox/migrations.json
Expand Up @@ -108,6 +108,23 @@
"alwaysAddToPackageJson": false
}
}
},
"18.1.0": {
"version": "18.1.0-beta.0",
"packages": {
"detox": {
"version": "~20.18.1",
"alwaysAddToPackageJson": false
},
"@config-plugins/detox": {
"version": "~7.0.0",
"alwaysAddToPackageJson": false
},
"@testing-library/jest-dom": {
"version": "~6.4.2",
"alwaysAddToPackageJson": false
}
}
}
}
}
6 changes: 5 additions & 1 deletion packages/detox/plugin.ts
@@ -1 +1,5 @@
export { createNodes, DetoxPluginOptions } from './src/plugins/plugin';
export {
createNodes,
createDependencies,
DetoxPluginOptions,
} from './src/plugins/plugin';
6 changes: 3 additions & 3 deletions packages/detox/src/utils/versions.ts
@@ -1,5 +1,5 @@
export const nxVersion = require('../../package.json').version;

export const detoxVersion = '^20.16.0';
export const testingLibraryJestDom = '6.2.0';
export const configPluginsDetoxVersion = '~6.0.0'; // only required for expo
export const detoxVersion = '~20.18.1';
export const testingLibraryJestDom = '~6.4.2';
export const configPluginsDetoxVersion = '~7.0.0'; // only required for expo
6 changes: 5 additions & 1 deletion packages/expo/plugin.ts
@@ -1 +1,5 @@
export { createNodes, ExpoPluginOptions } from './plugins/plugin';
export {
createNodes,
createDependencies,
ExpoPluginOptions,
} from './plugins/plugin';
2 changes: 1 addition & 1 deletion packages/expo/src/executors/serve/schema.json
Expand Up @@ -11,7 +11,7 @@
"port": {
"type": "number",
"description": "Port to start the native Metro bundler on (does not apply to web or tunnel)",
"default": 19000,
"default": 4200,
"alias": "p"
},
"clear": {
Expand Down
6 changes: 5 additions & 1 deletion packages/expo/src/executors/serve/serve.impl.ts
Expand Up @@ -84,7 +84,11 @@ function serveAsync(

childProcess.stdout.on('data', (data) => {
process.stdout.write(data);
if (data.toString().includes('Bundling complete')) {
if (
data
.toString()
.includes('Bundling complete' || data.toString().includes('Bundled'))
) {
resolve(childProcess);
}
});
Expand Down
6 changes: 3 additions & 3 deletions packages/expo/src/generators/application/lib/add-e2e.ts
Expand Up @@ -19,8 +19,8 @@ export async function addE2e(
const port = hasPlugin ? 8081 : 4200;
switch (options.e2eTestRunner) {
case 'cypress': {
const hasNxExportPlugin = hasExpoPlugin(tree);
if (!hasNxExportPlugin) {
const hasNxExpoPlugin = hasExpoPlugin(tree);
if (!hasNxExpoPlugin) {
webStaticServeGenerator(tree, {
buildTarget: `${options.projectName}:export`,
targetName: 'serve-static',
Expand Down Expand Up @@ -50,7 +50,7 @@ export async function addE2e(
devServerTarget: `${options.projectName}:serve`,
port,
baseUrl: `http://localhost:${port}`,
ciWebServerCommand: hasNxExportPlugin
ciWebServerCommand: hasNxExpoPlugin
? `nx run ${options.projectName}:serve-static`
: undefined,
jsx: true,
Expand Down
6 changes: 5 additions & 1 deletion packages/react-native/plugin.ts
@@ -1 +1,5 @@
export { createNodes, ReactNativePluginOptions } from './plugins/plugin';
export {
createNodes,
createDependencies,
ReactNativePluginOptions,
} from './plugins/plugin';

0 comments on commit aa38b3e

Please sign in to comment.