Compare commits

...
Author SHA1 Message Date
Stanisław Chmiela ff6401ba6b Release 0.18.8 2020-10-27 12:59:02 +01:00
Stanisław Chmiela b443760699 Fix Reanimated v2 not being configured in production mode (#270)
<!-- Thanks for contributing to _turtle_! Before you submit your pull request, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x]) -->

### Checklist
- [x] I've read the [Contribution Guidelines](https://github.com/expo/turtle/blob/master/CONTRIBUTING.md).
- [x] I've updated the [CHANGELOG](https://github.com/expo/turtle/blob/master/CHANGELOG.md) if necessary.
- [x] I've ensured the unit and smoke tests are still passing - either by running `yarn test:unit` and `yarn test:smoke:[ios|android]` or by checking the appropriate CircleCI builds' statuses.
- [x] **I've manually tested whether the changes I made work as expected.**

### Motivation and Context

Apply https://github.com/expo/expo/pull/10807.

### Description
Fixes app crashing when using Reanimated v2.
2020-10-27 12:57:06 +01:00
Eric Samelson 0f0e86d17f Release 0.18.7 2020-10-23 15:28:41 -07:00
Eric Samelson f6697c0029 update CHANGELOG 2020-10-23 15:28:14 -07:00
Eric Samelson 22f802164d update android sdk 39 tarball 2020-10-23 14:53:13 -07:00
Charlie Cruzan aaa6e61061 Update CHANGELOG.md 2020-10-22 17:17:43 -04:00
cruzach e532e0270c Release 0.18.6 2020-10-22 17:13:42 -04:00
Charlie Cruzan bc0718ca7d [android] update sdk 39 tarball with notifications fixes
the following fixes are added in this update:

- https://github.com/expo/expo/commit/6ffe64f4a75f75edfdae226574842e97fd63d523

- https://github.com/expo/expo/commit/fa659fd3f74c32e989db5920a3e004bee58a931c

- https://github.com/expo/expo/commit/0faa400c630a5f88a029fe87c84cfa9e684e800a
2020-10-22 13:54:30 -04:00
Brent Vatne bf63dcea70 Update CHANGELOG 2020-10-07 12:34:43 -07:00
Brent Vatne 9551c8773d Release 0.18.5 2020-10-07 12:33:14 -07:00
Brent Vatne 470ff609fd [android] Always add expo-notifications for SDK >= 39 projects with android.enableDangerousExperimentalLeanBuilds enabled (#267) 2020-10-07 10:29:50 -07:00
Eric Samelson addba74b9d Release 0.18.4 2020-10-06 18:38:53 -07:00
Eric Samelson b63e9e3f34 update CHANGELOG 2020-10-06 18:37:48 -07:00
Eric Samelson 25aaa849f1 [android] update sdk 39 tarball for android notifications/updates fix 2020-10-06 18:36:22 -07:00
Brent Vatne edc712d820 update CHANGELOG 2020-10-03 22:51:11 -07:00
Brent Vatne 23c3e3509c Release 0.18.3 2020-10-03 22:48:52 -07:00
Brent Vatne 406a3be4f1 Update @expo/xdl to fix regression in SDK <= 39 splash 2020-10-03 22:15:55 -07:00
Eric Samelson dd60721270 update CHANGELOG 2020-10-03 15:19:38 -07:00
Eric Samelson 469ead8df8 Release 0.18.2 2020-10-03 15:18:25 -07:00
Brent Vatne aa0ce81e98 [ios] Update client tarball 2020-10-03 15:15:47 -07:00
Eric Samelson dccccb7716 [android] update SDK 39 tarball with linking fix 2020-10-03 15:10:09 -07:00
7 changed files with 124 additions and 30 deletions

No files matched your search

+41 -2
View File
@@ -7,8 +7,47 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased
- Updated SDK 39 Android tarball
- Updated SDK 39 iOS tarball
### Fixed
- Fix issues with Reanimated v2 in Android SDK 39 tarball.
# [0.18.7] - 2020-10-23
### Fixed
- Fix issue with updates in self-hosted Android apps ([#10746](https://github.com/expo/expo/issues/10746)) in the SDK 39 tarball
# [0.18.6] - 2020-10-22
### Fixed
- Fix issues with notifications ([10624](https://github.com/expo/expo/pull/10624) and [10608](https://github.com/expo/expo/pull/10608)) in the Android SDK 39 tarball.
# [0.18.5] - 2020-10-07
### Fixed
- Always add expo-notifications for SDK >= 39 projects with android.enableDangerousExperimentalLeanBuilds enabled.
# [0.18.4] - 2020-10-06
### Fixed
- Fixed an issue with notifications ([expo/expo#10562](https://github.com/expo/expo/issues/10562)) in the Android SDK 39 tarball.
# [0.18.3] - 2020-10-03
### Fixed
- Update @expo/xdl to fix regression in SDK <= 39 splash
# [0.18.2] - 2020-10-03
### Fixed
- Updated SDK 39 Android tarball.
- Updated SDK 39 iOS tarball.
- Updated iOS client tarball.
- Update @expo/config and @expo/xdl. Temporarily bring in type definitions for color-string and xcode.
## [0.18.1] - 2020-09-22
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "turtle-cli",
"version": "0.18.1",
"version": "0.18.8",
"description": "The command-line tool for building standalone Expo apps",
"preferGlobal": true,
"scripts": {
@@ -107,7 +107,7 @@
"dependencies": {
"@expo/config": "~3.3.9",
"@expo/spawn-async": "^1.4.2",
"@expo/xdl": "58.0.12",
"@expo/xdl": "58.0.13",
"@google-cloud/logging-bunyan": "^2.0.3",
"async-retry": "^1.2.1",
"aws-sdk": "^2.226.1",
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/android-shell-builder-401ff3fb71a1350c00bd0886f7eb4fd462bdf0c0.tar.gz
s3://exp-artifacts/android-shell-builder-d292dcd0cc277ab665957244a8b15b9981debd29.tar.gz
+1 -1
View File
@@ -1 +1 @@
s3://exp-artifacts/ios-expo-client-1fd3a1b4c76b1303d011887fd335730534555601.tar.gz
s3://exp-artifacts/ios-expo-client-401ff3fb71a1350c00bd0886f7eb4fd462bdf0c0.tar.gz
+1 -1
View File
@@ -84,7 +84,7 @@ async function runShellAppBuilder(
logger.info({ buildPhase: 'resolve native modules' }, 'Resolving universal modules dependencies');
const packageJsonDependecies = _.get(manifest, 'dependencies');
const enabledModules = _.get(manifest, 'android.enableDangerousExperimentalLeanBuilds')
? await resolveNativeModules(workingDir, packageJsonDependecies)
? await resolveNativeModules(workingDir, sdkVersion, packageJsonDependecies)
: await resolveExplicitOptIn(workingDir, packageJsonDependecies);
try {
+74 -19
View File
@@ -4,6 +4,7 @@ import keys from 'lodash/keys';
import merge from 'lodash/merge';
import values from 'lodash/values';
import path from 'path';
import semver from 'semver';
import logger from 'turtle/logger';
export interface IUnimoduleEntry {
@@ -19,21 +20,37 @@ interface IPackageInfo {
dependencies: string[];
}
export async function resolveExplicitOptIn(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
export async function resolveExplicitOptIn(
workingdir: string,
packages?: string[],
): Promise<IUnimoduleEntry[]> {
const resolver = new Resolver(workingdir);
await resolver.init();
const optionalModules = ['expo-branch'];
resolver.addAll();
const modules = packages
? resolver.getModules().filter((mod) => !optionalModules.includes(mod.name) || packages.includes(mod.name))
: resolver.getModules().filter((mod) => !optionalModules.includes(mod.name));
? resolver
.getModules()
.filter(
(mod) =>
!optionalModules.includes(mod.name) || packages.includes(mod.name),
)
: resolver
.getModules()
.filter((mod) => !optionalModules.includes(mod.name));
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
modules.forEach(({ name, version }) => {
logger.info(`Adding ${name}:${version}`);
});
return modules;
}
export async function resolveNativeModules(workingdir: string, packages?: string[]): Promise<IUnimoduleEntry[]> {
export async function resolveNativeModules(
workingdir: string,
sdkVersion: string,
packages?: string[],
): Promise<IUnimoduleEntry[]> {
const resolver = new Resolver(workingdir);
await resolver.init();
@@ -41,6 +58,13 @@ export async function resolveNativeModules(workingdir: string, packages?: string
resolver.addAll();
} else {
const corePackages = await readCorePackages(workingdir);
// expo-notifications is required for shell apps in SDK >= 39
// https://github.com/expo/expo/issues/10569
if (semver.gte(sdkVersion, '39.0.0')) {
resolver.addModule('expo-notifications');
}
for (const pkg of corePackages) {
if (resolver.isUnimodule(pkg)) {
resolver.addModule(pkg);
@@ -53,17 +77,36 @@ export async function resolveNativeModules(workingdir: string, packages?: string
}
}
const modules = resolver.getModules();
modules.forEach(({ name, version }) => { logger.info(`Adding ${name}:${version}`); });
modules.forEach(({ name, version }) => {
logger.info(`Adding ${name}:${version}`);
});
return modules;
}
async function readCorePackages(workingdir: string) {
const pkgJsonPath = path.join(workingdir, 'node_modules', 'react-native-unimodules', 'package.json');
const expoPkgJsonPath = path.join(workingdir, 'packages', 'expo', 'package.json');
if (await fs.pathExists(pkgJsonPath) && await fs.pathExists(expoPkgJsonPath)) {
const pkgJsonPath = path.join(
workingdir,
'node_modules',
'react-native-unimodules',
'package.json',
);
const expoPkgJsonPath = path.join(
workingdir,
'packages',
'expo',
'package.json',
);
if (
(await fs.pathExists(pkgJsonPath)) &&
(await fs.pathExists(expoPkgJsonPath))
) {
const packageJson = JSON.parse(await fs.readFile(pkgJsonPath, 'utf-8'));
const expoPackageJson = JSON.parse(await fs.readFile(expoPkgJsonPath, 'utf-8'));
return keys(packageJson.dependencies).concat(keys(expoPackageJson.dependencies));
const expoPackageJson = JSON.parse(
await fs.readFile(expoPkgJsonPath, 'utf-8'),
);
return keys(packageJson.dependencies).concat(
keys(expoPackageJson.dependencies),
);
} else {
logger.warn('No core packages detected');
return [];
@@ -76,7 +119,7 @@ interface IDependencyInfo {
class Resolver {
private workingdir: string;
private modulesMap: {[key: string]: IUnimoduleEntry};
private modulesMap: { [key: string]: IUnimoduleEntry };
private dependencyMap: IDependencyInfo;
constructor(workingdir: string) {
@@ -108,7 +151,7 @@ class Resolver {
}
public getModules(): IUnimoduleEntry[] {
return values(this.modulesMap);
return values(this.modulesMap);
}
private async resolveModule(moduleName: string) {
@@ -127,7 +170,9 @@ class Resolver {
}
}
async function generateDependenciesInfo(workingdir: string): Promise<IDependencyInfo> {
async function generateDependenciesInfo(
workingdir: string,
): Promise<IDependencyInfo> {
const dir = await fs.readdir(path.join(workingdir, 'packages'));
const map: IDependencyInfo = {};
@@ -140,7 +185,9 @@ async function generateDependenciesInfo(workingdir: string): Promise<IDependency
}
// handle @unimodules directory
const unimodulesDir = await fs.readdir(path.join(workingdir, 'packages', '@unimodules'));
const unimodulesDir = await fs.readdir(
path.join(workingdir, 'packages', '@unimodules'),
);
for (const pkgName of unimodulesDir) {
const pkg = await getPackage(workingdir, path.join('@unimodules', pkgName));
if (pkg) {
@@ -155,19 +202,27 @@ async function generateDependenciesInfo(workingdir: string): Promise<IDependency
return map;
}
async function getPackage(workingdir: string, pkgName: string): Promise<IPackageInfo | null> {
async function getPackage(
workingdir: string,
pkgName: string,
): Promise<IPackageInfo | null> {
const pkgPath = path.join(workingdir, 'packages', pkgName);
const isAndroid = await fs.pathExists(path.join(pkgPath, 'android'));
const isIos = await fs.pathExists(path.join(pkgPath, 'ios'));
const isUnimodule = await fs.pathExists(path.join(pkgPath, 'unimodule.json'));
const hasPackageJson = await fs.pathExists(path.join(pkgPath, 'package.json'));
const hasPackageJson = await fs.pathExists(
path.join(pkgPath, 'package.json'),
);
if (!isUnimodule || !hasPackageJson || (!isAndroid && !isIos)) {
return null;
}
const packageJson = JSON.parse(await fs.readFile(path.join(pkgPath, 'package.json'), 'utf-8'));
const packageJson = JSON.parse(
await fs.readFile(path.join(pkgPath, 'package.json'), 'utf-8'),
);
const pkgDeps = merge({}, // reading everything to make sure
const pkgDeps = merge(
{}, // reading everything to make sure
packageJson.dependencies,
packageJson.peerDependencies,
packageJson.unimodulePeerDependencies,
+4 -4
View File
@@ -2155,10 +2155,10 @@
workbox-webpack-plugin "^3.6.3"
worker-loader "^2.0.0"
"@expo/[email protected]2":
version "58.0.12"
resolved "https://registry.yarnpkg.com/@expo/xdl/-/xdl-58.0.12.tgz#f4130478fc221f0039533f60eff25c578957b84e"
integrity sha512-LhMX9MhF0kX4n4lG7RlM8af9e6yYTQFL/eUlEbrgg40UtXAL4mQ5aEYDLsd8yJHgRR2Z3jdaagdK5yr89BxtYw==
"@expo/[email protected]3":
version "58.0.13"
resolved "https://registry.yarnpkg.com/@expo/xdl/-/xdl-58.0.13.tgz#7e747ee8743f45816c632b3e634ba91796bd4efe"
integrity sha512-ToCCTrj8NeupX0e9tpBtbZsESHlIEKbpRNU5IUy/2IKD9No5DXGxHG/FDsbEz595gawDzTv4isdzbOOulCoUcQ==
dependencies:
"@expo/bunyan" "3.0.2"
"@expo/config" "3.3.9"