Skip to content

Commit

Permalink
[cli] do not pin dependencies unless it's necessary (#28974)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simek committed May 28, 2024
1 parent bfc2e7e commit 3f25823
Show file tree
Hide file tree
Showing 5 changed files with 256 additions and 350 deletions.
40 changes: 20 additions & 20 deletions packages/@expo/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"homepage": "https://github.com/expo/expo/tree/main/packages/@expo/cli",
"dependencies": {
"@babel/runtime": "^7.20.0",
"@expo/code-signing-certificates": "0.0.5",
"@expo/code-signing-certificates": "^0.0.5",
"@expo/config": "~9.0.0",
"@expo/config-plugins": "~8.0.0",
"@expo/devcert": "^1.1.2",
Expand All @@ -50,15 +50,15 @@
"@expo/osascript": "^2.0.31",
"@expo/package-manager": "^1.5.0",
"@expo/plist": "^0.1.0",
"@expo/prebuild-config": "7.0.4",
"@expo/rudder-sdk-node": "1.1.1",
"@expo/prebuild-config": "^7.0.4",
"@expo/rudder-sdk-node": "^1.1.1",
"@expo/spawn-async": "^1.7.2",
"@expo/xcpretty": "^4.3.0",
"@react-native/dev-middleware": "~0.74.75",
"@urql/core": "2.3.6",
"@urql/core": "^2.3.6",
"@urql/exchange-retry": "0.3.0",
"accepts": "^1.3.8",
"arg": "5.0.2",
"arg": "^5.0.2",
"better-opn": "~3.0.2",
"bplist-parser": "^0.3.1",
"cacache": "^18.0.2",
Expand All @@ -70,14 +70,14 @@
"fast-glob": "^3.3.2",
"find-yarn-workspace-root": "~2.0.0",
"form-data": "^3.0.1",
"freeport-async": "2.0.0",
"freeport-async": "^2.0.0",
"fs-extra": "~8.1.0",
"getenv": "^1.0.0",
"glob": "^7.1.7",
"graphql": "15.8.0",
"graphql": "^15.8.0",
"graphql-tag": "^2.10.1",
"https-proxy-agent": "^5.0.1",
"internal-ip": "4.3.0",
"internal-ip": "^4.3.0",
"is-docker": "^2.0.0",
"is-wsl": "^2.1.1",
"js-yaml": "^3.13.1",
Expand All @@ -89,10 +89,10 @@
"node-forge": "^1.3.1",
"npm-package-arg": "^7.0.0",
"open": "^8.3.0",
"ora": "3.4.0",
"ora": "^3.4.0",
"picomatch": "^3.0.1",
"pretty-bytes": "5.6.0",
"progress": "2.0.3",
"pretty-bytes": "^5.6.0",
"progress": "^2.0.3",
"prompts": "^2.3.2",
"qrcode-terminal": "0.11.0",
"require-from-string": "^2.0.2",
Expand All @@ -111,7 +111,7 @@
"tempy": "^0.7.1",
"terminal-link": "^2.1.1",
"text-table": "^0.2.0",
"url-join": "4.0.0",
"url-join": "^4.0.0",
"wrap-ansi": "^7.0.0",
"ws": "^8.12.1"
},
Expand All @@ -125,14 +125,14 @@
"@expo/ngrok": "4.1.3",
"@expo/server": "^0.4.0",
"@expo/webpack-config": "^0.17.4",
"@graphql-codegen/cli": "2.16.3",
"@graphql-codegen/typescript": "2.8.7",
"@graphql-codegen/typescript-operations": "2.5.12",
"@graphql-codegen/cli": "^2.16.3",
"@graphql-codegen/typescript": "^2.8.7",
"@graphql-codegen/typescript-operations": "^2.5.12",
"@playwright/test": "^1.40.1",
"@swc/core": "~1.2.249",
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
"@taskr/clear": "^1.1.0",
"@taskr/esnext": "^1.1.0",
"@taskr/watch": "^1.1.0",
"@types/accepts": "^1.3.5",
"@types/cacache": "^17.0.2",
"@types/connect": "^3.4.33",
Expand All @@ -153,7 +153,7 @@
"@types/text-table": "^0.2.1",
"@types/url-join": "^4.0.0",
"@types/webpack": "~4.41.32",
"@types/webpack-dev-server": "3.11.0",
"@types/webpack-dev-server": "^3.11.0",
"@types/wrap-ansi": "^8.0.1",
"@types/ws": "^8.5.4",
"devtools-protocol": "^0.0.1113120",
Expand All @@ -167,7 +167,7 @@
"node-html-parser": "^6.1.5",
"nullthrows": "^1.1.1",
"playwright": "^1.40.1",
"taskr": "1.1.0",
"taskr": "^1.1.0",
"tree-kill": "^1.2.2",
"tsd": "^0.28.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { ReactNode } from 'react';
import type { TextProps, GestureResponderEvent } from 'react-native';

export namespace ExpoRouter {
type StaticRoutes = `/_sitemap` | `/apple` | `/banana` | `/static` | `/(group)/static` | `/folder` | `/(a)/folder` | `/(group)/folder` | `/(group)/(a)/folder` | `/(b)/folder` | `/(group)/(b)/folder`;
type DynamicRoutes<T extends string> = `/colors/${SingleRoutePart<T>}` | `/animals/${CatchAllRoutePart<T>}` | `/mix/${SingleRoutePart<T>}/${SingleRoutePart<T>}/${CatchAllRoutePart<T>}` | `/folder/${SingleRoutePart<T>}` | `/(a)/folder/${SingleRoutePart<T>}` | `/(group)/folder/${SingleRoutePart<T>}` | `/(group)/(a)/folder/${SingleRoutePart<T>}` | `/folder/${CatchAllRoutePart<T>}` | `/(a)/folder/${CatchAllRoutePart<T>}` | `/(group)/folder/${CatchAllRoutePart<T>}` | `/(group)/(a)/folder/${CatchAllRoutePart<T>}` | `/(b)/folder/${SingleRoutePart<T>}` | `/(group)/(b)/folder/${SingleRoutePart<T>}` | `/(b)/folder/${CatchAllRoutePart<T>}` | `/(group)/(b)/folder/${CatchAllRoutePart<T>}`;
type DynamicRouteTemplate = `/colors/[color]` | `/animals/[...animal]` | `/mix/[fruit]/[color]/[...animals]` | `/folder/[slug]` | `/(a)/folder/[slug]` | `/(group)/folder/[slug]` | `/(group)/(a)/folder/[slug]` | `/folder/[...slug]` | `/(a)/folder/[...slug]` | `/(group)/folder/[...slug]` | `/(group)/(a)/folder/[...slug]` | `/(b)/folder/[slug]` | `/(group)/(b)/folder/[slug]` | `/(b)/folder/[...slug]` | `/(group)/(b)/folder/[...slug]`;
type StaticRoutes = `/(a)/folder` | `/(b)/folder` | `/(group)/(a)/folder` | `/(group)/(b)/folder` | `/(group)/folder` | `/(group)/static` | `/_sitemap` | `/apple` | `/banana` | `/folder` | `/static`;
type DynamicRoutes<T extends string> = `/(a)/folder/${CatchAllRoutePart<T>}` | `/(a)/folder/${SingleRoutePart<T>}` | `/(b)/folder/${CatchAllRoutePart<T>}` | `/(b)/folder/${SingleRoutePart<T>}` | `/(group)/(a)/folder/${CatchAllRoutePart<T>}` | `/(group)/(a)/folder/${SingleRoutePart<T>}` | `/(group)/(b)/folder/${CatchAllRoutePart<T>}` | `/(group)/(b)/folder/${SingleRoutePart<T>}` | `/(group)/folder/${CatchAllRoutePart<T>}` | `/(group)/folder/${SingleRoutePart<T>}` | `/animals/${CatchAllRoutePart<T>}` | `/colors/${SingleRoutePart<T>}` | `/folder/${CatchAllRoutePart<T>}` | `/folder/${SingleRoutePart<T>}` | `/mix/${SingleRoutePart<T>}/${SingleRoutePart<T>}/${CatchAllRoutePart<T>}`;
type DynamicRouteTemplate = `/(a)/folder/[...slug]` | `/(a)/folder/[slug]` | `/(b)/folder/[...slug]` | `/(b)/folder/[slug]` | `/(group)/(a)/folder/[...slug]` | `/(group)/(a)/folder/[slug]` | `/(group)/(b)/folder/[...slug]` | `/(group)/(b)/folder/[slug]` | `/(group)/folder/[...slug]` | `/(group)/folder/[slug]` | `/animals/[...animal]` | `/colors/[color]` | `/folder/[...slug]` | `/folder/[slug]` | `/mix/[fruit]/[color]/[...animals]`;

export type RelativePathString = `./${string}` | `../${string}` | '..';
export type AbsoluteRoute = DynamicRouteTemplate | StaticRoutes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import chalk from 'chalk';
import type { Application } from 'express';
import fs from 'fs';
import http from 'http';
import * as path from 'path';
import fs from 'node:fs';
import http from 'node:http';
import path from 'node:path';
import resolveFrom from 'resolve-from';
import type webpack from 'webpack';
import type WebpackDevServer from 'webpack-dev-server';
Expand Down Expand Up @@ -186,11 +186,7 @@ export class WebpackBundlerDevServer extends BundlerDevServer {
// Create a webpack compiler that is configured with custom messages.
const compiler = webpack(config);

const server = new WebpackDevServer(
// @ts-expect-error: type mismatch -- Webpack types aren't great.
compiler,
config.devServer
);
const server = new WebpackDevServer(compiler, config.devServer);
// Launch WebpackDevServer.
server.listen(port, env.WEB_HOST, function (this: http.Server, error) {
if (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ describe('startAsync', () => {
});

// Cache is cleared...
expect(vol.toJSON()['/.expo/web/cache']).toBe(null);
expect(vol.toJSON()['/.expo/web/cache']).toBe(undefined);
});
});

Expand Down
Loading

0 comments on commit 3f25823

Please sign in to comment.