Skip to content

Conversation

@Hotell
Copy link
Contributor

@Hotell Hotell commented Jan 2, 2026

Previous Behavior

New Behavior

This pull request removes manually defined devDependencies from the package.json files across multiple application packages in the workspace. The change is part of a shift to using the Nx dependency graph to manage development dependencies, simplifying package maintenance and reducing duplication. No production dependencies or application logic are affected.

NOTE: actual maintenance boost diff

with changefiles ignored
image

Details:

1. Removed all manually specified devDependencies from the package.json files

  • all devDeps are removed unless they are not 3rd party packages or packages not adhering to single version policy
  • generators are updated to reflect this change

2. scripts-api-extractor dependency resolution is now driven via input cache invalidation rather than hard dependency on the project.

Before:

if scripts-api-extractor is changed all its dependants were affected and triggered all targets

After:

if scripts-api-extractor is changed all its dependants were affected and will trigger only contextually related target. In our case generate-api and build

3. jest-serializer-merge-styles dependency resolution

is now explicitly being loaded via node require.resolve so Nx can infer it as project dependency instead of manually specifing in package.json / implicitDependencies

4. v9 stories lint update

removed invalid 'import/no-extraneous-dependencies' as dep graph is now created purely by Nx

5. removing "@types/react-addons-test-utils

after cleanup, yarn started to fail on CI which was caused by v1 and aliasing issue, this is resolved as part of this PR

Related Issue(s)

  • Fixes #

@Hotell Hotell force-pushed the nx/use-nx-graph-for-devdeps branch from 3bc38e3 to 5659e41 Compare January 2, 2026 15:23
@Hotell Hotell changed the title Nx/use nx graph for devdeps chore: use nx graph instead of manually defined devDependencies in package.json files across whole workspace Jan 2, 2026
"devDependencies": {
"@fluentui/eslint-plugin": "*",
"@fluentui/react": "*",
"@types/react-addons-test-utils": "0.14.18",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

unused 3rd party package. removing

@github-actions
Copy link

github-actions bot commented Jan 2, 2026

📊 Bundle size report

✅ No changes found

@github-actions github-actions bot added the CI label Jan 2, 2026
@Hotell Hotell force-pushed the nx/use-nx-graph-for-devdeps branch from 6d68ef2 to 5fd1b11 Compare January 5, 2026 13:44
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

Pull request demo site: URL

"description": "Fluent UI React local demo app",
"main": "lib-commonjs/index.js",
"module": "lib/index.js",
"exports": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

these nested path imports are used across ssr-tests and public-docsite ( v8 ), in order to be able to resovle the dep graph correctly by nx we added proper API export maps

"build": {
"dependsOn": ["^build"],
"inputs": ["production", "^production"],
"inputs": ["production", "^production", "{workspaceRoot}/scripts/api-extractor/api-extractor.*.json"],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we change any api-extractor config within our scoped library it will invalidate caches and trigger affected build of all packages that use its definitions without need of providing implicit Dependency

Copy link
Contributor

@dmytrokirpa dmytrokirpa left a comment

Choose a reason for hiding this comment

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

Awesome to see so much of the boilerplate gone, even if implicit staff isn’t really my preference.

Everything looks good to me! Just wanted to double-check - are we dropping import/no-extraneous-dependencies, and is it okay to import transitive dependencies now?

{
rules: {
'@typescript-eslint/no-explicit-any': 'warn',
'import/no-extraneous-dependencies': [
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove this rule? What would happen if a developer imports a transitive dependency that isn't listed in the package/monorepo's package.json?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should we remove this rule?

yes ! good catch ty! didn't caught this one as it wasn't failing pipeline. lemme update

What would happen if a developer imports a transitive dependency that isn't listed in the package/monorepo's package.json?

for devDeps or non publishable packages in general we don't care (exempt are applications that can be deployed - aka production deps necessary for docker etc), that's unnecessary overhead as nx will build the graph for us.

@Hotell
Copy link
Contributor Author

Hotell commented Jan 6, 2026

are we dropping import/no-extraneous-dependencies, and is it okay to import transitive dependencies now?

@dmytrokirpa not for publishable packages yet, but we will replace it with nx dep check microsoft/fluentui-contrib#316, this will also enable us to remove lint->build task dependency which will speed up pipeline

@Hotell Hotell merged commit 5e24597 into microsoft:master Jan 7, 2026
12 checks passed
@Hotell Hotell deleted the nx/use-nx-graph-for-devdeps branch January 7, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants