<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in export-embed-test.ts</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>46f023fa - [RFC] API Routes in Expo Router (#24429)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#46f023fa</link>
        <description>[RFC] API Routes in Expo Router (#24429)# WhyServers are an important part of developing many different types ofapps, but they&apos;re much harder to configure than they need to be.API Routes will enable users to express some abstract JavaScript codethat runs in a server by simply creating a file in the app directory,and adding the `+api.js` suffix. For example, to securely interact withOpenAI, simply:```ts // app/generate+api.tsimport { ExpoRequest, ExpoResponse } from &apos;expo-router/server&apos;;export async function POST(req: ExpoRequest): Promise&lt;ExpoResponse&gt; {  const { prompt } = await req.json();  const json = await fetch(&apos;https://api.openai.com/v1/engines/text-davinci-003/completions&apos;, {    headers: {      &apos;Content-Type&apos;: &apos;application/json&apos;,      // `OPENAI_API_KEY` is pulled from the .env file when running in Expo CLI.      Authorization: `Bearer ${process.env.OPENAI_API_KEY ?? &apos;&apos;}`,    },    method: &apos;POST&apos;,    body: JSON.stringify({      prompt,      max_tokens: 100,  }),  }).then(res =&gt; res.json());  // Return as JSON  return ExpoResponse.json(json);}```This will be served at `http://localhost:8081/generate` with `npx expo`and can be used by making a request:```sh$ curl -X POST -H &quot;Content-Type: application/json&quot; -d \&apos;{&quot;prompt&quot;:&quot;Hello, my name is&quot;}\&apos; http://localhost:8081/generate```Expo Router polyfills the URL and `window.location` object on native toallow for universally requesting with a relative URL:```js// Expo prepends the host and port to the URL automatically in development.const json = await fetch(&apos;/generate&apos;).then(res =&gt; res.json());```# How- API Routes are bundled with Metro, leveraging all the samefunctionality as the rest of the app and website.- The project babel config is used to transpile the API routes.Indication is passed to the Babel caller via the `isServer` boolean.This can be used to change the preset based on the environment.- Each API route is bundled into a standalone file in the `dist/_expo`directory. This is akin to ncc, the tool we use to make Create Expo Appdownload in ~1 second.- Create a new package `@expo/server` which includes the requisitemiddleware and runtime polyfills for the Expo server environment.- Add a new routes manifest which will be used by `@expo/server` toserve up the three types of routes: HTML routes, API routes, and notfound routes (404s).- Add a new export `expo-router/server` (potentially will be moved to`expo/server`) which contains the `ExpoRequest` and `ExpoResponse`objects. These are all based on the WinterCG specification, and includesome additional properties for interop with the Expo Router filesystemconvention. These are inspired by Remix, SvelteKit, and Next.js forsimplicity.- Add a new export mode `web.output: &quot;server&quot;` which can be used toexport a dynamic server. Note: I may drop this for now and make serverthe default since there&apos;s no expo-specific hosting code that must beexported.- This PR adds the ability to host the app with an express server,different production adapters to follow.# Test PlanIn addition to all the E2E Metro tests, I&apos;ve added a new E2E runnerwhich starts a server and pings different requests to ensure expectedbehavior. These run in the CLI as opposed to the `@expo/server` package.- resolve ENG-10057 ENG-8243 ENG-8082 ENG-8079 ENG-8242 ENG-8081ENG-8080 ENG-9625---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;Co-authored-by: Cedric van Putten &lt;me@bycedric.com&gt;

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Fri, 15 Sep 2023 23:04:53 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>080145be - feat(router, metro-runtime): reduce production web code (#24215)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#080145be</link>
        <description>feat(router, metro-runtime): reduce production web code (#24215)# Why- Using the new source map support, I was able to identify and removesome development-only code https://github.com/expo/expo/pull/24213/ --over ~100kb smaller.&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Fri, 01 Sep 2023 05:15:32 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>429dc7fc - fix(expo, asset, cli)!: unify asset hashing (#24090)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#429dc7fc</link>
        <description>fix(expo, asset, cli)!: unify asset hashing (#24090)# WhyConvert the `../` segments of the server URL to `_` to supportmonorepos. This same transformation takes place in`AssetSourceResolver.web` (expo-assets, expo-image) and`persistMetroAssets` of Expo CLI, this originally came from the [Metroopinion](https://github.com/react-native-community/cli/blob/2204d357379e2067cebe2791e90388f7e97fc5f5/packages/cli-plugin-metro/src/commands/bundle/getAssetDestPathIOS.ts#L19C5-L19C10).The purpose is to ensure no URL like `/foo/../bar.png` is requested, asthe result would be `/bar.png` which wouldn&apos;t work. The of how to handlethis didn&apos;t come from us, but we do need to ensure it&apos;s unified. At ahigh-level, this does prevent the usage of certain files, as`/foo/../bar.png` will be `/foo/_bar.png`, meaning a file named`/foo/_bar.png` cannot also exist. This logic, while applied at runtime,is actually only valid for production exports as we don&apos;t move or aliasfiles in development. The only way to have valid development files is toensure `../` never appears in the URL, i.e. by using`unstable_serverRoot`.- Drop legacy `expo/tools/hashAssetFiles.js` in favor of `expo-asset`version.- Unify runtime logic of asset file loading for monorepos.- Split out of https://github.com/expo/expo/pull/23911&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Sat, 26 Aug 2023 02:50:49 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>fd2402c1 - feat(cli): add monorepo asset support for export:embed (#24095)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#fd2402c1</link>
        <description>feat(cli): add monorepo asset support for export:embed (#24095)# Why- Pull in support for using the forked getAssets which supports`EXPO_USE_METRO_WORKSPACE_ROOT` fromhttps://github.com/expo/expo/issues/24027&lt;!--Please describe the motivation for this PR, and link to relevant GitHubissues, forums posts, or feature requests.--&gt;# How- Drop unused `--generate-static-view-configs`https://github.com/react-native-community/cli/pull/1970- Update tests to use e2e fixture which has the expo package linked to`packages`.- Disable `watch` mode on metro when bundling for embed (we do this with`npx expo export`).- Use forked `getAssets` to support `EXPO_USE_METRO_WORKSPACE_ROOT`correctly.- Drop a bunch of unused option parsing.&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- E2E bundling test.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `npx expo prebuild` &amp; EAS Build(eg: updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Thu, 24 Aug 2023 18:25:01 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>4067174d - [cli] Fix e2e tests (#22005)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#4067174d</link>
        <description>[cli] Fix e2e tests (#22005)# WhyThese are failing in main:https://github.com/expo/expo/actions/workflows/cli.yml?query=branch%3AmainBlame seems to be 8fd977ade89c14fcf9229c10eb19590a3c52c80b. No idea whythat changes these or what these are testing but meh.# HowUpdate tests.# Test Plan`yarn test:e2e`# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Wed, 05 Apr 2023 19:18:37 +0000</pubDate>
        <dc:creator>Will Schurman &lt;wschurman@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>f479be69 - chore(cli): switch `EXPO_USE_PATH_ALIASES` to `expo.experiments.tsconfigPaths`. (#21897)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#f479be69</link>
        <description>chore(cli): switch `EXPO_USE_PATH_ALIASES` to `expo.experiments.tsconfigPaths`. (#21897)# Why- It&apos;s a bit harder to set env vars and users will want this eitheralways on or always off.- Expo Config makes it easier to deprecate values on a per-versionbasis. https://github.com/expo/universe/pull/11872- Comment out references to the path aliases feature until we&apos;re closerto launch. Users are getting confused when they see the featuredocumented.---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Thu, 30 Mar 2023 03:10:43 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
<item>
        <title>b6b91c50 - feat(cli)!: use Expo CLI to bundle production apps (#21396)</title>
        <link>http://172.16.0.5:8080/history/expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts#b6b91c50</link>
        <description>feat(cli)!: use Expo CLI to bundle production apps (#21396)# WhyMost of our new Metro bundler features won&apos;t work unless we use Expo CLIfor every bundler operation (ex:[aliases](https://github.com/expo/expo/pull/21262)). Right now this isthe case when building for production on both platforms or building fordevelopment on iOS.&gt; Using `npx expo start` when building from Xcode will be added inanother PR.# HowThis PR introduces a new &quot;export:embed&quot; command which is hidden from the`--help` prompt. `npx expo export:embed` accepts the same arguments as`npx react-native bundle` and passes them to the same internal function,but it ensures we use the correct variation of Metro before doing such.This change (and `start` PR) will add more steps for migrating to &quot;ExpoCLI&quot; but it will also remove the need for us to generate the`metro.config.js` file in the project on `npx expo prebuild` since wecan now reliably default to `@expo/metro-config`.The change should only apply to Metro bundler features (all applicationcode could be affected), but it won&apos;t obstruct Expo Modules Core orusing Expo CLI.&lt;!--How did you build this feature or fix this bug and why?--&gt;# Test Plan- All of our existing E2E tests should use the new command, if theycontain features like aliases then they&apos;ll work.- Copied the changes from `@expo/cli` into a new project&apos;s node_modules,added template changes:  - Built for production from Android Studio and Xcode.&lt;!--Please describe how you tested this change and how a reviewer couldreproduce your test, especially if this PR does not include automatedtests! If possible, please also provide terminal output and/orscreenshots demonstrating your test/reproduction.--&gt;# Checklist&lt;!--Please check the appropriate items below if they apply to your diff.This is required for changes to Expo modules.--&gt;- [ ] Documentation is up to date to reflect these changes (eg:https://docs.expo.dev and README.md).- [ ] Conforms with the [Documentation Writing StyleGuide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md)- [ ] This diff will work correctly for `expo prebuild` &amp; EAS Build (eg:updated a module plugin).---------Co-authored-by: Expo Bot &lt;34669131+expo-bot@users.noreply.github.com&gt;Co-authored-by: James Ide &lt;ide@users.noreply.github.com&gt;

            List of files:
            /expo/packages/@expo/cli/e2e/__tests__/export-embed-test.ts</description>
        <pubDate>Mon, 06 Mar 2023 18:28:50 +0000</pubDate>
        <dc:creator>Evan Bacon &lt;bacon@expo.io&gt;</dc:creator>
    </item>
</channel>
</rss>
