Commit Graph
23 Commits
Author SHA1 Message Date
Kim Brandwijk 208354c051 [expo-env-info] prepare repo to convert expo-env-info to esm (#4312) 2022-04-23 02:01:30 +02:00
Evan Bacon 6e77669f5e feat(dev-server): support new API for Expo SDK 45 (#4306)
* Added support for the new API interface of @react-native-community/cli-server-api

* update types
2022-04-20 15:58:31 -04:00
Evan Bacon 004b1c48a8 [expo cli] use 'better-opn' instead of 'react-dev-utils/openBrowser' (#4018)
* Replace "react-dev-utils/openBrowser" with "better-opn"

* Added types
2021-11-18 23:42:05 -07:00
Evan Bacon 440f8d9e62 [metro config] use project versioning (#3976)
* Respect project metro config versioning

* Added warning and fallback for unversioned

* Disable getModulesPaths

* Remove all unstable monorepo functionality

* Update index.d.ts
2021-11-04 17:13:25 -07:00
Brent Vatne f0ae625006 Revert "Add built-in support for Yarn workspaces (#3945)"
This reverts commit 97c8e68e0e.
2021-11-04 13:00:30 -07:00
Evan Bacon 97c8e68e0e Add built-in support for Yarn workspaces (#3945) 2021-10-28 19:04:56 -06:00
Evan Bacon 25d5c7cc49 [config-plugins] Add property to update iOS bitcode setting (#3933)
* Add property to update iOS bitcode setting

* ignore types

* Added undefined default behavior

* Added custom bitcode config plugin

* Update ExpoConfig.ts

* Update Bitcode.ts
2021-10-22 14:22:10 -06:00
Evan BaconandEvan Bacon 14b646b0d4 [metro-config] Added improved babel loading (#3861)
* Created exotic loader

Added NCL requirements

Update metro-expo-exotic-babel-transformer.ts

wip -- rewrite

wip -- refactor

added warnings

added warn shim

copyright

* Disable `x_facebook_sources` by default

* Update createMatcher-test.ts

* Update package.json

Co-authored-by: Evan Bacon <[email protected]>
2021-09-21 11:14:28 -06:00
Axel Delafosse b23601b6e4 [expo-cli] generate smaller QR codes (#3800) 2021-08-26 22:44:42 +02:00
Kudo Chien 753ed04704 [xdl] Upgrade @expo/ngrok (#3740)
# Why

Fixes #3679

# How

Upgraded ngrok at https://github.com/expo/ngrok/tree/main (no pr, just fork from [upstream v4.1.0](https://github.com/bubenshchykov/ngrok/tree/v4.1.0) and cherry-pick necessary patches). Major changes from the new version:
  - async/await support
  - ship typings in `ngrok.d.ts`
  - `onStatusChange` status callback to fulfill our needs


# Test Plan

since the our ngrok fork is not published yet, this is how i tested:

```sh
cd /path/to/expo-cli/packages/xdl && yarn add -D /path/to/expo/ngrok
cd /path/to/expo-cli && yarn build
/path/to/packages/expo-cli/bin/expo.js init ~/ngrok_test # choose managed blank template

cd ~/ngrok_test
yarn add /path/to/expo/ngrok
/path/to/packages/expo-cli/bin/expo.js start --tunnel

# check tunnel is connected and send a manifest test http request through tunnel url 
```

# Checklist

- [x] Review and publish our [ngrok fork](https://github.com/expo/ngrok/tree/main), perhaps to promote main branch as default branch.
- [x] Update new `@expo/ngrok` version in `packages/xdl/pacakge.json` and `packages/xdl/yarn.lock`
2021-08-05 01:35:32 +08:00
Evan Bacon e64487bc38 [expo cli] various fixes from #3685 (#3736)
* Import standalone changes from bundle command

* Update exp.ts
2021-08-02 15:58:02 -06:00
Evan Bacon 1c2e4760cb Remove old types, and upgrade dev server (#3642) 2021-07-07 19:03:23 -06:00
Kudo Chien 5c2dfafb10 [expo-cli][dev-server] Export hbc as bundle output if js runtime is hermes (#3522)
# Why

If an app is running with hermes runtime, `expo export` for self hosting update should also generate hermes bytecode instead of plain javascript.

# How

Assuming project should setup with pre-defined shape which set the runtime in gradle.properties like expo/expo#13052.
If exporting project is running with hermes, right after calling metro to build js bundles, we should further call `hermesc` to compile hbc.
The sourcemap also needs to re-compose by metro-source-map.
The overall flow is reference from [react-native's react.gradle](https://github.com/facebook/react-native/blob/0.63-stable/react.gradle).

# Test Plan

### Unit Test

```
HermesBundler-test.ts
  parseGradleProperties
    should return array of key-value tuple (2 ms)
    should keep "=" in value if there are multiple "="
    should exclude comment (1 ms)
  getHermesBytecodeBundleVersionAsync
    should return hermes bytecode version 74 for plain.74.hbc (13 ms)
    should throw exception for plain javascript file (5 ms)
    should throw exception for nonexistent file
  isHermesBytecodeBundleAsync
    should return true for hermes bytecode bundle file
    should return false for plain javascript file
    should throw exception for nonexistent file
```

### E2E Test

```
export-test.ts
    should export hbc bundle if running with hermes (31292 ms)
```
2021-05-31 22:00:45 +08:00
Kudo Chien de7089f7ae [dev-server] Add /inspector to for querying or opening js inspector (#3495)
# Why

For dev-menu to launch Hermes inspector.

# How

Through from metro-inspector-proxy (http://localhost:8081/json/list), we could get the url to open inspector. This requires manual steps to open inspector.
In this PR, we will launch chromium to open the inspector automatically.

# Test Plan

### Unit Test

```
  createJsInspectorMiddleware
    should return specific app entity for GET request with given applicationId (5 ms)
    should return 404 for GET request with nonexistent applicationId (1 ms)
    should return 400 for GET request without parameters
    should open browser for PUT request with given applicationId (14 ms)
```
2021-05-29 02:06:27 +08:00
Dominik Sokal 469200aad3 [config-plugins] make bundle identifier getter aware of multiple targets (#3483)
* [config-plugins] rename getBuildConfigurationForId -> getBuildConfigurationsForListId

* [config-plugins] make getBundleIdentifierFromPbxproj return bundle id for a named target

* [config-plugins] make setProvisioningProfileForPbxprojAsync set provisioning profile only for a particular build configuration

* address PR feedback
2021-05-25 14:02:32 +02:00
Ville Immonen cac8bdfbd7 Remove unused detach code from XDL and rename the package (#3268)
* Rename @expo/xdl to xdl
* Remove unused modules from the xdl interface
* Remove unused TurtleApi
* Remove unused Detach.detachAsync
* Remove unused code in src/detach folder
  - Remove StandaloneContextService (this code now always runs in user context)
  - Remove unused functions in ExponentTools and IosWorkspace
  - Remove unused modules
  - All of the remaining files in src/detach folder are now TypeScript for easier refactoring
* Remove `xdl.Modules`
2021-03-15 15:26:36 +02:00
Evan Bacon ef460d6fd5 added method for adding frameworks (#2997) 2020-12-06 12:07:40 -08:00
Evan Bacon 9540761943 added types for envinfo (#2924)
* added types for envinfo

* Update index.d.ts

* Update diagnostics.ts
2020-11-20 13:50:45 +01:00
Bartłomiej Bukowski 1b04d51a36 [xdl, schemer]<fix>: Fixed reading schema with $ref keywords (#2791) 2020-10-20 08:58:50 +02:00
Evan Bacon 6ba2cf1437 [config] disjointed features from plugins ios (#2811)
* Added invalid config warning

* Update Paths-test.ts

* unify utility

* Fix entitlements resolution

* Create react-native-project.ts

* Added deprecation warning for androidStatusBarColor
2020-10-19 16:30:25 +02:00
Evan Bacon 0e0f55280d Globally type xcode module (#2592)
* Move typed xcode module from splash screen PR

* Migrate all instance to use the new xcode types

* Update Xcodeproj.ts

* implement relative path
2020-09-07 16:10:16 +02:00
Ville Immonen b125430c2e feat: bundle JS without file watching or HTTP (#2149)
When EXPO_USE_DEV_SERVER is set to `true`, the in-process Metro is used for bundling.
2020-08-03 18:20:18 +03:00
Ville Immonen c0c7b5bba6 chore: clean up @expo/babel-preset-cli (#2131) 2020-05-15 12:17:09 -07:00