-
Notifications
You must be signed in to change notification settings - Fork 324
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 remove' command. Closes #5220 #5351
Conversation
Thank you for another awesome PR. We will 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
src/m365/spo/commands/listitem/listitem-attachment-remove.spec.ts
Outdated
Show resolved
Hide resolved
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.
Nice work @nanddeepn, I've left a few comments you can take a look at
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.
Nice work @nanddeepn! Found one small change but changed that myself during the merging process.
Adds
spo listitem attachment remove
command. Closes #5220