Compare commits

...
2 Commits
Author SHA1 Message Date
Expo CI c7b66a9c32 chore: create new release 8.2.1
## [8.2.1](https://github.com/expo/expo-github-action/compare/8.2.0...8.2.1) (2024-01-15)

### Bug fixes

* **preview:** filter slugs with special characters to match dev clients `exp+<slug>` scheme ([#252](https://github.com/expo/expo-github-action/issues/252)) ([b8a9be8](https://github.com/expo/expo-github-action/commit/b8a9be8336bf5609f8e299a8486f9a2bf7073f8a))
2024-01-15 12:35:54 +00:00
Cedric van Putten b8a9be8336 fix(preview): filter slugs with special characters to match dev clients exp+<slug> scheme (#252)
* test(preview): add tests for eas update qr code urls

* fix(preview): use same filtering of `slug` as done in `expo-dev-client`

* chore: rebuild actions
2024-01-15 13:28:27 +01:00
5 changed files with 48 additions and 3 deletions

No files matched your search

+7
View File
@@ -1,3 +1,10 @@
## [8.2.1](https://github.com/expo/expo-github-action/compare/8.2.0...8.2.1) (2024-01-15)
### Bug fixes
* **preview:** filter slugs with special characters to match dev clients `exp+<slug>` scheme ([#252](https://github.com/expo/expo-github-action/issues/252)) ([b8a9be8](https://github.com/expo/expo-github-action/commit/b8a9be8336bf5609f8e299a8486f9a2bf7073f8a))
## [8.2.0](https://github.com/expo/expo-github-action/compare/8.1.0...8.2.0) (2023-12-02)
+2 -1
View File
@@ -42133,7 +42133,8 @@ function getUpdateGroupQr({ projectId, updateGroupId, appSlug, qrTarget, }) {
if (qrTarget === 'dev-build') {
// While the parameter is called `appScheme`, it's actually the app's slug
// This should only be added when using dev clients as target
url.searchParams.append('appScheme', appSlug);
// See: https://github.com/expo/expo/blob/8ae75dde393e5d2393d446227a1fe2482c75eec3/packages/expo-dev-client/plugin/src/getDefaultScheme.ts#L17
url.searchParams.append('appScheme', appSlug.replace(/[^A-Za-z0-9+\-.]/g, ''));
}
url.searchParams.append('projectId', projectId);
url.searchParams.append('groupId', updateGroupId);
+1 -1
View File
@@ -1,7 +1,7 @@
{
"private": true,
"name": "expo-github-action",
"version": "8.2.0",
"version": "8.2.1",
"description": "Expo CLI in your GitHub Actions workflow",
"main": "build/index.js",
"repository": {
+2 -1
View File
@@ -84,7 +84,8 @@ export function getUpdateGroupQr({
if (qrTarget === 'dev-build') {
// While the parameter is called `appScheme`, it's actually the app's slug
// This should only be added when using dev clients as target
url.searchParams.append('appScheme', appSlug);
// See: https://github.com/expo/expo/blob/8ae75dde393e5d2393d446227a1fe2482c75eec3/packages/expo-dev-client/plugin/src/getDefaultScheme.ts#L17
url.searchParams.append('appScheme', appSlug.replace(/[^A-Za-z0-9+\-.]/g, ''));
}
url.searchParams.append('projectId', projectId);
+36
View File
@@ -0,0 +1,36 @@
import { getUpdateGroupQr } from '../src/eas';
describe(getUpdateGroupQr, () => {
it('returns url for expo-go', () => {
expect(
getUpdateGroupQr({
qrTarget: 'expo-go',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'appslug',
})
).toBe('https://qr.expo.dev/eas-update?projectId=projectId&groupId=updateGroupId');
});
it('returns url for dev-build', () => {
expect(
getUpdateGroupQr({
qrTarget: 'dev-build',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'appslug',
})
).toBe('https://qr.expo.dev/eas-update?appScheme=appslug&projectId=projectId&groupId=updateGroupId');
});
it('returns url for dev-build, with `_` in appSlug', () => {
expect(
getUpdateGroupQr({
qrTarget: 'dev-build',
projectId: 'projectId',
updateGroupId: 'updateGroupId',
appSlug: 'hello_world',
})
).toBe('https://qr.expo.dev/eas-update?appScheme=helloworld&projectId=projectId&groupId=updateGroupId');
});
});