Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: upgrade webpack-dev-server to v5 #13663

Merged
merged 7 commits into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"link-dev": "mkdir -p .bin/ && cd packages/amplify-cli && ln -s \"$(pwd)/bin/amplify\" ../../.bin/amplify-dev && cd ../../",
"link-win": "node ./scripts/link-bin.js packages/amplify-cli/bin/amplify amplify-dev",
"lint-check-package-json": "yarn eslint --no-eslintrc --config .eslint.package.json.js '**/package.json'",
"lint-check": "yarn eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=755",
"lint-check": "yarn eslint . --ext .js,.jsx,.ts,.tsx --max-warnings=750",
"lint-fix-package-json": "yarn lint-check-package-json --fix",
"lint-fix": "git diff --name-only --cached --diff-filter d | grep -E '\\.(js|jsx|ts|tsx)$' | xargs eslint --fix --quiet",
"mergewords": "yarn ts-node ./scripts/handle-dict-conflicts.ts",
Expand Down Expand Up @@ -174,6 +174,7 @@
"tough-cookie": "^4.1.3",
"semver": "^7.5.4",
"word-wrap": "^1.2.4",
"follow-redirects": "^1.15.6",
"amplify-codegen": "4.7.3",
"@aws-amplify/appsync-modelgen-plugin": "2.8.1"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as WebSocket from 'ws';
import { Server as WebSocketServer, ServerOptions } from 'ws';
import {
GQLMessageConnectionAck,
GQLMessageConnectionInit,
GQLMessageSubscriptionStart,
GQLMessageSubscriptionStop,
isSubscriptionConnectionInitMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@ import {
} from './plugin-client-api-analytics';
import { IChannelAPIResponse, ChannelAction, ChannelConfigDeploymentType } from './channel-types';

import {
buildPinpointChannelResponseSuccess,
getPinpointAppStatusFromMeta,
IPinpointAppStatus,
IPinpointDeploymentStatus,
} from './pinpoint-helper';
import { buildPinpointChannelResponseSuccess, getPinpointAppStatusFromMeta, IPinpointDeploymentStatus } from './pinpoint-helper';
import { ChannelType, getChannelViewName, isChannelEnabledNotificationsBackendConfig } from './notifications-backend-cfg-channel-api';
import { getNotificationsAppMeta } from './notifications-amplify-meta-api';
import { getNotificationsAppConfig } from './notifications-backend-cfg-api';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ export const buildResource = async ({ buildType, srcRoot, lastBuildTimeStamp }:
const outDir = path.join(srcRoot, buildDir);

const isWindows = process.platform.startsWith('win');
const executableName = isWindows && buildType === BuildType.DEV ? MAIN_BINARY_WIN : MAIN_BINARY;
const executablePath = path.join(outDir, executableName);

if (!lastBuildTimeStamp || isBuildStale(srcRoot, lastBuildTimeStamp, outDir)) {
const srcDir = path.join(srcRoot, SRC);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ export const showSMSSandboxWarning = async (context): Promise<void> => {

const showGraphQLTransformerMigrationMessage = (): void => {
const hasGraphqlApi = !!Object.entries(stateManager.getMeta().api || {})
.filter(([__, apiResource]) => (apiResource as $TSAny).service === 'AppSync')
.filter(([, apiResource]) => (apiResource as $TSAny).service === 'AppSync')
.map(([name]) => name).length;
const suppressMessage = FeatureFlags.getBoolean('graphqltransformer.suppressSchemaMigrationPrompt');
const usingV2 = FeatureFlags.getNumber('graphqltransformer.transformerVersion') === 2;
Expand All @@ -293,7 +293,7 @@ export const showGraphQLTransformerVersion = async (context): Promise<void> => {
const meta = stateManager.getMeta();
const apiObject = (meta && meta.api) || {};
const hasGraphqlApi = !!Object.entries(apiObject)
.filter(([__, apiResource]) => (apiResource as $TSAny).service === 'AppSync')
.filter(([, apiResource]) => (apiResource as $TSAny).service === 'AppSync')
.map(([name]) => name).length;

if (!hasGraphqlApi) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,5 +481,5 @@ export class GraphQLResourceManager {
};

private getTableNameFromTemplate = (template: Template): string | undefined =>
Object.entries(template?.Resources || {}).find(([_, resource]) => resource.Type === 'AWS::DynamoDB::Table')?.[0];
Object.entries(template?.Resources || {}).find(([, resource]) => resource.Type === 'AWS::DynamoDB::Table')?.[0];
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const lambdaArnToConfig = async (context: $TSContext, arn: $TSAny): Promi
throw new Error(`Cannot interpret Lambda ARN [${JSON.stringify(arn)}]${errorSuffix}`);
}
const lambdaNames = _.entries<{ service: string }>(_.get(stateManager.getMeta(), ['function']))
.filter(([_, funcMeta]) => funcMeta.service === ServiceName.LambdaFunction)
.filter(([, funcMeta]) => funcMeta.service === ServiceName.LambdaFunction)
.map(([key]) => key);
const foundLambdaName = lambdaNames.find((name) => searchString.includes(name));
if (!foundLambdaName) {
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19604,13 +19604,13 @@ __metadata:
languageName: node
linkType: hard

"follow-redirects@npm:^1.0.0, follow-redirects@npm:^1.15.4":
version: 1.15.5
resolution: "follow-redirects@npm:1.15.5"
"follow-redirects@npm:^1.15.6":
version: 1.15.6
resolution: "follow-redirects@npm:1.15.6"
peerDependenciesMeta:
debug:
optional: true
checksum: 418d71688ceaf109dfd6f85f747a0c75de30afe43a294caa211def77f02ef19865b547dfb73fde82b751e1cc507c06c754120b848fe5a7400b0a669766df7615
checksum: 9ff767f0d7be6aa6870c82ac79cf0368cd73e01bbc00e9eb1c2a16fbb198ec105e3c9b6628bb98e9f3ac66fe29a957b9645bcb9a490bb7aa0d35f908b6b85071
languageName: node
linkType: hard

Expand Down
Loading