Skip to content

Commit

Permalink
[dev-menu] Created versioned plugins (#12715)
Browse files Browse the repository at this point in the history
* Created versioned plugins

* changelog
  • Loading branch information
EvanBacon authored and tsapeta committed Apr 26, 2021
1 parent 3217ee2 commit 2ddf039
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 12 deletions.
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
6 changes: 3 additions & 3 deletions packages/expo-dev-launcher/plugin/build/withDevLauncher.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-launcher/plugin/build/withDevLauncher.js

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);

0 comments on commit 2ddf039

Please sign in to comment.