-
Notifications
You must be signed in to change notification settings - Fork 549
Deprecate containerPackageInfo
parameter in createOdspCreateContainerRequest
#23919
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
Changes from 2 commits
607654c
ef5d850
ef2e8de
7596a0c
d2a4e9e
f8a5b18
4c771d1
f47b59c
93c452c
a0816bc
0016c71
19ca974
7a3f852
66a4be2
adc4466
e3425af
92234d7
70ecfc4
065add8
e9c3636
62c3774
32f5cae
a0dcc11
65124c3
3fd97f0
d981211
cd8595a
6d645ea
d3ac29e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ import { | |
} from "@fluidframework/odsp-doclib-utils/internal"; | ||
import { | ||
OdspDriverUrlResolver, | ||
// eslint-disable-next-line import/no-deprecated | ||
createOdspCreateContainerRequest, | ||
createOdspUrl, | ||
} from "@fluidframework/odsp-driver/internal"; | ||
Comment on lines
+15
to
18
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is an example and should not be importing from /internal. Recommend fixing these when we have to touch them. See examples that use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should none of the odsp-driver exports be /legacy then? At least some of these are and should be okay to use /legacy import instead of /internal. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thread nudge There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. more aggressive nudge (@markfields , @Abe27342 , @alexvy86 ) |
||
|
@@ -75,6 +76,7 @@ export class OdspUrlResolver implements IUrlResolver { | |
this.authRequestInfo, | ||
false, | ||
); | ||
// eslint-disable-next-line import/no-deprecated | ||
return createOdspCreateContainerRequest( | ||
`https://${this.server}`, | ||
driveId, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ import { | |
import { | ||
OdspDocumentServiceFactory, | ||
OdspDriverUrlResolver, | ||
// eslint-disable-next-line import/no-deprecated | ||
createOdspCreateContainerRequest, | ||
createOdspUrl, | ||
} from "@fluidframework/odsp-driver/internal"; | ||
Comment on lines
+16
to
19
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Other option for this and other /internal import is to make the /internal export only export the non-deprecated version. The ./internal.ts version could look like: export const odspCreateContainerRequest: (
siteUrl: string,
driveId: string,
filePath: string,
fileName: string,
createShareLinkType?: ISharingLinkKind,
) => ReturnType<typeof createOdspCreateContainerRequestOriginal> = createOdspCreateContainerRequestOriginal; Since there are only two internal uses, may not be worth the effort. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's not worth the effort. |
||
|
@@ -31,6 +32,7 @@ export const OdspDriverApi = { | |
version: pkgVersion, | ||
OdspDocumentServiceFactory, | ||
OdspDriverUrlResolver, | ||
// eslint-disable-next-line import/no-deprecated | ||
createOdspCreateContainerRequest, | ||
createOdspUrl, // REVIEW: does this need to be back compat? | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to disable import no deprecated, because even though the version that is being imported is technically not the deprecated version, eslint detected that it was using that one. Does anyone know if there's a better way to deprecate the parameter?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The linter doesn't understand / is being conservative. This is okay, but should add a comment with the work item that will clean this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only alternative might be to import the module as in
import * as OdspDriver from "...
.But since it is temporary, this is good enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still looking for comment with the work item number.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recently learned of a better format to comment lint disables using
--
:// eslint-disable-next-line import/no-deprecated -- This is the non-deprecated call, but eslint doesn't distinguish. TODO AB#31049 remove suppression