Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Add originalFullName to the public config #3494

Merged
merged 1 commit into from
May 18, 2021

Conversation

wschurman
Copy link
Member

@wschurman wschurman commented May 16, 2021

Why

#3376 added currentFullName for use as a stable identifier, but it is not stable through project transfers. originalFullName is, so it should be used instead in libraries like auth-session and notifications.

How

  1. The xdl schema was defined in https://github.com/expo/universe/pull/7590
  2. This PR is the equivalent of Added currentFullName to the public config #3376 but for originalFullName. currentFullName is kept so that the CLI continues to function until we change the auth-session and notifications libraries to use originalFullName.
  3. Next up, I'll change the auth-session and notifications libraries to use originalFullName similar to [notifications] Add support for custom managed workflow expo#12465 and [auth session] Add support for custom managed workflow expo#12464.

Test Plan

Run same unit tests that were added in #3376.

In a sample project run:
~/expo/expo-cli/node_modules/.bin/expo config --type public, see both currentFullName and originalFullName in output.

@@ -143,9 +143,11 @@ export function getConfig(projectRoot: string, options: GetConfigOptions = {}):
delete configWithDefaultValues.exp.android.config;
}

// This value will be overwritten when the manifest is being served from the host (i.e. not completely accurate).
// These value will be overwritten when the manifest is being served from the host (i.e. not completely accurate).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These values

wschurman added a commit to expo/expo that referenced this pull request Feb 6, 2023
…rted config (#21070)

# Why

This reverts expo/expo-cli#3376 and
expo/expo-cli#3494.

These were added for AuthSession and Push notification registration.
Neither of these use this anymore:
- AuthSession deprecated use of the proxy use with the field from the
manifest: #17327. It supports supplying
them via arguments.
- Push notification prefers `projectId` now:
#14265. Also it allows supplying them
via arguments.

These auto config augmentations are causing issues with `eas build`
since the generated full name could differ from the actual full name:
1. Create project in an org on the website.
2. `npx expo init ...`
3. `eas init --id <>`
4. Remove `owner` from manifest.
5. `eas build`
6. Download artifact, inspect embedded config, see that it has the
correct `projectId` yet also a `currentFullName` and `originalFullName`
containing the current logged-in user rather than the actual one
corresponding to the projectId.

# How

One fix we could do here would be to read the projectId and get the
truthful full name, but that adds a network dependency and is probably
not worth it.

So, instead, I decided to just remove the hack since they are no longer
needed in the two libraries this was added for.

# Test Plan

Run all tests.

# Checklist

<!--
Please check the appropriate items below if they apply to your diff.
This is required for changes to Expo modules.
-->

- [ ] 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` & EAS Build (eg:
updated a module plugin).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants