Skip to content

Commit

Permalink
feat(expo): upgrade expo-cli to 6.3.0 (#14944)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiongemi committed Feb 13, 2023
1 parent dfc424d commit 51cd35c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 5 deletions.
9 changes: 8 additions & 1 deletion e2e/expo/src/expo.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('expo', () => {
);
afterEach(() => cleanupProject());

it('should test, lint, export and prebuild', async () => {
it('should test, lint, export, export-web and prebuild', async () => {
const appName = uniq('my-app');
const libName = uniq('lib');
const componentName = uniq('component');
Expand Down Expand Up @@ -52,6 +52,13 @@ describe('expo', () => {
expect(exportResults.combinedOutput).toContain(
'Export was successful. Your exported files can be found'
);
checkFilesExist(`dist/apps/${appName}/metadata.json`);

expect(() => {
runCLI(`export-web ${appName}`);
checkFilesExist(`apps/${appName}/web-build/index.html`);
checkFilesExist(`apps/${appName}/web-build/manifest.json`);
}).not.toThrow();

// set a mock package name for ios and android in expo's app.json
const workspace = readResolvedConfiguration();
Expand Down
17 changes: 17 additions & 0 deletions packages/expo/migrations.json
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,23 @@
"alwaysAddToPackageJson": false
}
}
},
"15.7.2": {
"version": "15.7.2-beta.0",
"packages": {
"@expo/webpack-config": {
"version": "~18.0.1",
"alwaysAddToPackageJson": false
},
"eas-cli": {
"version": "3.5.2",
"alwaysAddToPackageJson": false
},
"expo-cli": {
"version": "6.3.0",
"alwaysAddToPackageJson": false
}
}
}
}
}
9 changes: 8 additions & 1 deletion packages/expo/plugins/with-nx-webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TsconfigPathsPlugin } from 'tsconfig-paths-webpack-plugin';
import { resolve } from 'path';

/**
* This function add addtional rules to expo's webpack config to make expo web working
* This function add additional rules to expo's webpack config to make expo web working
*/
export async function withNxWebpack(config) {
// add additional rule to load files under libs
Expand All @@ -27,6 +27,13 @@ export async function withNxWebpack(config) {
});
}

if (!config.resolve) {
config.resolve = {};
}
if (!config.resolve.plugins) {
config.resolve.plugins = [];
}

const extensions = ['.ts', '.tsx', '.mjs', '.js', '.jsx'];
const tsConfigPath = resolve('tsconfig.json');

Expand Down
6 changes: 3 additions & 3 deletions packages/expo/src/utils/versions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ export const nxVersion = require('../../package.json').version;

export const expoVersion = '47.0.13';
export const expoMetroConfigVersion = '0.5.2';
export const expoWebpackConfig = '~0.17.4';
export const expoWebpackConfig = '~18.0.1';
export const expoSplashScreenVersion = '~0.17.5';
export const expoStatusBarVersion = '~1.4.2';
export const deprecatedExpoCliVersion = '6.1.0'; // expo-cli
export const deprecatedExpoCliVersion = '6.3.0'; // expo-cli
export const expoCliVersion = '0.4.11'; // @expo/cli
export const easCliVersion = '3.3.2';
export const easCliVersion = '3.5.2';
export const babelPresetExpoVersion = '~9.2.2';

export const reactVersion = '18.1.0';
Expand Down

0 comments on commit 51cd35c

Please sign in to comment.