Skip to content

feat(align-deps): notify users when a newer version of a preset is available#4080

Draft
tido64 wants to merge 1 commit intomainfrom
tido/align-deps/notify-new-versions
Draft

feat(align-deps): notify users when a newer version of a preset is available#4080
tido64 wants to merge 1 commit intomainfrom
tido/align-deps/notify-new-versions

Conversation

@tido64
Copy link
Copy Markdown
Member

@tido64 tido64 commented Apr 9, 2026

Description

Notify users when a newer version of a preset is available.

Test plan

Install an older version of @fluentui-react-native/dependency-profiles:

diff --git a/packages/test-app/package.json b/packages/test-app/package.json
index 763400430..2a6213a02 100644
--- a/packages/test-app/package.json
+++ b/packages/test-app/package.json
@@ -47,6 +47,7 @@
     "@babel/plugin-transform-react-jsx-source": "^7.20.0",
     "@babel/preset-env": "^7.20.0",
     "@babel/runtime": "^7.20.0",
+    "@fluentui-react-native/dependency-profiles": "0.8.69",
     "@jridgewell/trace-mapping": "^0.3.18",
     "@react-native-community/cli": "^20.0.0",
     "@react-native-community/cli-platform-android": "^20.0.0",
@@ -178,7 +179,8 @@
     "alignDeps": {
       "presets": [
         "microsoft/react-native",
-        "@rnx-kit/scripts/align-deps-preset.cjs"
+        "@rnx-kit/scripts/align-deps-preset.cjs",
+        "@fluentui-react-native/dependency-profiles"
       ],
       "requirements": [
         "react-native@0.83"

Expected output:

% yarn rnx-align-deps
info A newer version of '@fluentui-react-native/dependency-profiles' was found: 0.8.70 (current: 0.8.69)

@github-actions github-actions bot added the feature: align-deps This is related to align-deps label Apr 9, 2026
};

const notifyLatestVersion = (() => {
const cache = new Set<string>();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This needs to be stored somewhere so we don't check too often

return require(resolve(preset, { paths: [projectRoot] }));
default: {
const spec = resolve(preset, { paths: [projectRoot] });
notifyLatestVersion(spec);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Users should be able to disable this check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: align-deps This is related to align-deps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant