Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dev-menu] Created versioned plugins #12715

Merged
merged 2 commits into from
Apr 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/expo-dev-launcher/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### 🎉 New features

- [plugin] Prevent plugin from running multiple times in a single process. ([#12715](https://github.com/expo/expo/pull/12715) by [@EvanBacon](https://github.com/EvanBacon))
- [plugin] Added AppDelegate tests. ([#12651](https://github.com/expo/expo/pull/12651) by [@EvanBacon](https://github.com/EvanBacon))
- Added the ability to open managed apps inside the dev-launcher. ([#12698](https://github.com/expo/expo/pull/12698) by [@lukmccall](https://github.com/lukmccall))

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions packages/expo-dev-launcher/plugin/src/withDevLauncher.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
import {
ConfigPlugin,
createRunOncePlugin,
ExportedConfigWithProps,
WarningAggregator,
withDangerousMod,
withMainActivity,
WarningAggregator,
ExportedConfigWithProps,
} from '@expo/config-plugins';
import { ExpoConfig } from '@expo/config-types';
import fs from 'fs';
import path from 'path';

import { withDevLauncherAppDelegate } from './withDevLauncherAppDelegate';

const pkg = require('expo-dev-launcher/package.json');

const DEV_LAUNCHER_ANDROID_IMPORT = 'expo.modules.devlauncher.DevLauncherController';
const DEV_LAUNCHER_ON_NEW_INTENT = `
@Override
Expand Down Expand Up @@ -183,4 +186,4 @@ const withDevLauncher = (config: ExpoConfig) => {
return config;
};

export default withDevLauncher;
export default createRunOncePlugin(withDevLauncher, pkg.name, pkg.version);
1 change: 1 addition & 0 deletions packages/expo-dev-menu/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

### 🎉 New features

- [plugin] Prevent plugin from running multiple times in a single process. ([#12715](https://github.com/expo/expo/pull/12715) by [@EvanBacon](https://github.com/EvanBacon))
- [plugin] Added AppDelegate tests. ([#12651](https://github.com/expo/expo/pull/12651) by [@EvanBacon](https://github.com/EvanBacon))
- Float dev menu above RedBox on iOS. ([#12632](https://github.com/expo/expo/pull/12632) by [@EvanBacon](https://github.com/EvanBacon))

Expand Down
6 changes: 3 additions & 3 deletions packages/expo-dev-menu/plugin/build/withDevMenu.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/expo-dev-menu/plugin/build/withDevMenu.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion packages/expo-dev-menu/plugin/src/withDevMenu.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {
ConfigPlugin,
createRunOncePlugin,
ExportedConfigWithProps,
WarningAggregator,
withDangerousMod,
Expand All @@ -11,6 +12,8 @@ import path from 'path';

import { withDevMenuAppDelegate } from './withDevMenuAppDelegate';

const pkg = require('expo-dev-menu/package.json');

const DEV_MENU_ANDROID_IMPORT = 'expo.modules.devmenu.react.DevMenuAwareReactActivity';
const DEV_MENU_ACTIVITY_CLASS = 'public class MainActivity extends DevMenuAwareReactActivity {';

Expand Down Expand Up @@ -114,4 +117,4 @@ const withDevMenu = (config: ExpoConfig) => {
return config;
};

export default withDevMenu;
export default createRunOncePlugin(withDevMenu, pkg.name, pkg.version);