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(deps): Fix transitive dependencies #5796

Merged
merged 38 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f8a1494
Add eslint rule to each monorepo package to prevent transitive deps
esauerbo Sep 10, 2024
41254a3
Add allowed devDep paths
esauerbo Sep 10, 2024
9f3dceb
Merge branch 'main' of https://github.com/aws-amplify/amplify-ui into…
esauerbo Sep 11, 2024
a95438a
Ignore testing when checking for transitive deps
esauerbo Sep 11, 2024
9601199
Cleanup
esauerbo Sep 11, 2024
e036ce9
Update amplify core peer dep range
esauerbo Sep 11, 2024
1787aca
Update package.json
esauerbo Sep 11, 2024
9ce9c8c
Update angular linting
esauerbo Sep 11, 2024
13a891b
Remove coverage from ignorePatterns
esauerbo Sep 12, 2024
8740c1e
Remove dep from react core
esauerbo Sep 12, 2024
cf9687a
Move rule to core eslint config
esauerbo Sep 12, 2024
040c2cf
Merge branch 'main' of https://github.com/aws-amplify/amplify-ui into…
esauerbo Sep 12, 2024
b1e35ae
update yarn lock
esauerbo Sep 12, 2024
4947631
update amplify core dependency
esauerbo Sep 12, 2024
89720de
Update packages/react/package.json
esauerbo Sep 13, 2024
f6e2aea
Change linting rule to use glob pattern
esauerbo Sep 13, 2024
c58996b
Merge branch 'fix-transitive-deps' of https://github.com/aws-amplify/…
esauerbo Sep 13, 2024
cf6b613
Update amplify peer dep
esauerbo Sep 13, 2024
1c350a1
Fix linting rule in angular package
esauerbo Sep 13, 2024
4e687c1
Add liveness types with eslint disable
esauerbo Sep 13, 2024
a198fa8
add ui linting rules
esauerbo Sep 13, 2024
7b3dc30
Add amplify core peer dep to react-core
esauerbo Sep 13, 2024
f2ecc2b
Add async storage as RN peer dep
esauerbo Sep 13, 2024
0ed14d9
Update dependencies
esauerbo Sep 17, 2024
f7711c3
Cleanup
esauerbo Sep 17, 2024
27ed51a
Update amplify peer dep to use relative version
esauerbo Sep 19, 2024
754187c
Merge branch 'main' of https://github.com/aws-amplify/amplify-ui into…
esauerbo Sep 19, 2024
3cffbff
Move async storage to dev dep
esauerbo Sep 19, 2024
7314a9d
Add core devDep to react-core package
esauerbo Sep 19, 2024
4e6650a
Merge branch 'main' of https://github.com/aws-amplify/amplify-ui into…
esauerbo Sep 19, 2024
182ad9b
cleanup unrelated files
esauerbo Sep 19, 2024
1ef3406
update yarn.lock
esauerbo Sep 19, 2024
68642bc
update package.json
esauerbo Sep 19, 2024
61e94c6
Add linting rule for vue
esauerbo Sep 20, 2024
dc06f49
Add vscode settings
esauerbo Sep 20, 2024
4784042
Create early-donuts-invent.md
esauerbo Sep 23, 2024
1b80d4a
Merge branch 'main' of https://github.com/aws-amplify/amplify-ui into…
esauerbo Sep 23, 2024
9dc445b
Merge branch 'fix-transitive-deps' of https://github.com/aws-amplify/…
esauerbo Sep 23, 2024
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
16 changes: 16 additions & 0 deletions .changeset/early-donuts-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
"@aws-amplify/ui-react-ai": patch
"@aws-amplify/ui-react-core-notifications": patch
"@aws-amplify/ui-react-core": patch
"@aws-amplify/ui-react-geo": patch
"@aws-amplify/ui-react-liveness": patch
"@aws-amplify/ui-react-native": patch
"@aws-amplify/ui-react-notifications": patch
"@aws-amplify/ui-react-storage": patch
"@aws-amplify/ui-react": patch
"@aws-amplify/ui": patch
"@aws-amplify/ui-vue": patch
"@aws-amplify/ui-angular": patch
---

chore(deps): Fix transitive dependencies.
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"eslint.workingDirectories": [
{ "pattern": "./packages/*", "changeProcessCWD": true }
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"@types/jest": "^29.5.5",
"@types/react-test-renderer": "^18.0.2",
"@vitejs/plugin-vue": "^2.3.4",
"aws-amplify": "6.4.3",
"aws-amplify": "^6.6.0",
"esbuild-register": "^3.5.0",
"eslint": "^8.44.0",
"fs-extra": "^11.1.1",
Expand Down
17 changes: 16 additions & 1 deletion packages/angular/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,22 @@ module.exports = {
},
{
extends: ['@aws-amplify/amplify-ui/jest'],
files: ['**/__mocks__/**', '**/__tests__/**'],
files: [
'**/__tests__/**',
// this file doesn't fit the typical pattern of being in a __tests__ directory
'./projects/ui-angular/src/lib/components/authenticator/components/setup-totp/setup-totp.component.spec.ts',
calebpollman marked this conversation as resolved.
Show resolved Hide resolved
],
},
{
rules: {
'import/no-extraneous-dependencies': [
'error',
{
packageDir: ['.', '../..', './projects/ui-angular'],
},
],
},
files: ['**/*.ts'],
},
],
};
5 changes: 2 additions & 3 deletions packages/angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"build": "ng build --configuration production",
"test": "jest",
"test:watch": "yarn test --watch",
"lint": "ng lint"
"lint": "yarn typecheck && ng lint",
"typecheck": "tsc --noEmit"
},
"license": "Apache-2.0",
"devDependencies": {
Expand All @@ -21,7 +22,6 @@
"@angular-eslint/template-parser": "~14.4.0",
"@angular/animations": "^14.3.0",
"@angular/cli": "^14.2.13",
"@angular/common": "^14.3.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removing "@angular/common" (and "rxjs" below) doesn't feel quite right to me. Can you explain why we would remove them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"@angular/compiler": "^14.3.0",
"@angular/compiler-cli": "^14.3.0",
"@angular/core": "^14.3.0",
Expand All @@ -36,7 +36,6 @@
"jest-preset-angular": "^13.1.1",
"ng-mocks": "^14.10.1",
"ng-packagr": "^14.2.2",
"rxjs": "^7.8.1",
"ts-node": "^10.9.1",
"tslib": "^2.5.2",
"typescript": "~4.6.4",
Expand Down
2 changes: 2 additions & 0 deletions packages/angular/projects/ui-angular/ng-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"entryFile": "src/index.ts"
},
"allowedNonPeerDependencies": [
calebpollman marked this conversation as resolved.
Show resolved Hide resolved
"@angular/common",
"@aws-amplify/ui",
"classnames",
"nanoid",
"rxjs",
"qrcode",
"xstate"
]
Expand Down
4 changes: 3 additions & 1 deletion packages/angular/projects/ui-angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
},
"peerDependencies": {
"@angular/core": ">= 14.0.0",
"aws-amplify": "^6.3.2"
"aws-amplify": "^6.6.0"
},
"dependencies": {
"@angular/common": "^14.3.0",
"@aws-amplify/ui": "6.6.0",
"nanoid": "3.1.31",
"rxjs": "^7.8.1",
"qrcode": "1.5.0",
"tslib": "^2.5.2",
"xstate": "^4.33.6"
Expand Down
8 changes: 7 additions & 1 deletion packages/configs/eslint/configs/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
env: { node: true },
plugins: ['@typescript-eslint', 'index'],
plugins: ['@typescript-eslint', 'import', 'index'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
Expand Down Expand Up @@ -45,6 +45,12 @@ module.exports = {
'generator-star-spacing': 'off',
'global-require': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-extraneous-dependencies': [
'error',
{
packageDir: ['.', '../..'],
},
],
'index/only-import-export': 'error',
'max-params': 2,
'no-alert': 'error',
Expand Down
3 changes: 2 additions & 1 deletion packages/react-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/api-graphql": "^4.3.0",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"tslib": "^2.5.2"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/react-core-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,12 @@
"@aws-amplify/ui-react-core": "3.0.24",
"@xstate/react": "3.2.2",
"lodash": "4.17.21",
"qrcode": "1.5.0",
"xstate": "^4.33.6"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0"
},
"sideEffects": false
Expand Down
2 changes: 1 addition & 1 deletion packages/react-core-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@aws-amplify/ui-react-core": "3.0.24"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0"
},
"sideEffects": false
Expand Down
5 changes: 4 additions & 1 deletion packages/react-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,11 @@
"react-hook-form": "^7.43.5",
"xstate": "^4.33.6"
},
"devDependencies": {
"@aws-amplify/core": "^6.4.0"
},
calebpollman marked this conversation as resolved.
Show resolved Hide resolved
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0"
},
"sideEffects": false
Expand Down
4 changes: 2 additions & 2 deletions packages/react-geo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
"tslib": "^2.5.2"
},
"peerDependencies": {
"@aws-amplify/geo": "^3.0.40",
"aws-amplify": "^6.3.2",
"@aws-amplify/geo": "^3.0.47",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/react-liveness/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"typecheck": "tsc --noEmit"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand All @@ -55,6 +56,7 @@
"@smithy/fetch-http-handler": "^2.1.3",
"@smithy/protocol-http": "^3.0.3",
"@smithy/signature-v4": "2.1.4",
"@smithy/types": "^3.3.0",
calebpollman marked this conversation as resolved.
Show resolved Hide resolved
"@mediapipe/face_detection": "~0.4.0",
"@tensorflow-models/face-detection": "1.0.2",
"@tensorflow/tfjs-backend-cpu": "4.11.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ import {
} from '@smithy/eventstream-serde-browser';
import { FetchHttpHandler } from '@smithy/fetch-http-handler';
import { HttpRequest, HttpResponse } from '@smithy/protocol-http';
import {
Provider,
RequestHandler,
RequestHandlerMetadata,
} from '@smithy/types';
import { Provider, RequestHandler, RequestHandlerMetadata } from './types';
import { WS_CLOSURE_CODE } from '../constants';

const DEFAULT_WS_CONNECTION_TIMEOUT_MS = 2000;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { SignatureV4 } from '@smithy/signature-v4';
import {
HttpRequest as HttpRequest,
RequestPresigningArguments,
} from '@smithy/types';
} from './types';

// override aws sdk default value of 60
export const REQUEST_EXPIRY = 299;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// eslint-disable-next-line import/no-extraneous-dependencies -- types can't be added as a dependency
export {
HttpRequest,
Provider,
RequestHandler,
RequestHandlerMetadata,
RequestPresigningArguments,
} from '@smithy/types';
2 changes: 1 addition & 1 deletion packages/react-native-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"qrcode": "1.5.0"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "^18",
"react-native": "^0.70 || ^0.71 || ^0.72"
},
Expand Down
4 changes: 3 additions & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@babel/core": "^7.23.2",
"@babel/preset-env": "^7.23.2",
"@babel/preset-typescript": "^7.23.2",
"@react-native-async-storage/async-storage": "*",
"@testing-library/react-native": "^12.3.0",
"metro-react-native-babel-preset": "^0.77.0",
"react-native-safe-area-context": "^4.7.3"
Expand All @@ -35,7 +36,8 @@
"style-dictionary": "3.9.1"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "*",
"react-native": "^0.70 || ^0.71 || ^0.72 || ^0.73 || ^0.74 || ^0.75",
"react-native-safe-area-context": "^4.2.5"
},
Expand Down
9 changes: 5 additions & 4 deletions packages/react-notifications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@aws-amplify/ui": "6.6.0",
"@aws-amplify/ui-react": "6.5.0",
"@aws-amplify/ui-react-core-notifications": "2.0.24",
"@aws-amplify/ui": "6.5.0",
"@aws-amplify/ui-react": "6.4.0",
"@aws-amplify/ui-react-core": "3.0.24",
"@aws-amplify/ui-react-core-notifications": "2.0.23",
"tinycolor2": "1.4.2"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/react-storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@
"tslib": "^2.5.2"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're only using @aws-amplify/core in the storage package to reference a deprecated type (StorageAccessLevel), can we manually recreate the type and remove the peer dep? Can be done in a follow up

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah will do this in a followup

"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
3 changes: 2 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@
"tslib": "^2.5.2"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
"aws-amplify": "^6.6.0",
"react": "^16.14.0 || ^17.0 || ^18.0",
"react-dom": "^16.14.0 || ^17.0 || ^18.0"
},
Expand Down
7 changes: 7 additions & 0 deletions packages/ui/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@ module.exports = {
sourceType: 'module',
allowImportExportEverywhere: true,
},
plugins: ['import'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
packageDir: ['.', '../..'],
},
],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-undef': 'off',
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"check:esm": "node --input-type=module --eval 'import \"@aws-amplify/ui\"'",
"clean": "rimraf dist node_modules",
"dev": "yarn build --watch",
"lint": "yarn typecheck",
"lint": "yarn typecheck && eslint src --ext .js,.ts,.tsx",
calebpollman marked this conversation as resolved.
Show resolved Hide resolved
"prebuild": "rimraf dist",
"test": "jest",
"test:watch": "yarn test --watch",
Expand All @@ -49,7 +49,8 @@
"tslib": "^2.5.2"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
"aws-amplify": "^6.6.0",
"xstate": "^4.33.6"
},
"peerDependenciesMeta": {
Expand Down
7 changes: 7 additions & 0 deletions packages/vue/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ require('@rushstack/eslint-patch/modern-module-resolution');

module.exports = {
root: true,
plugins: ['import'],
extends: [
'plugin:vue/vue3-essential',
'eslint:recommended',
Expand All @@ -19,6 +20,12 @@ module.exports = {
},
ignorePatterns: ['dist'],
rules: {
'import/no-extraneous-dependencies': [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nce catch!

'error',
{
packageDir: ['.', '../..'],
},
],
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
'@typescript-eslint/ban-ts-comment': 'off',
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
"vite-jest": "^0.1.4"
},
"peerDependencies": {
"aws-amplify": "^6.3.2",
"@aws-amplify/core": "^6.4.0",
"aws-amplify": "^6.6.0",
"vue": "^3.0"
}
}
Loading
Loading