Commit Graph
35 Commits
Author SHA1 Message Date
Evan BaconandEvan Bacon 3052b9d0c7 [webpack] Upgrade to Webpack 5 (#3763)
* Upgraded deps

* Update withDevServer.ts

* Running with Webpack 5

* New logging

* Fixed asset creation

* Fixed sockets

* Update TerminalUI.ts

* Added bundling support

* Update TerminalUI.ts

* fixed startup logic

* Updated dev tools web start

* Update startAsync.ts

* Update yarn.lock

* [wip] working again

* remove unused

* wip -- native fast refresh

* remove unused

* wip

* fixed fast refresh dev server across web/ios

* support arbitrary ports

* fixed image loading on web

* fixup refresh

* wip multi-config -- not working with fast refresh

* wip kinda working

* wip -- native fast refresh working

* wip -- working all platforms

* Added asset Metro middleware interop

* Disable react-error-overlay

* add web stuff back

* improve symbolication

* added proper patches

* patch package

* Update webpackHotDevClient.ts

* Update __webpack_require__.l.ts

* wip -- no merge

* wip -- no merge

* wip

* wip -- no commit

* wip -- updated interface

* wip -- update runtime

* fix versions

* Fix types

fixed all runtime/ TS errors

fix ts errors

change redirects

drop deprecations

Drop native output

Update embed.ts

Delete embed.ts

revert extras

remove asset middleware

updated ops

split out HMR plugin

Update webpack.config.ts

* Remove patches

* Delete webpack-dev-middleware_dist_utils_setupOutputFileSystem.js

* Drop extra native features

* revert code

* Update defaults.ts

* added types

* fix yarn

Update PackagerLogsStream.ts

Update yarn.lock

* Update getFileAsync.ts

* Update webpack.config.ts

* Update Webpack.ts

* Fix splitChunks

* Remove react-dev-utils to add Node LTS (v12) support back

Update ModuleNotFoundPlugin.ts

Update formatWebpackMessages.ts

* fix types

* Update createAllLoaders-test.js

* Update paths-test.js.snap

* fix tests

* Update webpack.config-test.js.snap

* Fix merge

* Fix find-up

* Update package.json

Update ManifestHandler.ts

Update .eslintrc.js

Update parseStartOptions.ts

fix types

Update yarn.lock

Delete more unused code and fix types

fix types

drop unimodules helper (no longer used in Next.js adapter)

update tests

drop more native support

wip -- drop native

update deps

Update basic-test.js

updated tests

Update startAsync.ts

drop / revert

Update package.json

* update tests

* fix tests

* fix tests

---------

Co-authored-by: Evan Bacon <[email protected]>
2023-01-27 10:38:59 -06:00
Kim Brandwijk 208354c051 [expo-env-info] prepare repo to convert expo-env-info to esm (#4312) 2022-04-23 02:01:30 +02:00
Łukasz Kosmaty b5c59a7910 [Interstitial page] Fix QR on web UI & fallback to SDK version if the runtime version wasn't defined (#4214)
# Why

Fixes that QR code on web UI pointed to the `Expo Go` directly instead of to the interstitial page.
Fallback to the SDK version if the runtime version wasn't defined. 

# How

- Extended the dev graphQL server to serve Interstitial page URL if available. 

# Test Plan

- runs the local version of the CLI and confirms that the web QR code points to the correct place.
- checks if the SDK version was detected when the runtime version isn't available.
2022-02-16 13:17:37 +01:00
Evan Bacon bf8edaea7b Revert "Created @expo/api package (#3361)" (#4165)
This reverts commit 282ac13a1b.
2022-01-26 15:42:58 -07:00
Evan Bacon 282ac13a1b Created @expo/api package (#3361)
* Created expo/api package

* Update Env.ts

* Update package.json

* fix ApiV2Error

* fix imports

* Move downloadAppAsync to api

* Update downloadAppAsync.ts

* move ip

* fix downloadAppAsync

* yarn update

* Update internal.ts

* Update package.json

* reduce cross-package communication

* fix bugs

* Move Versions module to api

* Move Exp into User

* Move ExpSchema to api

* Convert all API usage to typed functions

* Update yarn.lock

* Update startAsync.ts

* fix imports

* Switch up Env shape

Consolidate settings

Drop lodash

dotExpoHomeDirectory -> getDirectory

rename lte and gte methods

ExpSchema -> ExpoConfigSchema

Refactor Cache

fix bugs

* fix type errors

fix up function names

* Update User.ts

Update README.md

Update startAsync.ts

lint fix

fixup tests

Split up Publish API

Refactor API

Refactor

Update getPublishExpConfigAsync.ts

* Update User.ts

* Update package.json

Cleaned up API

Moved ProjectSettings to api

Delete unused Session module

Update ArtifactUtils.ts

Config -> ProcessSettings

move downloadAppAsync back to xdl

Updated Versions API

Clean up API

fixed whoami

fix tests

fix bugs

Update exportAppAsync-test.ts

Update exportAppAsync-test.ts

Update npm-test.ts

Updated docs

Updated docs

Update ProjectSettings.ts

fix mocks for path

fix mocks

fix dev tools mock

Update autoAddConfigPluginsAsync-test.ts

split up e2e

split up e2e

added node matrix

* Update UserManager.ts
2022-01-24 14:07:30 -07:00
d189a84b8c use platforms array for disabling platforms (#3844)
* Added platforms for disabling terminal ui

* Added platforms styling to web ui

* Update packages/expo-cli/src/commands/start/TerminalUI.ts

Co-authored-by: Brent Vatne <[email protected]>

Co-authored-by: Evan Bacon <[email protected]>
Co-authored-by: Brent Vatne <[email protected]>
2021-09-14 08:48:45 -06:00
Brent VatneandJames Ide 20e0d2015f expo.io -> expo.dev (#3771)
Co-authored-by: James Ide <[email protected]>
2021-08-16 12:41:10 -07:00
Evan Bacon 095c95f5b6 Remove Config.offline (#3374)
* Remove Config.offline

* lint fix
2021-04-08 14:18:33 -07: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 BaconandVille Immonen a7ab0a6fbb [xdl] split up Project module (#3164)
* Split server methods out of Project module

* Update startLegacyReactNativeServerAsync.ts

* Split up Project module

* Update Project.ts

* Update Project.ts

* Update exp.ts

* Update xdl.js

* Update startLegacyReactNativeServerAsync.ts

* Update packages/xdl/src/Project.ts

Co-authored-by: Ville Immonen <[email protected]>

Co-authored-by: Ville Immonen <[email protected]>
2021-02-03 18:53:20 -08:00
Evan Bacon c6e5c25858 Use global ngrok for xdl (#3123)
* use global ngrok

* added debug logging

* Update resolveNgrok.ts

* silence logs unless using debug mode

* auto install from dev tools

* Update resolveNgrok.ts

* Update ngrok.ts

* Update resolveNgrok.ts
2021-01-26 13:52:34 -08:00
Brent Vatne 9e3cb1eb15 [xdl][dev-tools][cli] Update --dev-client for new requirements (#2938) 2020-12-21 18:17:41 -08:00
Evan BaconandBrent Vatne 8b3a7e9afb [xdl] Improved Android module (#2550)
- Give android parity with #2541
- Support multiple connected android devices
- Support opening Android emulators/devices from a list
- Support prompt to update client automatically
- Improve emulator boot-up
- Improve error messages

Co-authored-by: Brent Vatne <[email protected]>
2020-09-01 14:43:56 -07:00
Evan BaconandBrent Vatne 22972212ed [cli] simulator upgrades (#2541)
- fix interactions after prompting user to upgrade
- bring simulator to the front when the link is opened in it
- prompt to upgrade automatically
- maximize reuse across functions, cutting down on possible edge cases in our abstraction
- add ability to select simulators
- prompt user to select a simulator from a list when no simulators are open
- add shift+i for selecting more simulators
- shim out methods for other simulator utilities
- provide better methods for ensuring that a simulator fully boots up
- created simcontrol module for extending simctl

Co-authored-by: Brent Vatne <[email protected]>
2020-09-01 13:44:33 -07:00
Will Schurman e958ff848c Update eslint-config-universe to 4.0.0 (#2396) 2020-07-24 15:25:32 -07:00
Juwan WheatleyandVille Immonen 8b09997cf2 [xdl] Start Ngrok only when running expo start --tunnel (#2088)
* [xdl]  Start Ngrok only when running expo start --tunnel

Fixes #335

* this doesn't actually return packagerOpts, so destructure instead of using incorrect name

* [dev-tools] toggling 'tunnel' in DevTools should start tunnels

* Update packages/dev-tools/server/graphql/GraphQLSchema.ts

Co-authored-by: Ville Immonen <[email protected]>

Co-authored-by: Ville Immonen <[email protected]>
2020-05-12 08:34:06 -07:00
Evan Bacon 0f431e66d8 Migrate all running/publishing config reading methods to new app.config.js (#1581)
* Migrate all running/publishing config reading methods

* Merge branch 'master' into @evanbacon/config/migrate-all-to-new-config

* Updated start command

* Add support for creds and upgrade

* Update Exp-test.js

* revert packagemanager format

* fix mode bugs

* Update publish-info.ts

* Update GraphQLSchema.ts

* Update install.ts

* Update publish.ts

* Update start.ts

* Update upgrade.ts

* Update BaseUploader.ts

* Update context.ts

* Update unit-test-config.js

* Update jest.config.js

* Update Exp.ts

* Update paths.ts

* Update ExpSchema.ts

* Update UrlUtils.ts

* Update Project.ts

* Update BaseBuilder.ts

* Update README.md
2020-03-12 17:14:45 -07:00
Evan Bacon 5c3339592c [dev-tools] Upgrade dev-tools (#1633)
* Migrate dev-tools to typescript

* fix scripts

* fix tests

* upgrade to next.js v8
2020-03-04 17:15:58 -08:00
Ville Immonen d23bf45ab8 fix(dev-tools): fix an EventEmitter memory leak (#1530)
Fix a memory leak resulting in warnings like this to be generated by
Node:
```
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 ADDED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 UPDATED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
(node:14054) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 DELETED listeners added to [Issues]. Use emitter.setMaxListeners() to increase limit
```

To reproduce the bug I refreshed the browser tab with Dev Tools in it
10+ times. After this, the warning shown above was printed in the
terminal.

The underlying cause was that each time the browser subscribed to the
logs, `addListener` was called in `eventEmitterToAsyncIterator`, but
the corresponding `removeListener` was never called.

There was code wrapping async iterators in the Dev Tools server, which
did not implement the `return()` and `throw()` methods of the async
iterator. For this reason, whenever a client disconnected, the async
iterator was not cleaned up.
2020-02-10 18:01:06 +02:00
Evan BaconandBrent Vatne d14cfeaa50 Always show web in dev tools (#1492)
Co-authored-by: Brent Vatne <[email protected]>
2020-02-03 12:56:49 -08:00
jkh dd2c0197f2 [expo-cli] add apiV2 option for send (#1362) 2019-12-18 14:18:45 -08:00
Brent Vatne b810269440 Update TypeScript, ESLint, Prettier, and run them everywhere (#1304) 2019-12-05 16:39:48 -08:00
Evan Bacon 2d06d7a9e0 Moved expo-cli optimize to npx expo-optimize (#1192)
* Moved `expo-cli optimize` to `npx expo-optimize`

* Added deprecation notice for expo-cli optimize

* Update yarn.lock

* Update README.md

* Update package.json

* Update README.md

* Update optimize.ts

* Update GraphQLSchema.js

* Update README.md

* pull expo-optimize from dev-tools
2019-11-18 13:47:12 -08:00
Will Schurman 3190c4e061 fix(dev-tools): Fix graphql errors when config is invalid (#1236) 2019-11-18 12:29:35 +02:00
Evan Bacon b11a790dcd [xdl] Revert deprecation (#1229)
* Revert deprecation

* revert use of Webpack.isRunning
2019-11-14 15:04:12 -08:00
Evan Bacon 19c7b501b8 [xdl] Deprecated ProjectUtils methods (#1194)
* Deprecated ProjectUtils methods

- readConfigJsonAsync
- readExpRcAsync

* Fixed schema tests

* Remove unused checks

* fix flow errors
2019-11-11 14:35:54 -08:00
Evan Bacon b5dfb8355e Fixed TerminalUI and GraphQLSchema (#831)
* Fixed TerminalUI and GraphQLSchema

* Sorted imports
2019-07-09 15:57:21 -07:00
Ville Immonen 7d33f17629 Rename xdl to @expo/xdl (scoped package) (#636)
npm currently has issues with 3 character package names (https://status.npmjs.org/incidents/qg46dsfk1vt2) and scoped packages also have more permission options available (e.g. npm access command only works with scoped packages).
2019-05-20 18:37:32 +03:00
Sergei Chestakov 47f70e5824 Add image optimization functionality (#555)
* Add optimize command and read in bundled assets

* Add sharp to dependencies and compress images

* Use assets.json in .expo folder to store which assets have been modified

* Store assets by their checksum in .expo-shared and add --save option

This commit switches to storing assets.json in a new .expo-shared folder
rather than .expo so that it can be checked into git and state can be shared
amongst multiple people . It also now keeps track of files using the SHA256
checksum of their contents rather than their inodes or names which allows it
to work crossplatform and accross different machines. Finally, I added a --save
option to save the original assets and switched to overwriting them and
not saving the unoptimized versions by default.

* Delete unused hash values in assets.json and log when no assets are optimized

Deleting unused hash values allows us to remove entries in assets.json for assets that were deleted or modified

* Only search for assets files in project directory

* Output KB saved and remove 'optimized' assets if larger than original

* Update function to convert number of bytes to a human readable value

* Add warning and prompt the user if --save flag is not passed in

* Prompt user to optimize assets before publishing

* Add toggle for asset optimization in dev-tools

* Add optimize functionality to dev-tools GUI

Moves core logic of optimization to xdl and imports from within expo-cli and
dev-tools. Adds a new Graph QL mutation which the dev-tools front end
calls to trigger the xdl optimizeAsync function.

* Add message about assets.json when it's created.

* Use path.join instead of string concatenation

* Move helper functions into a new AssetUtils module

* Add --include and --exclude options to filter files

* Clarify that --include and --exclude patterns are relative to proj root

* Make logs less colorful

* Update prompt messages to be more clear

* .expo -> .orig for backups

* Remove backup prompt/warning when there are no assets to optimize

* Update prompt message to backup original files
2019-05-03 03:29:16 -07:00
Ville Immonen 9d2d17cbc2 Remove legacy config functions from xdl (#466)
* Remove legacy config functions from xdl

These functions have moved to @expo/config

* Fix ESLint warning
2019-04-08 18:17:48 +02:00
Evan Bacon f910fae6cb @expo/config (#452)
* Created `@expo/config`

* Integrated `@expo/config`

* Updated error handling
2019-03-25 18:28:28 +02:00
Ville Immonen a4c2dd5635 Fix all ESLint warnings in dev-tools 2019-03-21 13:08:25 +02:00
James Ide a9ce6ead81 Remove "SMS" from link-sending descriptions (#425)
This removes SMS from the UI for sending project development links. The server endpoint still behaves the same, but the UI now promotes email over SMS. Email is more reliable, much cheaper, and more customizable. We'll make a similar change on web as well.

Test plan: Ran the CLI on a test project and verified that both the CLI and web UI showed just "email" without "SMS" for sending links.
2019-03-18 22:50:59 -07:00
Ville Immonen cf721e1f6c Initial support for expo-web (#406)
Add expo-web support to `expo start`
2019-03-06 20:09:10 +02:00
Ville Immonen 5c1ca0be51 Move all packages to packages/ folder 2018-08-24 00:02:43 +03:00