Skip to content

feat: enforce and normalize package dependencies #316

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

Merged
merged 10 commits into from
Mar 31, 2025

Conversation

Hotell
Copy link
Contributor

@Hotell Hotell commented Feb 26, 2025

  • enables @nx/dependency-check for all projects
  • removes eslint-plugin-import from monorepo
  • resolve issues with invalid dependencies in whole monorepo
  • moves peerDependency generation to component generator making library generator platform/technology agnostic

Related issues:

@Hotell Hotell force-pushed the resolve-dependency-issues branch from 898c6eb to d3516d2 Compare February 26, 2025 12:59
@Hotell Hotell changed the title Resolve dependency issues feat: enforce and normalize package dependencies Feb 26, 2025
"@fluentui/react-jsx-runtime": ">=9.0.29 < 10.0.0",
"@fluentui/keyboard-keys": "~9.0.6",
"@fluentui/react-tabster": "~9.14.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

using version range that is not present in the monorepo - changed to ^ , please provide context if you need to use ~ for version range ( in this case current decision introduces duplicates in user land 🚨 )

@@ -1,4 +1,4 @@
import type { BrandVariants } from '@fluentui/react-theme';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

using imports from suite is highly recommended if possible

unstable_hasDefault: true,
});
export const useChatMoverAttribute_unstable = (): ReturnType<
typeof useArrowNavigationGroup
Copy link
Contributor Author

Choose a reason for hiding this comment

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

using transitive dependency package for internal type assertion is a bad practice - recommended solution is to always use direct dependency - ideally from suite package.

this mitigates direct dependency requirement for tabster

@@ -3,30 +3,18 @@
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "packages/react-gamepad-navigation/src",
"projectType": "library",
"release": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

seems this project used old generator - removing cruft

@@ -1,6 +1,6 @@
import type { SlotClassNames, TabState } from '@fluentui/react-components';
import { mergeClasses } from '@fluentui/react-components';
// eslint-disable-next-line import/no-extraneous-dependencies
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we don't use this rule anymore

"dependencies": {
"@fluentui/react-jsx-runtime": "^9.0.29",
"@fluentui/react-tabs": "^9.5.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is intended change (until nrwl/nx#29853 lands)

  • NOTE that this will not introduce duplicates as the version range for sub-package is compatible with suite

@Hotell Hotell force-pushed the resolve-dependency-issues branch from 43c9de1 to c617ea0 Compare March 31, 2025 10:12
@Hotell Hotell requested a review from hectorjjb as a code owner March 31, 2025 10:12
@Hotell Hotell merged commit 02f6d1c into microsoft:main Mar 31, 2025
3 checks passed
@Hotell Hotell deleted the resolve-dependency-issues branch March 31, 2025 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants