[notification-hubs] Use workspace specifiers for internal @azure/* deps#38845
Open
jeremymeng wants to merge 2 commits into
Open
[notification-hubs] Use workspace specifiers for internal @azure/* deps#38845jeremymeng wants to merge 2 commits into
jeremymeng wants to merge 2 commits into
Conversation
Switch all internal @azure-rest/* and @azure/* runtime dependencies in @azure/notification-hubs from caret semver ranges to `workspace:^` to match the convention used by other packages in the monorepo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Run `npx dev-tool samples publish` to bring the published v2 JavaScript and TypeScript samples in sync with the current dev-tool templates (tsconfig, package.json layout, and sample sources). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
I'd like to trial with notification-hubs first. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR targets @azure/notification-hubs dependency specifiers, intending to switch in-repo @azure/* runtime dependencies to workspace:^, and includes mechanically regenerated v2 JS/TS sample outputs from npx dev-tool samples publish.
Changes:
- Updated
sdk/notificationhubs/notification-hubs/package.jsonto useworkspace:^for several@azure/*and@azure-rest/*runtime dependencies. - Regenerated v2 samples (TypeScript + JavaScript), including tsconfig modernization and small sample code/README tweaks.
- Minor sample code cleanups (e.g., removing
awaitbeforeArray.prototype.push).
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/tsconfig.json | Modernized sample TS config (NodeNext/moduleResolution, lib/types/rootDir). |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/src/updateRegistration.ts | Removed unnecessary await on tags.push(...). |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/src/importRegistrationsJob.ts | Formatting-only header whitespace change. |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/src/importRegistrationsJob.poller.ts | Updated type-only imports and added a poller type assertion. |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/src/exportRegistrationsJob.polling.ts | Updated type-only imports and added a poller type assertion. |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/src/createInstallation.fcmV1.ts | Formatting-only header whitespace change. |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/README.md | Adjusted wording and switched to npx cross-env example. |
| sdk/notificationhubs/notification-hubs/samples/v2/typescript/package.json | Sample dependency updates (incl. adding cross-env, version bumps). |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/updateRegistration.js | Removed unnecessary await on tags.push(...). |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/README.md | Adjusted wording and switched to npx cross-env example. |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/package.json | Sample dependency updates (incl. adding cross-env). |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/importRegistrationsJob.poller.js | Removed stray blank line in require block. |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/importRegistrationsJob.js | Formatting-only header whitespace change. |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/exportRegistrationsJob.polling.js | Removed stray blank line in require block. |
| sdk/notificationhubs/notification-hubs/samples/v2/javascript/createInstallation.fcmV1.js | Formatting-only header whitespace change. |
| sdk/notificationhubs/notification-hubs/package.json | Swapped multiple runtime deps from semver ^ ranges to workspace:^. |
| pnpm-lock.yaml | Lockfile updated to reflect package.json specifier changes. |
Comment on lines
+88
to
98
| "@azure-rest/core-client": "workspace:^", | ||
| "@azure/abort-controller": "workspace:^", | ||
| "@azure/core-auth": "workspace:^", | ||
| "@azure/core-lro": "workspace:^", | ||
| "@azure/core-paging": "workspace:^", | ||
| "@azure/core-rest-pipeline": "workspace:^", | ||
| "@azure/core-tracing": "workspace:^", | ||
| "@azure/core-util": "workspace:^", | ||
| "@azure/core-xml": "workspace:^", | ||
| "@azure/logger": "workspace:^", | ||
| "tslib": "^2.8.1" |
Comment on lines
+36
to
40
| const poller = (await beginSubmitNotificationHubJob( | ||
| context, | ||
| importJob, | ||
| )) as unknown as NotificationHubJobPoller; | ||
| importJob = await poller.pollUntilDone(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
workspace:^for@azure*runtime deps as well now that we won't bump package versions unless there aresrc/changes.Packages impacted by this PR
@azure/notification-hubsIssues associated with this PR
N/A
Notes for reviewers
Two commits:
sdk/notificationhubs/notification-hubs/package.json(and the lockfile). All 10 internal@azure-rest/*/@azure/*runtime deps move from caret ranges toworkspace:^.tslibis left unchanged.npx dev-tool samples publishafter the swap produced drift updates to the published v2 JS/TS samples (tsconfig modernization,latestrewrites for non-pinned deps, minor sample source refresh). These are mechanical outputs of the current dev-tool templates, not behavior changes.