@expo/cli 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/bin/cli +1 -1
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js +2 -5
- package/build/src/start/doctor/web/WebSupportProjectPrerequisite.js.map +1 -1
- package/build/src/start/server/middleware/ClassicManifestMiddleware.js +1 -1
- package/build/src/utils/analytics/rudderstackClient.js +2 -2
- package/package.json +4 -4
package/build/bin/cli
CHANGED
|
@@ -118,7 +118,7 @@ const args = (0, _arg).default({
|
|
|
118
118
|
});
|
|
119
119
|
if (args["--version"]) {
|
|
120
120
|
// Version is added in the build script.
|
|
121
|
-
console.log("0.2.
|
|
121
|
+
console.log("0.2.1");
|
|
122
122
|
process.exit(0);
|
|
123
123
|
}
|
|
124
124
|
// Check if we are running `npx expo <subcommand>` or `npx expo`
|
|
@@ -66,13 +66,11 @@ class WebSupportProjectPrerequisite extends _prerequisite.ProjectPrerequisite {
|
|
|
66
66
|
// the package and attempts to resolve the module in the same process.
|
|
67
67
|
{
|
|
68
68
|
file: "react-native-web/package.json",
|
|
69
|
-
pkg: "react-native-web"
|
|
70
|
-
version: "~0.18.1"
|
|
69
|
+
pkg: "react-native-web"
|
|
71
70
|
},
|
|
72
71
|
{
|
|
73
72
|
file: "react-dom/package.json",
|
|
74
|
-
pkg: "react-dom"
|
|
75
|
-
version: "^18.0.0"
|
|
73
|
+
pkg: "react-dom"
|
|
76
74
|
},
|
|
77
75
|
];
|
|
78
76
|
const bundler = (0, _platformBundlers).getPlatformBundlers(exp).web;
|
|
@@ -82,7 +80,6 @@ class WebSupportProjectPrerequisite extends _prerequisite.ProjectPrerequisite {
|
|
|
82
80
|
{
|
|
83
81
|
file: "@expo/webpack-config/package.json",
|
|
84
82
|
pkg: "@expo/webpack-config",
|
|
85
|
-
version: "~0.16.2",
|
|
86
83
|
dev: true
|
|
87
84
|
});
|
|
88
85
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/start/doctor/web/WebSupportProjectPrerequisite.ts"],"sourcesContent":["import {\n AppJSONConfig,\n ExpoConfig,\n getConfig,\n getProjectConfigDescriptionWithPaths,\n ProjectConfig,\n} from '@expo/config';\nimport chalk from 'chalk';\n\nimport * as Log from '../../../log';\nimport { env } from '../../../utils/env';\nimport { getPlatformBundlers } from '../../server/platformBundlers';\nimport { PrerequisiteCommandError, ProjectPrerequisite } from '../Prerequisite';\nimport { ensureDependenciesAsync } from '../dependencies/ensureDependenciesAsync';\nimport { ResolvedPackage } from '../dependencies/getMissingPackages';\n\nconst debug = require('debug')('expo:doctor:webSupport') as typeof console.log;\n\n/** Ensure the project has the required web support settings. */\nexport class WebSupportProjectPrerequisite extends ProjectPrerequisite {\n /** Ensure a project that hasn't explicitly disabled web support has all the required packages for running in the browser. */\n async assertImplementation(): Promise<void> {\n if (env.EXPO_NO_WEB_SETUP) {\n Log.warn('Skipping web setup: EXPO_NO_WEB_SETUP is enabled.');\n return;\n }\n debug('Ensuring web support is setup');\n\n const result = await this._shouldSetupWebSupportAsync();\n\n // Ensure web packages are installed\n await this._ensureWebDependenciesInstalledAsync({ exp: result.exp });\n }\n\n /** Exposed for testing. */\n async _shouldSetupWebSupportAsync(): Promise<ProjectConfig> {\n const config = getConfig(this.projectRoot);\n\n // Detect if the 'web' string is purposefully missing from the platforms array.\n if (isWebPlatformExcluded(config.rootConfig)) {\n // Get exact config description with paths.\n const configName = getProjectConfigDescriptionWithPaths(this.projectRoot, config);\n throw new PrerequisiteCommandError(\n 'WEB_SUPPORT',\n chalk`Skipping web setup: {bold \"web\"} is not included in the project ${configName} {bold \"platforms\"} array.`\n );\n }\n\n return config;\n }\n\n /** Exposed for testing. */\n async _ensureWebDependenciesInstalledAsync({ exp }: { exp: ExpoConfig }): Promise<boolean> {\n const requiredPackages: ResolvedPackage[] = [\n // use react-native-web/package.json to skip node module cache issues when the user installs\n // the package and attempts to resolve the module in the same process.\n { file: 'react-native-web/package.json', pkg: 'react-native-web'
|
|
1
|
+
{"version":3,"sources":["../../../../../src/start/doctor/web/WebSupportProjectPrerequisite.ts"],"sourcesContent":["import {\n AppJSONConfig,\n ExpoConfig,\n getConfig,\n getProjectConfigDescriptionWithPaths,\n ProjectConfig,\n} from '@expo/config';\nimport chalk from 'chalk';\n\nimport * as Log from '../../../log';\nimport { env } from '../../../utils/env';\nimport { getPlatformBundlers } from '../../server/platformBundlers';\nimport { PrerequisiteCommandError, ProjectPrerequisite } from '../Prerequisite';\nimport { ensureDependenciesAsync } from '../dependencies/ensureDependenciesAsync';\nimport { ResolvedPackage } from '../dependencies/getMissingPackages';\n\nconst debug = require('debug')('expo:doctor:webSupport') as typeof console.log;\n\n/** Ensure the project has the required web support settings. */\nexport class WebSupportProjectPrerequisite extends ProjectPrerequisite {\n /** Ensure a project that hasn't explicitly disabled web support has all the required packages for running in the browser. */\n async assertImplementation(): Promise<void> {\n if (env.EXPO_NO_WEB_SETUP) {\n Log.warn('Skipping web setup: EXPO_NO_WEB_SETUP is enabled.');\n return;\n }\n debug('Ensuring web support is setup');\n\n const result = await this._shouldSetupWebSupportAsync();\n\n // Ensure web packages are installed\n await this._ensureWebDependenciesInstalledAsync({ exp: result.exp });\n }\n\n /** Exposed for testing. */\n async _shouldSetupWebSupportAsync(): Promise<ProjectConfig> {\n const config = getConfig(this.projectRoot);\n\n // Detect if the 'web' string is purposefully missing from the platforms array.\n if (isWebPlatformExcluded(config.rootConfig)) {\n // Get exact config description with paths.\n const configName = getProjectConfigDescriptionWithPaths(this.projectRoot, config);\n throw new PrerequisiteCommandError(\n 'WEB_SUPPORT',\n chalk`Skipping web setup: {bold \"web\"} is not included in the project ${configName} {bold \"platforms\"} array.`\n );\n }\n\n return config;\n }\n\n /** Exposed for testing. */\n async _ensureWebDependenciesInstalledAsync({ exp }: { exp: ExpoConfig }): Promise<boolean> {\n const requiredPackages: ResolvedPackage[] = [\n // use react-native-web/package.json to skip node module cache issues when the user installs\n // the package and attempts to resolve the module in the same process.\n { file: 'react-native-web/package.json', pkg: 'react-native-web' },\n { file: 'react-dom/package.json', pkg: 'react-dom' },\n ];\n\n const bundler = getPlatformBundlers(exp).web;\n // Only include webpack-config if bundler is webpack.\n if (bundler === 'webpack') {\n requiredPackages.push(\n // `webpack` and `webpack-dev-server` should be installed in the `@expo/webpack-config`\n {\n file: '@expo/webpack-config/package.json',\n pkg: '@expo/webpack-config',\n dev: true,\n }\n );\n }\n\n try {\n return await ensureDependenciesAsync(this.projectRoot, {\n // This never seems to work when prompting, installing, and running -- instead just inform the user to run the install command and try again.\n skipPrompt: true,\n exp,\n installMessage: `It looks like you're trying to use web support but don't have the required dependencies installed.`,\n warningMessage: chalk`If you're not using web, please ensure you remove the {bold \"web\"} string from the platforms array in the project Expo config.`,\n requiredPackages,\n });\n } catch (error) {\n // Reset the cached check so we can re-run the check if the user re-runs the command by pressing 'w' in the Terminal UI.\n this.resetAssertion();\n throw error;\n }\n }\n}\n\n/** Return `true` if the `web` platform is purposefully excluded from the project Expo config. */\nexport function isWebPlatformExcluded(rootConfig: AppJSONConfig): boolean {\n // Detect if the 'web' string is purposefully missing from the platforms array.\n const isWebExcluded =\n Array.isArray(rootConfig.expo?.platforms) &&\n !!rootConfig.expo?.platforms.length &&\n !rootConfig.expo?.platforms.includes('web');\n return isWebExcluded;\n}\n"],"names":["isWebPlatformExcluded","Log","debug","require","WebSupportProjectPrerequisite","ProjectPrerequisite","assertImplementation","env","EXPO_NO_WEB_SETUP","warn","result","_shouldSetupWebSupportAsync","_ensureWebDependenciesInstalledAsync","exp","config","getConfig","projectRoot","rootConfig","configName","getProjectConfigDescriptionWithPaths","PrerequisiteCommandError","chalk","requiredPackages","file","pkg","bundler","getPlatformBundlers","web","push","dev","ensureDependenciesAsync","skipPrompt","installMessage","warningMessage","error","resetAssertion","isWebExcluded","Array","isArray","expo","platforms","length","includes"],"mappings":"AAAA;;;;QA2FgBA,qBAAqB,GAArBA,qBAAqB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AAe;IAJlB,+EAA+E;IAC/E,MAAMmB,aAAa,GACjBC,KAAK,CAACC,OAAO,CAACrB,CAAAA,GAAe,GAAfA,UAAU,CAACsB,IAAI,SAAW,GAA1BtB,KAAAA,CAA0B,GAA1BA,GAAe,CAAEuB,SAAS,CAAC,IACzC,CAAC,EAACvB,CAAAA,IAAe,GAAfA,UAAU,CAACsB,IAAI,SAAW,GAA1BtB,KAAAA,CAA0B,GAA1BA,IAAe,CAAEuB,SAAS,CAACC,MAAM,CAAA,IACnC,CAACxB,CAAAA,CAAAA,IAAe,GAAfA,UAAU,CAACsB,IAAI,SAAW,GAA1BtB,KAAAA,CAA0B,GAA1BA,IAAe,CAAEuB,SAAS,CAACE,QAAQ,CAAC,KAAK,CAAC,CAAA,AAAC;IAC9C,OAAON,aAAa,CAAC;CACtB"}
|
|
@@ -128,7 +128,7 @@ async function createHostInfoAsync() {
|
|
|
128
128
|
host: await _userSettings.default.getAnonymousIdentifierAsync(),
|
|
129
129
|
server: "expo",
|
|
130
130
|
// Defined in the build step
|
|
131
|
-
serverVersion: "0.2.
|
|
131
|
+
serverVersion: "0.2.1",
|
|
132
132
|
serverDriver: _manifestMiddleware.DEVELOPER_TOOL,
|
|
133
133
|
serverOS: _os.default.platform(),
|
|
134
134
|
serverOSVersion: _os.default.release()
|
|
@@ -80,7 +80,7 @@ function logEvent(event, properties = {}) {
|
|
|
80
80
|
ensureIdentified();
|
|
81
81
|
const { userId , deviceId } = identifyData != null ? identifyData : {};
|
|
82
82
|
const commonEventProperties = {
|
|
83
|
-
source_version: "0.2.
|
|
83
|
+
source_version: "0.2.1",
|
|
84
84
|
source: "expo"
|
|
85
85
|
};
|
|
86
86
|
const identity = {
|
|
@@ -121,7 +121,7 @@ function getContext() {
|
|
|
121
121
|
},
|
|
122
122
|
app: {
|
|
123
123
|
name: "expo",
|
|
124
|
-
version: "0.2.
|
|
124
|
+
version: "0.2.1"
|
|
125
125
|
},
|
|
126
126
|
ci: ciInfo.isCI ? {
|
|
127
127
|
name: ciInfo.name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "The Expo CLI",
|
|
5
5
|
"main": "build/bin/cli",
|
|
6
6
|
"bin": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@babel/runtime": "^7.14.0",
|
|
40
40
|
"@expo/code-signing-certificates": "^0.0.2",
|
|
41
|
-
"@expo/config": "~
|
|
41
|
+
"@expo/config": "~7.0.0",
|
|
42
42
|
"@expo/config-plugins": "~5.0.0",
|
|
43
43
|
"@expo/dev-server": "~0.1.110",
|
|
44
44
|
"@expo/devcert": "^1.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@expo/prebuild-config": "~5.0.0",
|
|
51
51
|
"@expo/rudder-sdk-node": "1.1.1",
|
|
52
52
|
"@expo/spawn-async": "1.5.0",
|
|
53
|
-
"@expo/xcpretty": "^4.1
|
|
53
|
+
"@expo/xcpretty": "^4.2.1",
|
|
54
54
|
"@urql/core": "2.3.6",
|
|
55
55
|
"@urql/exchange-retry": "0.3.0",
|
|
56
56
|
"accepts": "^1.3.8",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"structured-headers": "^0.4.1",
|
|
138
138
|
"taskr": "1.1.0"
|
|
139
139
|
},
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "8151bf48e683a50e942ef213f7978b35c41f5e11"
|
|
141
141
|
}
|