-
Notifications
You must be signed in to change notification settings - Fork 328
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
Adds 'spo listitem attachment get' command. Closes #5221 #5332
Conversation
Thank you @nanddeepn, we'll try to review it ASAP! |
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.
Hey @nanddeepn, would you mind updating your PR to utilize ESM? Here's a breakdown of the new changes:
- Make sure that all logging is done asynchronously and awaited
await logger.log(attachmentFiles.AttachmentFiles); cli-microsoft365/src/m365/spo/commands/listitem/listitem-attachment-list.spec.ts
Lines 65 to 81 in 515b009
beforeEach(() => { log = []; logger = { log: async (msg: string) => { log.push(msg); }, logRaw: async (msg: string) => { log.push(msg); }, logToStderr: async (msg: string) => { log.push(msg); } }; loggerLogSpy = sinon.spy(logger, 'log'); loggerLogToStderrSpy = sinon.spy(logger, 'logToStderr'); sinon.stub(cli, 'getSettingWithDefaultValue').callsFake(((settingName, defaultValue) => defaultValue)); });
- Adjust the way commands are exported
export default new SpoListItemAttachmentListCommand(); - Replace all instances of
require
withimport
import command from './listitem-attachment-list.js'; - Modify all file imports within the project to have a
.js
extension
Hi @Jwaegebaert Can you please guide further on below point in spec.ts? |
Hi @nanddeepn Because you cannot use |
Thank you @milanholemans |
Build failed with error: Any idea, anyone? |
Hi @milanholemans |
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.
Hey @nanddeepn, thanks for the changes. Could you also rebase the latest changes from main
into this PR? Right now I'm not able to test this PR locally without a rebase from the main branch.
I've also left a few pointers you can take a look at.
Hi @Jwaegebaert |
Adds
spo listitem attachment get
command. Closes #5221