Skip to content

Commit

Permalink
chore: upgrade webpack-dev-server to v5 (#13663)
Browse files Browse the repository at this point in the history
* chore: upgrade webpack-dev-server to v5

* chore: pin follow-redirects@^1.15.6

* Revert "chore: upgrade webpack-dev-server to v5"

This reverts commit 35904ac.

* fix: lint and threshold

* fix: fix lint error

---------

Co-authored-by: 0.618 <[email protected]>
  • Loading branch information
0618 and 0.618 authored Apr 4, 2024
1 parent 395f717 commit 08377cc
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 18 deletions.
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
2 changes: 0 additions & 2 deletions packages/amplify-go-function-runtime-provider/src/runtime.ts
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];
}
2 changes: 1 addition & 1 deletion packages/amplify-util-mock/src/api/lambda-arn-to-config.ts
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

0 comments on commit 08377cc

Please sign in to comment.